dockutil 2.0.5 -> 3.0.2 (#167488)

* dockutil 2.0.5 -> 3.0.2

Implement required changes to dockutil to handle newer version of package: 3.0.2

* Add gzip to inputs, remove pbzx as it is unused

* Utilise recommended changes reducing build dependencies and following darwin patterns more closely.
Note; this changeset does maintain the symlinking of $out/usr/local/bin in order to resolve an issue with crashing.

* Apply format/lint with nixfmt

authored by Jay Rovacsek and committed by GitHub 4ff95784 9d1596b9

+16 -11
+16 -11
pkgs/os-specific/darwin/dockutil/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub }: 2 - 1 + { lib, stdenv, fetchurl, libarchive, p7zip }: 3 2 stdenv.mkDerivation rec { 4 3 pname = "dockutil"; 5 - version = "2.0.5"; 4 + version = "3.0.2"; 6 5 7 - src = fetchFromGitHub { 8 - owner = "kcrawford"; 9 - repo = "dockutil"; 10 - rev = version; 11 - sha256 = "sha256-8tDkueCTCtvxc7owp3K9Tsrn4hL79CM04zBNv7AcHgA="; 6 + src = fetchurl { 7 + url = 8 + "https://github.com/kcrawford/dockutil/releases/download/${version}/dockutil-${version}.pkg"; 9 + sha256 = "175137ea747e83ed221d60b18b712b256ed31531534cde84f679487d337668fd"; 12 10 }; 13 11 14 12 dontBuild = true; 15 13 14 + nativeBuildInputs = [ libarchive p7zip ]; 15 + 16 + unpackPhase = '' 17 + 7z x $src 18 + bsdtar -xf Payload~ 19 + ''; 20 + 16 21 installPhase = '' 17 22 runHook preInstall 18 - 19 23 mkdir -p $out/bin 20 - install -Dm755 scripts/dockutil -t $out/bin 21 - 24 + mkdir -p $out/usr/local/bin 25 + install -Dm755 usr/local/bin/dockutil -t $out/usr/local/bin 26 + ln -rs $out/usr/local/bin/dockutil $out/bin/dockutil 22 27 runHook postInstall 23 28 ''; 24 29