1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 05:31:22 +00:00
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
''