nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 66 lines 1.7 kB view raw
1{ 2 dpkg, 3 fetchurl, 4 lib, 5 stdenvNoCC, 6 writeShellApplication, 7 common-updater-scripts, 8 curl, 9 jc, 10 jq, 11}: 12stdenvNoCC.mkDerivation (finalAttrs: { 13 pname = "plasticscm-theme"; 14 version = "11.0.16.9872"; 15 16 src = fetchurl { 17 url = "https://www.plasticscm.com/plasticrepo/stable/debian/amd64/plasticscm-theme_${finalAttrs.version}_amd64.deb"; 18 hash = "sha256-qxOzt+cylEt0kCKb7n+fd4Ut9R4KxYArUm9Ntxe4yVU="; 19 nativeBuildInputs = [ dpkg ]; 20 downloadToTemp = true; 21 recursiveHash = true; 22 postFetch = '' 23 mkdir -p $out 24 dpkg-deb --fsys-tarfile $downloadedFile | tar --extract --directory=$out 25 rm -rf $out/usr/share/doc 26 ''; 27 }; 28 29 dontFixup = true; 30 31 installPhase = '' 32 runHook preInstall 33 34 mkdir -p $out 35 cp -r opt usr/share $out 36 37 runHook postInstall 38 ''; 39 40 passthru.updateScript = lib.getExe (writeShellApplication { 41 name = "update-plasticscm-theme"; 42 runtimeInputs = [ 43 common-updater-scripts 44 curl 45 dpkg 46 jc 47 jq 48 ]; 49 text = '' 50 version="$(curl -sSL https://www.plasticscm.com/plasticrepo/stable/debian/Packages | 51 jc --pkg-index-deb | 52 jq -r '[.[] | select(.package == "plasticscm-theme")] | sort_by(.version) | last | .version')" 53 54 update-source-version --ignore-same-hash plasticscm-theme "$version" 55 ''; 56 }); 57 58 meta = { 59 homepage = "https://www.plasticscm.com"; 60 description = "SCM by Unity for game development"; 61 platforms = [ "x86_64-linux" ]; 62 license = lib.licenses.unfree; 63 maintainers = with lib.maintainers; [ musjj ]; 64 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; 65 }; 66})