From 0277e56ed5cd301a6a98ba7517c3274babb4485a Mon Sep 17 00:00:00 2001 From: Noah Fontes Date: Tue, 6 Sep 2022 23:14:45 -0700 Subject: [PATCH] p4d: init at 2022.1.2305383 This package splits p4d, p4broker, and p4p out of the p4 package, because the actual CLI for Perforce is open-source and can be readily built from a source distribution. --- .../version-management/p4d/default.nix | 52 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 2 files changed, 53 insertions(+) create mode 100644 pkgs/applications/version-management/p4d/default.nix diff --git a/pkgs/applications/version-management/p4d/default.nix b/pkgs/applications/version-management/p4d/default.nix new file mode 100644 index 000000000000..5b98131303d3 --- /dev/null +++ b/pkgs/applications/version-management/p4d/default.nix @@ -0,0 +1,52 @@ +{ stdenv +, fetchurl +, lib +, autoPatchelfHook +}: + +let + # Upstream replaces minor versions, so use cached URLs. + srcs = { + "i686-linux" = fetchurl { + url = "https://web.archive.org/web/20220907001049/https://ftp.perforce.com/perforce/r22.1/bin.linux26x86/helix-core-server.tgz"; + sha256 = "e9cf27c9dd2fa6432745058a93896d151543aff712fce9f7322152d6ea88a12a"; + }; + "x86_64-linux" = fetchurl { + url = "https://web.archive.org/web/20220907001202/https://ftp.perforce.com/perforce/r22.1/bin.linux26x86_64/helix-core-server.tgz"; + sha256 = "9c272b67574264a4f49fe846ccda24fbd4baeb282665af74b6fbccff26a43558"; + }; + "x86_64-darwin" = fetchurl { + url = "https://web.archive.org/web/20220907001334/https://ftp.perforce.com/perforce/r22.1/bin.macosx1015x86_64/helix-core-server.tgz"; + sha256 = "2500a23fe482a303bd400f0de460b7624ad3f940fef45246004b9f956e90ea45"; + }; + }; +in +stdenv.mkDerivation { + pname = "p4d"; + version = "2022.1.2305383"; + + 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.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; + maintainers = with maintainers; [ impl ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e50949aef8b8..9c6aceb0dd31 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -29701,6 +29701,7 @@ with pkgs; ostinato = libsForQt5.callPackage ../applications/networking/ostinato { }; p4 = callPackage ../applications/version-management/p4 { }; + p4d = callPackage ../applications/version-management/p4d { }; p4v = libsForQt515.callPackage ../applications/version-management/p4v { }; partio = callPackage ../development/libraries/partio {};