ripasso-cursive: cosmetic changes (#361736)
[NixPkgs.git] / pkgs / by-name / p4 / p4d / package.nix
blobb441fe846302b68a0dcbaedf918f09d82c39f05c
1 { stdenv
2 , fetchurl
3 , lib
4 , autoPatchelfHook
5 }:
7 let
8   # Upstream replaces minor versions, so use cached URLs.
9   srcs = {
10     "x86_64-linux" = fetchurl {
11       url = "https://web.archive.org/web/20231109221336id_/https://ftp.perforce.com/perforce/r23.1/bin.linux26x86_64/helix-core-server.tgz";
12       sha256 = "b68c4907cf9258ab47102e8f0e489c11d528a8f614bfa45e3a2fa198639e2362";
13     };
14     "x86_64-darwin" = fetchurl {
15       url = "https://web.archive.org/web/20231109221937id_/https://ftp.perforce.com/perforce/r23.1/bin.macosx1015x86_64/helix-core-server.tgz";
16       sha256 = "fcbf09787ffc29f7237839711447bf19a37ae18a8a7e19b2d30deb3715ae2c11";
17     };
18   };
20 stdenv.mkDerivation {
21   pname = "p4d";
22   version = "2023.1.2513900";
24   src =
25     assert lib.assertMsg (builtins.hasAttr stdenv.hostPlatform.system srcs) "p4d is not available for ${stdenv.hostPlatform.system}";
26     srcs.${stdenv.hostPlatform.system};
28   sourceRoot = ".";
30   nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];
32   dontBuild = true;
34   installPhase = ''
35     install -D -t $out/bin p4broker p4d p4p
36     install -D -t $out/doc/p4d -m 0644 *.txt
37   '';
39   meta = with lib; {
40     description = "Perforce Helix Core Server";
41     homepage = "https://www.perforce.com";
42     sourceProvenance = with sourceTypes; [ binaryNativeCode ];
43     license = licenses.unfree;
44     mainProgram = "p4d";
45     platforms = builtins.attrNames srcs;
46     maintainers = with maintainers; [ corngood impl ];
47   };