bash-env-json: init at 0.9.1 (#358140)

This commit is contained in:
Aleksana 2024-11-24 21:58:41 +08:00 committed by GitHub
commit a475f173ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -0,0 +1,55 @@
{
stdenvNoCC,
lib,
makeWrapper,
fetchFromGitHub,
coreutils,
gnused,
jq,
nix-update-script,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "bash-env-json";
version = "0.9.1";
src = fetchFromGitHub {
owner = "tesujimath";
repo = "bash-env-json";
rev = finalAttrs.version;
hash = "sha256-cZEkYOr9z6yLPA4PSo6+hogaqb1vhWaYi/rp4asfsbM=";
};
nativeBuildInputs = [
makeWrapper
];
installPhase = ''
runHook preInstall
install -Dm755 bash-env-json -t $out/bin
runHook postInstall
'';
postFixup = ''
wrapProgram $out/bin/bash-env-json --prefix PATH : ${
lib.makeBinPath [
coreutils
gnused
jq
]
}
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Export Bash environment as JSON for import into modern shells like Elvish and Nushell";
homepage = "https://github.com/tesujimath/bash-env-json";
mainProgram = "bash-env-json";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ jaredmontoya ];
platforms = lib.platforms.all;
};
})