Merge pull request #321564 from corngood/p4

perforce: upgrade packages
This commit is contained in:
David McFarland
2024-07-13 21:05:55 -03:00
committed by GitHub
4 changed files with 43 additions and 18 deletions
@@ -10,6 +10,7 @@
, CoreServices
, Foundation
, Security
, testers
}:
let
@@ -31,14 +32,14 @@ let
{ name = "contrib"; path = "${src}/contrib"; }
];
in
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: rec {
pname = "p4";
version = "2022.2.2407422";
version = "2024.1/2596294";
src = fetchurl {
# Upstream replaces minor versions, so use archived URL.
url = "https://web.archive.org/web/20230512173806id_/https://ftp.perforce.com/perforce/r22.2/bin.tools/p4source.tgz";
sha256 = "4355375def3f3d2256d4a92ac1b9960173e7aa97404346c0c74caf23a0905e1b";
url = "https://web.archive.org/web/20240526153453id_/https://ftp.perforce.com/perforce/r24.1/bin.tools/p4source.tgz";
sha256 = "sha256-6+DOJPeVzP4x0UsN9MlZRAyusapBTICX0BuyvVBQBC8=";
};
nativeBuildInputs = [ jam ];
@@ -92,11 +93,16 @@ stdenv.mkDerivation rec {
runHook preInstall
mkdir -p $bin/bin $dev $out
cp bin.unix/p4 $bin/bin
cp -r bin.unix/p4api-${version}/include $dev
cp -r bin.unix/p4api-${version}/lib $out
cp -r bin.unix/p4api-*/include $dev
cp -r bin.unix/p4api-*/lib $out
runHook postInstall
'';
passthru.tests.version = testers.testVersion {
package = finalAttrs.finalPackage;
command = "p4 -V";
};
meta = with lib; {
description = "Perforce Helix Core command-line client and APIs";
homepage = "https://www.perforce.com";
@@ -105,4 +111,4 @@ stdenv.mkDerivation rec {
platforms = platforms.unix;
maintainers = with maintainers; [ corngood impl ];
};
}
})
@@ -2,28 +2,30 @@
, fetchurl
, lib
, callPackage
, libsForQt5
, qt6Packages
}:
let
# Upstream replaces minor versions, so use archived URLs.
srcs = {
"x86_64-linux" = fetchurl {
url = "https://web.archive.org/web/20220902181457id_/https://ftp.perforce.com/perforce/r22.2/bin.linux26x86_64/p4v.tgz";
sha256 = "8fdade4aafe25f568a61cfd80823aa90599c2a404b7c6b4a0862c84b07a9f8d2";
srcs = rec {
x86_64-linux = fetchurl {
url = "https://web.archive.org/web/20240612193642id_/https://ftp.perforce.com/perforce/r24.2/bin.linux26x86_64/p4v.tgz";
sha256 = "sha256-HA99fHcmgli/vVnr0M8ZJEsaZ2ZLzpG3M8S77oDYJyE=";
};
"x86_64-darwin" = fetchurl {
url = "https://web.archive.org/web/20220902194716id_/https://ftp.perforce.com/perforce/r22.2/bin.macosx1015x86_64/P4V.dmg";
sha256 = "c4a9460c0f849be193c68496c500f8a785c740f5bea5b5e7f617969c20be3cd7";
aarch64-darwin = fetchurl {
url = "https://web.archive.org/web/20240612194532id_/https://ftp.perforce.com/perforce/r24.2/bin.macosx12u/P4V.dmg";
sha256 = "sha256-PS7gfDdWspyL//YWLkrsGi5wh6SIeAry2yef1/V0d6o=";
};
# this is universal
x86_64-darwin = aarch64-darwin;
};
mkDerivation =
if stdenv.isDarwin then callPackage ./darwin.nix { }
else libsForQt5.callPackage ./linux.nix { };
else qt6Packages.callPackage ./linux.nix { };
in mkDerivation {
pname = "p4v";
version = "2022.2.2336701";
version = "2024.2/2606884";
src = srcs.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
@@ -17,8 +17,12 @@
, libxcb
, libxkbcommon
, nss
, qtbase
, qtmultimedia
, qtsvg
, qttools
, qtwebengine
, qtwebview
, xcbutilimage
, xcbutilkeysyms
, xcbutilrenderutil
@@ -50,8 +54,12 @@ let
libxcb
libxkbcommon
nss
qtbase
qtmultimedia
qtsvg
qttools
qtwebengine
qtwebview
xcbutilimage
xcbutilkeysyms
xcbutilrenderutil
@@ -63,10 +71,19 @@ let
# Don't wrap the Qt apps; upstream has its own wrapper scripts.
dontWrapQtApps = true;
postPatch = ''
rm -r lib/plugins lib/libQt6* lib/libssl* lib/libicu* lib/libcrypto*
'';
installPhase = ''
mkdir -p $out
cp -r bin lib $out
addAutoPatchelfSearchPath $out/lib
ln -s "${qtbase}/${qtbase.qtPluginPrefix}" $out/lib/plugins
'';
preFixup = ''
patchelf --clear-symbol-version close $out/bin/p4{v,admin}.bin
'';
};
in
+1 -1
View File
@@ -32764,7 +32764,7 @@ with pkgs;
inherit (darwin.apple_sdk.frameworks) CoreServices Foundation Security;
};
p4d = callPackage ../applications/version-management/p4d { };
p4v = callPackage ../applications/version-management/p4v { };
p4v = qt6Packages.callPackage ../applications/version-management/p4v { };
parson = callPackage ../development/libraries/parson { };