2024-07-17 09:00:56 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
|
|
|
makeWrapper,
|
|
|
|
bash,
|
2024-07-17 09:27:53 +00:00
|
|
|
gnused,
|
|
|
|
which,
|
2024-07-17 09:00:56 +00:00
|
|
|
}:
|
2018-09-13 21:15:54 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "any-nix-shell";
|
2024-07-23 18:25:39 +00:00
|
|
|
version = "2.0.1";
|
2018-09-13 21:15:54 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "haslersn";
|
|
|
|
repo = "any-nix-shell";
|
|
|
|
rev = "v${version}";
|
2024-07-23 18:25:39 +00:00
|
|
|
hash = "sha256-t6+LKSGWmkHQhfqw/4Ztz4QgDXQ2RZr9R/mMEEA3jlY=";
|
2018-09-13 21:15:54 +00:00
|
|
|
};
|
|
|
|
|
2022-05-06 18:39:28 +00:00
|
|
|
strictDeps = true;
|
2024-07-17 10:16:13 +00:00
|
|
|
|
2018-09-13 21:15:54 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2024-07-17 10:16:13 +00:00
|
|
|
|
2022-05-06 18:39:28 +00:00
|
|
|
buildInputs = [ bash ];
|
2024-07-17 10:16:13 +00:00
|
|
|
|
2018-09-13 21:15:54 +00:00
|
|
|
installPhase = ''
|
2024-07-17 10:16:13 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2018-09-13 21:15:54 +00:00
|
|
|
mkdir -p $out/bin
|
|
|
|
cp -r bin $out
|
2024-07-17 09:27:53 +00:00
|
|
|
wrapProgram $out/bin/any-nix-shell --prefix PATH ":" ${
|
|
|
|
lib.makeBinPath [
|
|
|
|
(placeholder "out")
|
|
|
|
gnused
|
|
|
|
which
|
|
|
|
]
|
|
|
|
}
|
2024-07-17 10:16:13 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
2018-09-13 21:15:54 +00:00
|
|
|
'';
|
|
|
|
|
2024-07-17 10:16:13 +00:00
|
|
|
meta = {
|
2024-07-17 09:51:15 +00:00
|
|
|
description = "fish, xonsh and zsh support for nix-shell";
|
2024-07-17 10:16:13 +00:00
|
|
|
license = lib.licenses.mit;
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/haslersn/any-nix-shell";
|
2024-07-17 10:16:13 +00:00
|
|
|
maintainers = with lib.maintainers; [ haslersn ];
|
2023-08-04 00:13:11 +00:00
|
|
|
mainProgram = "any-nix-shell";
|
2018-09-13 21:15:54 +00:00
|
|
|
};
|
2020-04-01 01:11:51 +00:00
|
|
|
}
|