any-nix-shell: run preInstall/postInstall hooks, remove with lib

This commit is contained in:
Thiago Kenji Okada
2024-07-20 21:20:55 +01:00
parent 9a8e69dd4e
commit 31798c17aa
+10 -3
View File
@@ -20,9 +20,14 @@ stdenv.mkDerivation rec {
};
strictDeps = true;
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ bash ];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp -r bin $out
wrapProgram $out/bin/any-nix-shell --prefix PATH ":" ${
@@ -32,13 +37,15 @@ stdenv.mkDerivation rec {
which
]
}
runHook postInstall
'';
meta = with lib; {
meta = {
description = "fish, xonsh and zsh support for nix-shell";
license = licenses.mit;
license = lib.licenses.mit;
homepage = "https://github.com/haslersn/any-nix-shell";
maintainers = with maintainers; [ haslersn ];
maintainers = with lib.maintainers; [ haslersn ];
mainProgram = "any-nix-shell";
};
}