leaveDotGit
This commit is contained in:
parent
de99d8a4a1
commit
22fc27545e
2 changed files with 9 additions and 6 deletions
|
@ -2,5 +2,6 @@
|
|||
fetchgit {
|
||||
url = "https://github.com/turt2live/matrix-media-repo";
|
||||
rev = "3184dbc7720fc103aaf4704be894eac69535e887";
|
||||
sha256 = "1j6y7alr60mmj5h014qmpz9a5qjv8cm61andwdacb0dqjjbvsm0z";
|
||||
sha256 = "1c1a9hbmq3zjrxfi84i3lwwjld0sn38f8rxwnvsbf8k6ii3jp6d6";
|
||||
leaveDotGit = true;
|
||||
}
|
||||
|
|
|
@ -14,15 +14,17 @@ function cleanup {
|
|||
trap cleanup EXIT
|
||||
|
||||
echo "Fetching source code $REVISION from $URL"
|
||||
JSON=$(nix-prefetch-git --url "$URL" --rev "$REVISION" 2> $WORK_DIR/nix-prefetch-git.out)
|
||||
JSON=$(nix-prefetch-git --url "$URL" --rev "$REVISION" --leave-dotGit 2> $WORK_DIR/nix-prefetch-git.out)
|
||||
SHA=$(echo $JSON | jq -r .sha256)
|
||||
SOURCE_DIR=$(grep '^path is' $WORK_DIR/nix-prefetch-git.out | sed 's/^path is //')
|
||||
|
||||
cat > source.nix << EOF
|
||||
{ fetchgit }: fetchgit {
|
||||
{fetchgit}:
|
||||
fetchgit {
|
||||
url = "$URL";
|
||||
rev = "$REVISION";
|
||||
sha256 = "$SHA";
|
||||
leaveDotGit = true;
|
||||
}
|
||||
EOF
|
||||
|
||||
|
|
Reference in a new issue