2022-09-07 06:14:45 +00:00
|
|
|
{ stdenv
|
|
|
|
, fetchurl
|
|
|
|
, lib
|
|
|
|
, autoPatchelfHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
# Upstream replaces minor versions, so use cached URLs.
|
|
|
|
srcs = {
|
|
|
|
"x86_64-linux" = fetchurl {
|
2023-11-09 22:25:34 +00:00
|
|
|
url = "https://web.archive.org/web/20231109221336id_/https://ftp.perforce.com/perforce/r23.1/bin.linux26x86_64/helix-core-server.tgz";
|
|
|
|
sha256 = "b68c4907cf9258ab47102e8f0e489c11d528a8f614bfa45e3a2fa198639e2362";
|
2022-09-07 06:14:45 +00:00
|
|
|
};
|
|
|
|
"x86_64-darwin" = fetchurl {
|
2023-11-09 22:25:34 +00:00
|
|
|
url = "https://web.archive.org/web/20231109221937id_/https://ftp.perforce.com/perforce/r23.1/bin.macosx1015x86_64/helix-core-server.tgz";
|
|
|
|
sha256 = "fcbf09787ffc29f7237839711447bf19a37ae18a8a7e19b2d30deb3715ae2c11";
|
2022-09-07 06:14:45 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "p4d";
|
2023-11-09 22:25:34 +00:00
|
|
|
version = "2023.1.2513900";
|
2022-09-07 06:14:45 +00:00
|
|
|
|
|
|
|
src =
|
|
|
|
assert lib.assertMsg (builtins.hasAttr stdenv.hostPlatform.system srcs) "p4d is not available for ${stdenv.hostPlatform.system}";
|
|
|
|
srcs.${stdenv.hostPlatform.system};
|
|
|
|
|
|
|
|
sourceRoot = ".";
|
|
|
|
|
|
|
|
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -D -t $out/bin p4broker p4d p4p
|
|
|
|
install -D -t $out/doc/p4d -m 0644 *.txt
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Perforce Helix Core Server";
|
|
|
|
homepage = "https://www.perforce.com";
|
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
|
|
|
license = licenses.unfree;
|
|
|
|
mainProgram = "p4d";
|
|
|
|
platforms = builtins.attrNames srcs;
|
2022-09-08 05:33:26 +00:00
|
|
|
maintainers = with maintainers; [ corngood impl ];
|
2022-09-07 06:14:45 +00:00
|
|
|
};
|
|
|
|
}
|