nixpkgs/pkgs/os-specific/darwin/dockutil/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
959 B
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, libarchive, p7zip }:
2022-03-02 00:30:25 +00:00
stdenv.mkDerivation rec {
pname = "dockutil";
version = "3.0.2";
2022-03-02 00:30:25 +00:00
src = fetchurl {
url =
"https://github.com/kcrawford/dockutil/releases/download/${version}/dockutil-${version}.pkg";
sha256 = "175137ea747e83ed221d60b18b712b256ed31531534cde84f679487d337668fd";
2022-03-02 00:30:25 +00:00
};
dontBuild = true;
nativeBuildInputs = [ libarchive p7zip ];
unpackPhase = ''
7z x $src
bsdtar -xf Payload~
'';
2022-03-02 00:30:25 +00:00
installPhase = ''
runHook preInstall
mkdir -p $out/bin
mkdir -p $out/usr/local/bin
install -Dm755 usr/local/bin/dockutil -t $out/usr/local/bin
ln -rs $out/usr/local/bin/dockutil $out/bin/dockutil
2022-03-02 00:30:25 +00:00
runHook postInstall
'';
meta = with lib; {
description = "Tool for managing dock items";
homepage = "https://github.com/kcrawford/dockutil";
license = licenses.asl20;
maintainers = with maintainers; [ tboerger ];
platforms = platforms.darwin;
};
}