diff --git a/pkgs/by-name/pl/plasticscm-client-core-unwrapped/package.nix b/pkgs/by-name/pl/plasticscm-client-core-unwrapped/package.nix index f659c730ac34..11b5e24fd7e5 100644 --- a/pkgs/by-name/pl/plasticscm-client-core-unwrapped/package.nix +++ b/pkgs/by-name/pl/plasticscm-client-core-unwrapped/package.nix @@ -16,11 +16,18 @@ stdenvNoCC.mkDerivation (finalAttrs: { src = fetchurl { url = "https://www.plasticscm.com/plasticrepo/stable/debian/amd64/plasticscm-client-core_${finalAttrs.version}_amd64.deb"; - hash = "sha256-NuMY75JnnWVRKBSh/1XYipqc0m+O0vt7lJMVkQyTaNA="; + hash = "sha256-9K4pvl+hxB3+bQwC3HYaEOq5nQlCyTQQuYsuqT4BbRg="; + nativeBuildInputs = [ dpkg ]; + downloadToTemp = true; + recursiveHash = true; + postFetch = '' + mkdir -p $out + dpkg-deb --fsys-tarfile $downloadedFile | tar --extract --directory=$out + rm -rf $out/usr/share/doc + ''; }; nativeBuildInputs = [ - dpkg makeWrapper ]; @@ -40,15 +47,16 @@ stdenvNoCC.mkDerivation (finalAttrs: { runtimeInputs = [ common-updater-scripts curl + dpkg jc jq ]; text = '' - eval "$(curl -sSL https://www.plasticscm.com/plasticrepo/stable/debian/Packages | + version="$(curl -sSL https://www.plasticscm.com/plasticrepo/stable/debian/Packages | jc --pkg-index-deb | - jq -r '[.[] | select(.package == "plasticscm-client-core")] | sort_by(.version) | last | @sh "version=\(.version) hash=\(.sha256)"')" - # shellcheck disable=SC2154 - update-source-version plasticscm-client-core-unwrapped "$version" "sha256-$(xxd -r -p <<<"$hash" | base64)" + jq -r '[.[] | select(.package == "plasticscm-client-core")] | sort_by(.version) | last | .version')" + + update-source-version --ignore-same-hash plasticscm-client-core-unwrapped "$version" ''; }); diff --git a/pkgs/by-name/pl/plasticscm-client-gui-unwrapped/package.nix b/pkgs/by-name/pl/plasticscm-client-gui-unwrapped/package.nix index 7e0755e219f5..0be969fcba36 100644 --- a/pkgs/by-name/pl/plasticscm-client-gui-unwrapped/package.nix +++ b/pkgs/by-name/pl/plasticscm-client-gui-unwrapped/package.nix @@ -15,13 +15,17 @@ stdenvNoCC.mkDerivation (finalAttrs: { src = fetchurl { url = "https://www.plasticscm.com/plasticrepo/stable/debian/amd64/plasticscm-client-gui_${finalAttrs.version}_amd64.deb"; - hash = "sha256-sSabW3j9h9uNQSwWKvAH+3D9lRWvMRYcuITDonD7Inw="; + hash = "sha256-jqU4nfRtobdXiNIx9pjceje5Y+m+xFYdWQwWgEXxW+k="; + nativeBuildInputs = [ dpkg ]; + downloadToTemp = true; + recursiveHash = true; + postFetch = '' + mkdir -p $out + dpkg-deb --fsys-tarfile $downloadedFile | tar --extract --directory=$out + rm -rf $out/usr/share/doc + ''; }; - nativeBuildInputs = [ - dpkg - ]; - dontFixup = true; installPhase = '' @@ -38,15 +42,16 @@ stdenvNoCC.mkDerivation (finalAttrs: { runtimeInputs = [ common-updater-scripts curl + dpkg jc jq ]; text = '' - eval "$(curl -sSL https://www.plasticscm.com/plasticrepo/stable/debian/Packages | + version="$(curl -sSL https://www.plasticscm.com/plasticrepo/stable/debian/Packages | jc --pkg-index-deb | - jq -r '[.[] | select(.package == "plasticscm-client-gui")] | sort_by(.version) | last | @sh "version=\(.version) hash=\(.sha256)"')" - # shellcheck disable=SC2154 - update-source-version plasticscm-client-gui-unwrapped "$version" "sha256-$(xxd -r -p <<<"$hash" | base64)" + jq -r '[.[] | select(.package == "plasticscm-client-gui")] | sort_by(.version) | last | .version')" + + update-source-version --ignore-same-hash plasticscm-client-gui-unwrapped "$version" ''; }); diff --git a/pkgs/by-name/pl/plasticscm-theme/package.nix b/pkgs/by-name/pl/plasticscm-theme/package.nix index 98b50427ffce..f1919acff1ae 100644 --- a/pkgs/by-name/pl/plasticscm-theme/package.nix +++ b/pkgs/by-name/pl/plasticscm-theme/package.nix @@ -15,13 +15,17 @@ stdenvNoCC.mkDerivation (finalAttrs: { src = fetchurl { url = "https://www.plasticscm.com/plasticrepo/stable/debian/amd64/plasticscm-theme_${finalAttrs.version}_amd64.deb"; - hash = "sha256-sInKMW6KoUNZ/06+E8MTGyVtOd+8wFLPrFibNw/DYQ0="; + hash = "sha256-qxOzt+cylEt0kCKb7n+fd4Ut9R4KxYArUm9Ntxe4yVU="; + nativeBuildInputs = [ dpkg ]; + downloadToTemp = true; + recursiveHash = true; + postFetch = '' + mkdir -p $out + dpkg-deb --fsys-tarfile $downloadedFile | tar --extract --directory=$out + rm -rf $out/usr/share/doc + ''; }; - nativeBuildInputs = [ - dpkg - ]; - dontFixup = true; installPhase = '' @@ -38,15 +42,16 @@ stdenvNoCC.mkDerivation (finalAttrs: { runtimeInputs = [ common-updater-scripts curl + dpkg jc jq ]; text = '' - eval "$(curl -sSL https://www.plasticscm.com/plasticrepo/stable/debian/Packages | + version="$(curl -sSL https://www.plasticscm.com/plasticrepo/stable/debian/Packages | jc --pkg-index-deb | - jq -r '[.[] | select(.package == "plasticscm-theme")] | sort_by(.version) | last | @sh "version=\(.version) hash=\(.sha256)"')" - # shellcheck disable=SC2154 - update-source-version plasticscm-theme "$version" "sha256-$(xxd -r -p <<<"$hash" | base64)" + jq -r '[.[] | select(.package == "plasticscm-theme")] | sort_by(.version) | last | .version')" + + update-source-version --ignore-same-hash plasticscm-theme "$version" ''; });