perfect_dark: un-vendor gzip; refactor derivation builder; add updateScript (#440718)

authored by Fernando Rodrigues and committed by GitHub ff436949 8e7c62bd

+16 -7
+16 -7
pkgs/by-name/pe/perfect_dark/package.nix
··· 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 - SDL2, 6 cmake, 7 libGL, 8 pkg-config, 9 python3, 10 zlib, 11 romID ? "ntsc-final", 12 }: 13 let ··· 27 owner = "fgsfdsfgs"; 28 repo = "perfect_dark"; 29 rev = "bb4fcffeb5dc382fce4c609897a2e82590d7d709"; 30 - hash = "sha256-XLmAjwEzz4fPpHuk3IBmhhDfiuudwMTnYgVe6Wcfdsg="; 31 }; 32 33 enableParallelBuilding = true; 34 35 # Fails to build if not set: 36 hardeningDisable = [ "format" ]; 37 - hardeningEnable = [ "pie" ]; 38 39 cmakeFlags = [ 40 (lib.cmakeFeature "ROMID" romID) ··· 47 ]; 48 49 buildInputs = [ 50 - SDL2 51 libGL 52 zlib 53 ]; ··· 72 ''; 73 74 preConfigure = '' 75 - patchShebangs --build . 76 ''; 77 78 installPhase = '' ··· 91 runHook postInstall 92 ''; 93 94 meta = { 95 description = "Modern cross-platform port of Perfect Dark"; 96 longDescription = '' ··· 114 license = with lib.licenses; [ 115 # perfect_dark, khrplatform.h, port/fast3d 116 mit 117 - # Vendored source code and binaries of 'gzip'. 118 - gpl3Plus 119 # Derivative work of "Perfect Dark" © 2000 Rare Ltd. 120 unfree 121 ];
··· 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 + sdl2-compat, 6 cmake, 7 libGL, 8 pkg-config, 9 python3, 10 zlib, 11 + unstableGitUpdater, 12 romID ? "ntsc-final", 13 }: 14 let ··· 28 owner = "fgsfdsfgs"; 29 repo = "perfect_dark"; 30 rev = "bb4fcffeb5dc382fce4c609897a2e82590d7d709"; 31 + hash = "sha256-naWE+oWgvrd4CSoBm6W4em60baTWn4uSnKbWh8WKPDM="; 32 + 33 + postFetch = '' 34 + pushd $out 35 + rm tools/gzip 36 + rm -r tools/mkrom 37 + popd 38 + ''; 39 }; 40 41 enableParallelBuilding = true; 42 43 # Fails to build if not set: 44 hardeningDisable = [ "format" ]; 45 46 cmakeFlags = [ 47 (lib.cmakeFeature "ROMID" romID) ··· 54 ]; 55 56 buildInputs = [ 57 + sdl2-compat 58 libGL 59 zlib 60 ]; ··· 79 ''; 80 81 preConfigure = '' 82 + patchShebangs --build tools/assetmgr 83 ''; 84 85 installPhase = '' ··· 98 runHook postInstall 99 ''; 100 101 + passthru = { 102 + updateScript = unstableGitUpdater { hardcodeZeroVersion = true; }; 103 + }; 104 + 105 meta = { 106 description = "Modern cross-platform port of Perfect Dark"; 107 longDescription = '' ··· 125 license = with lib.licenses; [ 126 # perfect_dark, khrplatform.h, port/fast3d 127 mit 128 # Derivative work of "Perfect Dark" © 2000 Rare Ltd. 129 unfree 130 ];