nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 49 lines 1.4 kB view raw
1{ 2 stdenv, 3 fetchurl, 4 lib, 5 callPackage, 6 qt6Packages, 7}: 8 9let 10 # Upstream replaces minor versions, so use archived URLs. 11 srcs = rec { 12 x86_64-linux = fetchurl { 13 url = "https://web.archive.org/web/20240612193642id_/https://ftp.perforce.com/perforce/r24.2/bin.linux26x86_64/p4v.tgz"; 14 sha256 = "sha256-HA99fHcmgli/vVnr0M8ZJEsaZ2ZLzpG3M8S77oDYJyE="; 15 }; 16 aarch64-darwin = fetchurl { 17 url = "https://web.archive.org/web/20240612194532id_/https://ftp.perforce.com/perforce/r24.2/bin.macosx12u/P4V.dmg"; 18 sha256 = "sha256-PS7gfDdWspyL//YWLkrsGi5wh6SIeAry2yef1/V0d6o="; 19 }; 20 # this is universal 21 x86_64-darwin = aarch64-darwin; 22 }; 23 24 mkDerivation = 25 if stdenv.hostPlatform.isDarwin then 26 callPackage ./darwin.nix { } 27 else 28 qt6Packages.callPackage ./linux.nix { }; 29in 30mkDerivation { 31 pname = "p4v"; 32 version = "2024.2/2606884"; 33 34 src = 35 srcs.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); 36 37 meta = { 38 description = "Perforce Helix Visual Client"; 39 homepage = "https://www.perforce.com"; 40 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; 41 license = lib.licenses.unfreeRedistributable; 42 platforms = builtins.attrNames srcs; 43 maintainers = with lib.maintainers; [ 44 impl 45 nathyong 46 nioncode 47 ]; 48 }; 49}