summaryrefslogtreecommitdiff
path: root/default.nix
diff options
context:
space:
mode:
authorBrian Picciano <me@mediocregopher.com>2024-05-11 18:12:46 +0200
committerBrian Picciano <me@mediocregopher.com>2024-05-11 18:29:07 +0200
commitcfe083ec2f88860e0520ddbd6874aa6981e38e8a (patch)
treec77cd02f4cfb2de4f7e98b939810c139ea57c907 /default.nix
parent5b52676a2defc040d4c0e2fac055d61a1989834c (diff)
Set ssh env and make sure all git utilities are available, so that git over ssh works
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix9
1 files changed, 7 insertions, 2 deletions
diff --git a/default.nix b/default.nix
index 112444d..ebe9b92 100644
--- a/default.nix
+++ b/default.nix
@@ -44,8 +44,7 @@ in rec {
};
- git = pkgs.writeScriptBin "git" ''
- #!${pkgs.bash}/bin/bash
+ gitWrapped = pkgs.writeShellScript "git" ''
export XDG_CONFIG_HOME=${gitConfig}
bin="${pkgs.git}/bin/git"
@@ -60,6 +59,12 @@ in rec {
exec "$bin" "$@"
'';
+ git = pkgs.runCommand "mediocregopher-git" {} ''
+ cp -rL "${pkgs.git}" "$out"
+ chmod -R +rwX "$out"
+ cp "${gitWrapped}" "$out"/bin/git
+ '';
+
bin = pkgs.buildEnv {
name = "mediocregopher-bin";
paths = [