depot/third_party/nixpkgs/pkgs/tools/misc/script-directory/default.nix
Default email 5ca88bfbb9 Project import generated by Copybara.
GitOrigin-RevId: 9f918d616c5321ad374ae6cb5ea89c9e04bf3e58
2024-07-31 10:19:44 +00:00

42 lines
815 B
Nix

{ lib
, stdenvNoCC
, fetchFromGitHub
, installShellFiles
, patsh
}:
stdenvNoCC.mkDerivation rec {
pname = "script-directory";
version = "1.1.0";
src = fetchFromGitHub {
owner = "ianthehenry";
repo = "sd";
rev = "v${version}";
hash = "sha256-X5RWCJQUqDnG2umcCk5KS6HQinTJVapBHp6szEmbc4U=";
};
nativeBuildInputs = [
installShellFiles
patsh
];
installPhase = ''
runHook preInstall
patsh -f sd
install -Dt "$out/bin" sd
installShellCompletion --zsh _sd
runHook postInstall
'';
meta = {
description = "Cozy nest for your scripts";
homepage = "https://github.com/ianthehenry/sd";
changelog = "https://github.com/ianthehenry/sd/tree/${src.rev}#changelog";
license = lib.licenses.mit;
maintainers = [ ];
mainProgram = "sd";
};
}