Eelco Dolstra
6d7efcfaeb
Store SourceInfo in Flake and NonFlake
...
This deduplicates some shared fields. Factoring out the commonality is
useful in places like makeFlakeValue().
2019-05-28 13:06:43 +02:00
Nick Van den Broeck
4d030a8d96
Added nonFlakeRequires test
...
Fixes #2888
2019-05-28 10:51:45 +02:00
Eelco Dolstra
f0d6d67af9
Prevent the global registry from being GC'ed
...
Issue #2868 .
2019-05-22 23:43:58 +02:00
Eelco Dolstra
df3f5a78d5
Refactor downloadCached() interface
2019-05-22 23:36:29 +02:00
Eelco Dolstra
66f1d7ee95
Fetch the flake registry from the NixOS/flake-registry repo
2019-05-22 22:56:46 +02:00
Eelco Dolstra
e414bde6f9
Check the flake epoch
...
Closes #2883 .
2019-05-22 14:31:40 +02:00
Eelco Dolstra
2468672e30
Improve FlakeCommand
...
It now handles commonality like calling getFlake() and resolving
relative local flake refs.
Fixes #2822 .
2019-05-22 14:03:28 +02:00
Eelco Dolstra
5990b86391
Use warn(), tweak messages
2019-05-21 15:03:54 +02:00
Eelco Dolstra
20a1a65d37
Only rewrite the lockfile if it changed
...
This removes spurious warnings about failure to write the lockfile.
2019-05-21 14:55:43 +02:00
Nick Van den Broeck
ef6ae61503
Lockfile handling in resolveFlake
is fixed
2019-05-17 14:50:10 +02:00
Nick Van den Broeck
98f20dee41
Give errors in resolveFlake
...
If DontUpdate but the lockfile isn't correct
2019-05-16 15:02:25 +02:00
Nick Van den Broeck
d9ad3723d5
Fixed issue 65
...
lockfile updating
2019-05-16 15:02:05 +02:00
Eelco Dolstra
5c34d66538
Make flakes work with 'nix build --store ...'
...
It was getting confused between logical and real store paths.
Also, make fetchGit and fetchMercurial update allowedPaths properly.
(Maybe the evaluator, rather than the caller of the evaluator, should
apply toRealPath(), but that's a bigger change.)
2019-05-15 15:38:24 +02:00
Nick Van den Broeck
4c9ebd20d7
One FIXME was already fixed
2019-05-15 08:10:46 +02:00
Nick Van den Broeck
d209bdcd08
Fixed issue #47
...
Content hashes
2019-05-09 14:27:55 +02:00
Eelco Dolstra
455aa8d9ea
Add newline at end of lockfile
...
Suggested by @grahamc.
2019-05-08 18:28:01 +02:00
Eelco Dolstra
54e54db2e2
Merge remote-tracking branch 'tweag/flake-test' into flakes
2019-05-08 13:55:55 +02:00
Eelco Dolstra
77e1f9010c
Export missing rev/shortRev attributes
2019-05-08 13:38:32 +02:00
Eelco Dolstra
9d07c3717b
updateLockFile: Do "git add" in a slightly nicer way
...
"--intent-to-add" ensures the change shows up in "git diff".
2019-05-08 13:26:20 +02:00
Eelco Dolstra
ddd42b7e94
Fix immutable flakeref construction
...
We were appending ref/revs incorrectly for the IsGit case (by
appending /<ref>/<rev> rather than ?ref=<ref>&rev=<rev).
2019-05-07 23:32:09 +02:00
Eelco Dolstra
3c171851a8
Make the URL/path of the global flake registry configurable
2019-05-07 22:49:13 +02:00
Nick Van den Broeck
201f92e02c
Fixed Flake data type and flake fetching
2019-05-07 05:57:08 +02:00
Eelco Dolstra
f8c4742c2f
Fix 'git add' when subdir is empty
2019-05-03 13:15:13 +02:00
Eelco Dolstra
2aafa6901e
Merge remote-tracking branch 'tweag/subdir' into flakes
2019-05-03 12:54:59 +02:00
Nick Van den Broeck
e0d4aa75fc
Fixed compile errors
2019-05-02 08:40:00 +02:00
Eelco Dolstra
a37436d792
Accept empty directories
2019-05-01 20:44:30 +02:00
Eelco Dolstra
ab9e47284a
Improve error message
2019-05-01 20:44:30 +02:00
Nick Van den Broeck
43408d3cd6
flake.lock now uses flakeRef.subdir
2019-05-01 16:24:33 +02:00
Nick Van den Broeck
9b3069a88c
Fuzzymatching
...
Fixed issue #61
2019-05-01 12:59:35 +02:00
Nick Van den Broeck
eba85e2367
WIP: still need to adapt flakeref parsing
2019-05-01 12:59:12 +02:00
Eelco Dolstra
4588a6ff3c
Merge remote-tracking branch 'tweag/flakeFlags' into flakes
2019-04-30 12:46:54 +02:00
Nick Van den Broeck
24b35bf9e7
Fixed issue #13
2019-04-30 11:26:45 +02:00
Nick Van den Broeck
35d1c95f7f
Fix flag registry order
2019-04-30 11:04:31 +02:00
Nick Van den Broeck
e9c42c06ef
Fixed lookupFlake bug
2019-04-25 10:50:59 +02:00
Eelco Dolstra
21d5abfc14
Merge remote-tracking branch 'tweag/flake-clone' into flakes
2019-04-24 12:47:35 +02:00
Nick Van den Broeck
e51abb6631
Changed some names
2019-04-19 14:23:35 +02:00
Eelco Dolstra
160ce18a0e
Improve missing flake.nix error message
2019-04-19 11:43:56 +02:00
Eelco Dolstra
6960ee929d
Clean up exportGit argument handling
2019-04-19 11:34:23 +02:00
Eelco Dolstra
46cb15df9b
Fix assertion failure in FlakeRef::to_string()
2019-04-19 11:16:14 +02:00
Eelco Dolstra
6e4210d8ce
Fix assertion failure
2019-04-19 10:58:08 +02:00
Eelco Dolstra
160b974fb0
Fix mutability check
2019-04-17 13:54:06 +02:00
Nick Van den Broeck
b42ba08fc8
Add command flake clone
2019-04-17 13:31:09 +02:00
Eelco Dolstra
939bee06cd
Pass a flake to itself as "self"
2019-04-16 16:29:44 +02:00
Eelco Dolstra
260527a90c
Use the lock file
2019-04-16 16:18:47 +02:00
Eelco Dolstra
3d0e81051f
Fix lock file generation
...
Before:
"requires": {
"nixpkgs": {
"uri": "nixpkgs"
}
},
After:
"requires": {
"nixpkgs": {
"uri": "github:edolstra/nixpkgs/f10e8a02eb7fa2b4a070f30cf87f4efcc7f3186d"
}
},
2019-04-16 15:43:55 +02:00
Eelco Dolstra
8c4e759efd
updateLockFile(): Make sure Git can see flake.lock
2019-04-16 15:11:17 +02:00
Eelco Dolstra
60834492ae
Update lock files from InstallableFlake::toValue()
...
This ensures that the lock file is updated *before* evaluating it, and
that it gets updated for any nix command, not just 'nix build'.
Also, while computing the lock file, allow arbitrary registry lookups,
not just at top-level.
Also, improve some error messages slightly.
2019-04-16 15:02:02 +02:00
Eelco Dolstra
7b312a8762
Pass stuff by reference
2019-04-16 14:27:54 +02:00
Eelco Dolstra
e1d73edb10
writeLockFile(): Emit empty objects rather than null
2019-04-16 14:23:10 +02:00
Eelco Dolstra
ed9d725392
getFlake(): Use impureIsAllowed
...
This fixes 'nix build nixpkgs:hello' without --impure.
2019-04-16 14:16:20 +02:00