Skip to content

Commit

Permalink
bash-env-json: fix path issue (NixOS#358950)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnRTitor authored Dec 15, 2024
2 parents f64bdf4 + b552aae commit 9f1bd52
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions pkgs/by-name/ba/bash-env-json/package.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
stdenvNoCC,
lib,
makeWrapper,
fetchFromGitHub,
coreutils,
gnused,
Expand All @@ -11,19 +10,15 @@

stdenvNoCC.mkDerivation (finalAttrs: {
pname = "bash-env-json";
version = "0.9.1";
version = "0.9.2";

src = fetchFromGitHub {
owner = "tesujimath";
repo = "bash-env-json";
rev = finalAttrs.version;
hash = "sha256-cZEkYOr9z6yLPA4PSo6+hogaqb1vhWaYi/rp4asfsbM=";
hash = "sha256-EYro4pMILnQFpXpFjdzSDuudhqC2EvysYMUmIOvesgo=";
};

nativeBuildInputs = [
makeWrapper
];

installPhase = ''
runHook preInstall
Expand All @@ -33,13 +28,12 @@ stdenvNoCC.mkDerivation (finalAttrs: {
'';

postFixup = ''
wrapProgram $out/bin/bash-env-json --prefix PATH : ${
lib.makeBinPath [
coreutils
gnused
jq
]
}
substituteInPlace $out/bin/bash-env-json --replace-fail " env " " ${lib.getExe' coreutils "env"} "
substituteInPlace $out/bin/bash-env-json --replace-fail " jq " " ${lib.getExe jq} "
substituteInPlace $out/bin/bash-env-json --replace-fail " mktemp " " ${lib.getExe' coreutils "mktemp"} "
substituteInPlace $out/bin/bash-env-json --replace-fail " rm " " ${lib.getExe' coreutils "rm"} "
substituteInPlace $out/bin/bash-env-json --replace-fail " sed " " ${lib.getExe gnused} "
substituteInPlace $out/bin/bash-env-json --replace-fail " touch " " ${lib.getExe' coreutils "touch"} "
'';

passthru.updateScript = nix-update-script { };
Expand Down

0 comments on commit 9f1bd52

Please sign in to comment.