3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/build-support/fetchgitlocal/default.nix

11 lines
214 B
Nix
Raw Normal View History

{ runCommand, git }: src:
runCommand "local-git-export" {} ''
cd ${src}
mkdir -p "$out"
for file in $(${git}/bin/git ls-files); do
mkdir -p "$out/$(dirname $file)"
cp -d $file "$out/$file"
done
''