From 3dbaadcc54797dc48001b61858b248770106f7e8 Mon Sep 17 00:00:00 2001 From: jaredmontoya <49511278+jaredmontoya@users.noreply.github.com> Date: Thu, 21 Nov 2024 21:48:02 +0100 Subject: [PATCH] bash-env-json: init at 0.9.1 --- pkgs/by-name/ba/bash-env-json/package.nix | 55 +++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 pkgs/by-name/ba/bash-env-json/package.nix diff --git a/pkgs/by-name/ba/bash-env-json/package.nix b/pkgs/by-name/ba/bash-env-json/package.nix new file mode 100644 index 000000000000..895a6822a0ce --- /dev/null +++ b/pkgs/by-name/ba/bash-env-json/package.nix @@ -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; + }; +})