Skip to content

Commit

Permalink
Merge pull request #180 from cmacrae/fix/lock_app_install_portability
Browse files Browse the repository at this point in the history
fix: Include coreutils & git in 'lock' app's environment
  • Loading branch information
akirak authored Oct 8, 2024
2 parents 629e831 + 3ecfa2e commit 97165e9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion pkgs/emacs/lock/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
nix,
nixfmt-rfc-style,
jq,
coreutils,
runCommandLocal,
writeTextFile,
writeShellScript,
Expand Down Expand Up @@ -96,14 +97,15 @@ in {
type = "app";
program =
(import ./write-lock-1.nix {inherit lib writeShellScript;} {
inherit outDir src postCommand;
inherit outDir src postCommand coreutils;
})
.outPath;
};

writerScript = {postCommandOnGeneratingLockDir}:
writeShellApplication {
name = "emacs-twist-write-lock";
runtimeInputs = [ coreutils ];
text =
builtins.replaceStrings [
"@lockSrcDir@"
Expand Down
3 changes: 2 additions & 1 deletion pkgs/emacs/lock/write-lock-1.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
outDir,
src,
postCommand,
coreutils,
}:
writeShellScript "lock" ''
outDir="${outDir}"
Expand All @@ -27,7 +28,7 @@ writeShellScript "lock" ''
fi
done
install -m 644 -t "$outDir" ${src}/*.*
${coreutils}/bin/install -m 644 -t "$outDir" ${src}/*.*
${lib.optionalString (postCommand != null) ''
cd "$outDir"
Expand Down

0 comments on commit 97165e9

Please sign in to comment.