Skip to content

Commit

Permalink
bash-env-json: init at 0.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredmontoya committed Nov 22, 2024
1 parent d34e172 commit 8a1f2dc
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions pkgs/by-name/ba/bash-env-json/package.nix
Original file line number Diff line number Diff line change
@@ -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
mkdir -p $out/bin
cp bash-env-json $out/bin
runHook postInstall
'';

postFixup = ''
wrapProgram $out/bin/bash-env-json --set 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 ];
};
})

0 comments on commit 8a1f2dc

Please sign in to comment.