Skip to content

Instantly share code, notes, and snippets.

@b-camacho
Created December 5, 2024 21:26
Show Gist options
  • Save b-camacho/9aa7755917d62e40337f489b34177c0d to your computer and use it in GitHub Desktop.
Save b-camacho/9aa7755917d62e40337f489b34177c0d to your computer and use it in GitHub Desktop.
# ***
# Pull from gitlab first
# ***
$ outputs/out/bin/nix eval --extra-experimental-features nix-command --debug --impure --raw --expr '(
builtins.fetchGit {
url = "git@gitlab.com:b-camacho/test-lfs.git";
rev = "4537b997a7e9eb55de8003d61555b8dd937aa849";
ref = "main";
lfs = true;
}
).outPath'
evaluating file '<nix/derivation-internal.nix>'
locking path '/home/bmc/.cache/nix/gitv3/0kngmiv0xmj1cq2svz1ail7c9px3yv428aglxpq8bpdhny51dyi6'
lock acquired on '/home/bmc/.cache/nix/gitv3/0kngmiv0xmj1cq2svz1ail7c9px3yv428aglxpq8bpdhny51dyi6.lock'
fetching Git repository 'ssh://git@gitlab.com/b-camacho/test-lfs.git'...
lock released on '/home/bmc/.cache/nix/gitv3/0kngmiv0xmj1cq2svz1ail7c9px3yv428aglxpq8bpdhny51dyi6.lock'
did not find cache entry for 'gitLastModified:{"rev":"4537b997a7e9eb55de8003d61555b8dd937aa849"}'
did not find cache entry for 'gitRevCount:{"rev":"4537b997a7e9eb55de8003d61555b8dd937aa849"}'
getting Git revision count of 'ssh://git@gitlab.com/b-camacho/test-lfs.git'...
using revision 4537b997a7e9eb55de8003d61555b8dd937aa849 of repo 'ssh://git@gitlab.com/b-camacho/test-lfs.git'
did not find cache entry for 'fetchToStore:{"fingerprint":"4537b997a7e9eb55de8003d61555b8dd937aa849;e;l","method":"nar","name":"source","path":"/","store":"/nix/store"}'
copying '«git+ssh://git@gitlab.com/b-camacho/test-lfs.git?exportIgnore=1&lfs=1&ref=main&rev=4537b997a7e9eb55de8003d61555b8dd937aa849»«unknown»/' to the store...
acquiring write lock on '/nix/var/nix/temproots/1223003'
locking path '/nix/store/97j6d9l21v76lhknm2r3000wfknw8260-source'
lock acquired on '/nix/store/97j6d9l21v76lhknm2r3000wfknw8260-source.lock'
lock released on '/nix/store/97j6d9l21v76lhknm2r3000wfknw8260-source.lock'
$ du -sh /nix/store/97j6d9l21v76lhknm2r3000wfknw8260-source/big.chung
9.6M /nix/store/97j6d9l21v76lhknm2r3000wfknw8260-source/big.chung
# ***
# gitlab worked, now try github
# ***
$ outputs/out/bin/nix eval --extra-experimental-features nix-command --debug --impure --raw --expr '(
builtins.fetchGit {
url = "git@github.com:b-camacho/test-lfs.git";
rev = "68abce321bf9a92f0877cac7b91bd04be5872473";
ref = "main";
lfs = true;
}
).outPath'
evaluating file '<nix/derivation-internal.nix>'
locking path '/home/bmc/.cache/nix/gitv3/11p4a04zc12xhlzvg0rbn5wqpq6bwn1lw7qq9am80n5fjl1p8a3g'
lock acquired on '/home/bmc/.cache/nix/gitv3/11p4a04zc12xhlzvg0rbn5wqpq6bwn1lw7qq9am80n5fjl1p8a3g.lock'
fetching Git repository 'ssh://git@github.com/b-camacho/test-lfs.git'...
lock released on '/home/bmc/.cache/nix/gitv3/11p4a04zc12xhlzvg0rbn5wqpq6bwn1lw7qq9am80n5fjl1p8a3g.lock'
did not find cache entry for 'gitLastModified:{"rev":"68abce321bf9a92f0877cac7b91bd04be5872473"}'
did not find cache entry for 'gitRevCount:{"rev":"68abce321bf9a92f0877cac7b91bd04be5872473"}'
getting Git revision count of 'ssh://git@github.com/b-camacho/test-lfs.git'...
using revision 68abce321bf9a92f0877cac7b91bd04be5872473 of repo 'ssh://git@github.com/b-camacho/test-lfs.git'
did not find cache entry for 'fetchToStore:{"fingerprint":"68abce321bf9a92f0877cac7b91bd04be5872473;e;l","method":"nar","name":"source","path":"/","store":"/nix/store"}'
copying '«git+ssh://git@github.com/b-camacho/test-lfs.git?exportIgnore=1&lfs=1&ref=main&rev=68abce321bf9a92f0877cac7b91bd04be5872473»«unknown»/' to the store...
acquiring write lock on '/nix/var/nix/temproots/1225294'
locking path '/nix/store/gqljikbabbpbscg10vx56glf54699dk6-source'
lock acquired on '/nix/store/gqljikbabbpbscg10vx56glf54699dk6-source.lock'
lock released on '/nix/store/gqljikbabbpbscg10vx56glf54699dk6-source.lock'
copied '«git+ssh://git@github.com/b-camacho/test-lfs.git?exportIgnore=1&lfs=1&ref=main&rev=68abce321bf9a92f0877cac7b91bd04be5872473»«unknown»/' to '/nix/store/gqljikbabbpbscg10vx56glf54699dk6-source'
$ du -sh /nix/store/gqljikbabbpbscg10vx56glf54699dk6-source/big.chung
9.6M /nix/store/gqljikbabbpbscg10vx56glf54699dk6-source/big.chung
# ***
# nice, github worked too!
# ***
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment