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