depot/third_party/nixpkgs/pkgs/tools/misc/xdg-ninja/default.nix
Default email 5083ee08a2 Project import generated by Copybara.
GitOrigin-RevId: 10ecda252ce1b3b1d6403caeadbcc8f30d5ab796
2022-09-30 06:47:45 -05:00

36 lines
1 KiB
Nix

{ lib, stdenvNoCC, fetchFromGitHub, makeWrapper, jq, glow }:
stdenvNoCC.mkDerivation rec {
pname = "xdg-ninja";
version = "0.2.0.1";
src = fetchFromGitHub {
owner = "b3nj5m1n";
repo = "xdg-ninja";
rev = "v${version}";
sha256 = "sha256-ZyqxMlyCB8gEsZTVrxgLdW/mQ/4xeTHTK+lDKIzYs6I=";
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
runHook preInstall
install -Dm755 xdg-ninja.sh "$out/share/xdg-ninja/xdg-ninja.sh"
install -Dm644 programs/* -t "$out/share/xdg-ninja/programs"
mkdir -p "$out/bin"
ln -s "$out/share/xdg-ninja/xdg-ninja.sh" "$out/bin/xdg-ninja"
wrapProgram "$out/bin/xdg-ninja" \
--prefix PATH : "${lib.makeBinPath [ glow jq ]}"
runHook postInstall
'';
meta = with lib; {
description = "A shell script which checks your $HOME for unwanted files and directories";
homepage = "https://github.com/b3nj5m1n/xdg-ninja";
license = licenses.mit;
platforms = platforms.all;
maintainers = with maintainers; [ patricksjackson ];
};
}