Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / applications / version-management / p4v / default.nix
blob1004661499be2958f5ab02a1d554266c5705cb0e
1 { stdenv
2 , fetchurl
3 , lib
4 , callPackage
5 , libsForQt5
6 }:
8 let
9   # Upstream replaces minor versions, so use archived URLs.
10   srcs = {
11     "x86_64-linux" = fetchurl {
12       url = "https://web.archive.org/web/20220902181457id_/https://ftp.perforce.com/perforce/r22.2/bin.linux26x86_64/p4v.tgz";
13       sha256 = "8fdade4aafe25f568a61cfd80823aa90599c2a404b7c6b4a0862c84b07a9f8d2";
14     };
15     "x86_64-darwin" = fetchurl {
16       url = "https://web.archive.org/web/20220902194716id_/https://ftp.perforce.com/perforce/r22.2/bin.macosx1015x86_64/P4V.dmg";
17       sha256 = "c4a9460c0f849be193c68496c500f8a785c740f5bea5b5e7f617969c20be3cd7";
18     };
19   };
21   mkDerivation =
22     if stdenv.isDarwin then callPackage ./darwin.nix { }
23     else libsForQt5.callPackage ./linux.nix { };
24 in mkDerivation {
25   pname = "p4v";
26   version = "2022.2.2336701";
28   src = srcs.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
30   meta = {
31     description = "Perforce Helix Visual Client";
32     homepage = "https://www.perforce.com";
33     sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
34     license = lib.licenses.unfreeRedistributable;
35     platforms = builtins.attrNames srcs;
36     maintainers = with lib.maintainers; [ impl nathyong nioncode ];
37   };