Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flake support #3573

Merged
merged 749 commits into from
Jul 16, 2020
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
749 commits
Select commit Hold shift + click to select a range
26dacc0
Add fetchTree builtin function
edolstra Feb 11, 2020
9659940
Test narHash mismatch
edolstra Feb 12, 2020
6208d24
Merge remote-tracking branch 'origin/master' into flakes
edolstra Feb 14, 2020
46a2842
Fix build
edolstra Feb 14, 2020
e375da6
Add 'nix eval-hydra-jobs' command
edolstra Feb 13, 2020
4c24263
nix eval-hydra-jobs: Support parallel evaluation
edolstra Feb 14, 2020
eb19ff3
nix eval-hydra-jobs: Support flakes
edolstra Feb 14, 2020
7072b86
Enable debug symbols
edolstra Feb 15, 2020
144bb3e
Build with large config Boehm GC
edolstra Feb 15, 2020
c6e6306
nix eval-hydra-jobs: Improve error handling
edolstra Feb 17, 2020
b0336e7
nix eval-hydra-job: Progress indicator
edolstra Feb 17, 2020
8a78bcf
LocalStore::checkDerivationOutputs(): Improve error message
edolstra Feb 17, 2020
6529490
nix eval-hydra-jobs: Support job names as aggregate constituents
edolstra Feb 17, 2020
b5e3c04
Fix URL parser
edolstra Feb 18, 2020
5921ca8
Use Nixpkgs 20.03
edolstra Feb 18, 2020
8f9dcfc
Disable the progress bar if $TERM == dumb or unset
edolstra Feb 18, 2020
1351101
nix eval-hydra-jobs: Check aggregate jobs in --dry-run mode
edolstra Feb 18, 2020
edee616
nix eval-hydra-jobs: Fix aggregate derivation name
edolstra Feb 18, 2020
dd032f6
ggRevert "Use Nixpkgs 20.03"
edolstra Feb 18, 2020
50cf77c
Remove outdated shell.nix
edolstra Feb 18, 2020
95468e3
Fix nixpkgs.<attr> warning
edolstra Feb 18, 2020
30c8297
nix eval-hydra-jobs: Add feature
edolstra Feb 19, 2020
f3505a7
Merge remote-tracking branch 'origin/master' into flakes
edolstra Feb 19, 2020
c169ea5
builtins.fetchGit: Fix build when fetching a git worktree
Ma27 Nov 15, 2019
1d99c4a
Merge pull request #3229 from Ma27/flakes-fetchgit-worktree-support
edolstra Feb 19, 2020
4ad5826
nix eval-hydra-jobs: Remove
edolstra Feb 19, 2020
890df32
fetchTree: Use a feature flag
edolstra Feb 20, 2020
d068f9f
Restore subdir support in registries
edolstra Feb 20, 2020
73c9840
Restore subdir -> dir
edolstra Feb 20, 2020
4a4521f
Fix nlohmann::json exception
edolstra Feb 20, 2020
7cd9859
Add backward compatibility default.nix / shell.nix
edolstra Feb 25, 2020
2672a28
nix dev-shell: Add --command option
edolstra Feb 27, 2020
f443d5c
Merge remote-tracking branch 'origin/master' into flakes
edolstra Feb 27, 2020
73b6d87
Merge remote-tracking branch 'origin/master' into flakes
edolstra Mar 4, 2020
5a1514a
Add 'flake' attribute to lock files to denote non-flakes
edolstra Mar 9, 2020
73769b2
Move calling flakes into a Nix helper function (call-flake.nix)
edolstra Mar 9, 2020
cfc3825
Fix flake subdirectory handling
edolstra Mar 10, 2020
97d1c7f
Merge remote-tracking branch 'origin/master' into flakes
edolstra Mar 11, 2020
35f6651
Merge remote-tracking branch 'origin/master' into flakes
edolstra Mar 11, 2020
e188fe7
Move call-flake.nix into libexpr
edolstra Mar 11, 2020
ae91191
Change the lock file to a graph
edolstra Mar 12, 2020
0c2088d
Merge remote-tracking branch 'origin/master' into flakes
edolstra Mar 13, 2020
ea1803e
Run checks
edolstra Mar 13, 2020
073650d
Do a deep fetch
edolstra Mar 13, 2020
3e1abf4
Merge remote-tracking branch 'origin/master' into flakes
edolstra Mar 13, 2020
db34445
Build vendoredCrates in the overlay
edolstra Mar 13, 2020
7304f9f
Merge remote-tracking branch 'origin/master' into flakes
edolstra Mar 13, 2020
34c7645
Fix re-running the fetchGit.sh test
edolstra Mar 16, 2020
fbcb897
Add a test for shallow Git clones
edolstra Mar 16, 2020
2a4e4f6
Unified fetcher caching system
edolstra Mar 17, 2020
d1165d8
Require shallow clones to be requested explicitly
edolstra Mar 17, 2020
38e3601
Git: Use unified caching system
edolstra Mar 17, 2020
1e7ce1d
tarball / github fetchers: Use generic caching system
edolstra Mar 18, 2020
1b49479
Remove flake closure caching
edolstra Mar 18, 2020
c5ec95e
tarball.cc: Use ETags
edolstra Mar 18, 2020
f6ddf48
Get rid of downloadCached()
edolstra Mar 18, 2020
1c127e6
downloadFile(): Use expired file if the download fails
edolstra Mar 19, 2020
8aa354f
Register flake-registry.json as a GC root again
edolstra Mar 19, 2020
1e6e673
flake.nix: Switch to 20.03
edolstra Mar 20, 2020
1537e27
Merge remote-tracking branch 'origin/master' into flakes
edolstra Mar 20, 2020
bc5d484
Fix coverage job
edolstra Mar 20, 2020
4e67f89
Fix GitHub VM test
edolstra Mar 20, 2020
7abe3bd
Merge remote-tracking branch 'origin/master' into flakes
edolstra Mar 23, 2020
3fa1e7d
Fix diffLockFiles()
edolstra Mar 27, 2020
015f8f1
Improve lock file generation
edolstra Mar 27, 2020
bf0b7e5
Add test for circular flake dependencies
edolstra Mar 27, 2020
5f75d56
flake.nix: Support Nixpkgs 19.09
edolstra Mar 28, 2020
2287e2f
nix flake info: Show flake subdirectory
edolstra Mar 28, 2020
2fccef0
Warn about --override-input / --update-input flags that don't match a…
edolstra Mar 28, 2020
4989c04
nix flake info --json: Dump attr-style flakeref
edolstra Mar 28, 2020
2287cc6
Fix segfault
edolstra Mar 30, 2020
4ba4c7f
flake.lock: Update
edolstra Mar 30, 2020
e0a0ae0
Move fetchers from libstore to libfetchers
edolstra Mar 30, 2020
2c692a3
Remove global -I flags
edolstra Mar 30, 2020
3e7aab8
Merge remote-tracking branch 'origin/master' into flakes
edolstra Mar 30, 2020
d15d91c
Makefile cleanup
edolstra Mar 30, 2020
03b56e9
Typo
edolstra Mar 31, 2020
4fdec5f
Merge remote-tracking branch 'origin/master' into flakes
edolstra Mar 31, 2020
36c34c3
Set version properly
edolstra Mar 31, 2020
77ffaea
Add a system-wide flake registry /etc/nix/registry.json
edolstra Apr 1, 2020
bd10a07
Registry: Use a struct instead of a tuple for entries
edolstra Apr 1, 2020
7402451
Support registry entries that must match exactly
edolstra Apr 1, 2020
ed13457
nix flake info --json: Show TreeInfo
edolstra Apr 2, 2020
021634e
nix-env: Refuse to operate on a new-style profile
edolstra Apr 2, 2020
00e1400
Doh
edolstra Apr 2, 2020
12f9379
Add 'path' fetcher
edolstra Apr 2, 2020
6cf91d6
fetchTree: Support integer attributes
edolstra Apr 2, 2020
6d6467d
Move parseTreeInfo()
edolstra Apr 2, 2020
ab47868
Change lastModified to the number of seconds in the epoch
edolstra Apr 2, 2020
e1fc9f6
Improve error message
edolstra Apr 2, 2020
78ad5b3
PathInput: Add some methods
edolstra Apr 2, 2020
a6ff66b
Respect the narHash attribute in more input types
edolstra Apr 2, 2020
485a87f
Don't barf on registry parse errors
edolstra Apr 2, 2020
bb39f2b
Temporary backward compatibility hack
edolstra Apr 2, 2020
9c78f7f
getFlake: In pure mode, check that the argument is an immutable flakeref
edolstra Apr 3, 2020
6e7f252
Make --override-input sticky
edolstra Apr 3, 2020
bf70a04
Publish a tarball containing the crates we depend on
edolstra Apr 3, 2020
e35d83d
Fix job name
edolstra Apr 3, 2020
3473b19
Fix tests.githubFlakes evaluation
edolstra Apr 3, 2020
2f49453
Add FIXME
edolstra Apr 6, 2020
ce3173e
nix flake info --json: Don't evaluate
edolstra Apr 6, 2020
68b43e0
nix flake info: Show resolved URL
edolstra Apr 6, 2020
5495586
Merge remote-tracking branch 'origin/master' into flakes
edolstra Apr 7, 2020
03a4a3c
Merge branch 'flakes' of github.com:NixOS/nix into flakes
edolstra Apr 7, 2020
d103c79
Merge remote-tracking branch 'origin/master' into flakes
edolstra Apr 9, 2020
3aaceeb
Fix build
edolstra Apr 9, 2020
e5ea01c
Remove flake 'edition' field
edolstra Apr 10, 2020
c0c2cb8
Merge remote-tracking branch 'origin/master' into flakes
edolstra Apr 14, 2020
3729df3
Make Registry::read() more robust
edolstra Apr 14, 2020
696c026
Logger: Add method for writing to stdout
edolstra Apr 16, 2020
8f41847
Use Logger::stdout()
edolstra Apr 16, 2020
0858738
Merge remote-tracking branch 'origin/master' into flakes
edolstra Apr 16, 2020
f89349f
Merge remote-tracking branch 'origin/master' into flakes
edolstra Apr 16, 2020
c277231
Use RootValue
edolstra Apr 16, 2020
29043e7
Fix
edolstra Apr 16, 2020
3b489e8
Add 'nix flake show' command
edolstra Apr 16, 2020
7a9687b
SQLiteStmt: Use std::string_view
edolstra Apr 16, 2020
12b7eef
nix flake show: Use evaluation cache
edolstra Apr 16, 2020
a6c4fd0
Hide progress bar on exit
edolstra Apr 16, 2020
9ea4f93
nix flake show: Support apps
edolstra Apr 16, 2020
aa34c0e
nix flake show: Speed up eval cache bigly
edolstra Apr 17, 2020
bdb3226
Add flag to disable the eval cache
edolstra Apr 17, 2020
aaa1095
Use a more space/time-efficient representation for the eval cache
edolstra Apr 17, 2020
69cb9f7
Wrap eval cache creation in a giant transaction
edolstra Apr 17, 2020
3738bcb
Eval cache: Don't replace real attributes with placeholders
edolstra Apr 18, 2020
0725ab2
Store more stuff in the evaluation cache
edolstra Apr 19, 2020
539a9c1
Get rid of the old eval cache
edolstra Apr 20, 2020
42a12f9
Move eval-cache.{cc,hh}
edolstra Apr 20, 2020
b69323f
Revive 'nix search'
edolstra Apr 20, 2020
8c75621
Fix typo
edolstra Apr 20, 2020
c7af247
Path fetcher: Fix store path name
edolstra Apr 22, 2020
ef4d3fc
Merge remote-tracking branch 'origin/master' into flakes
edolstra Apr 23, 2020
0469795
nix search: Show version
edolstra Apr 24, 2020
b4e23dc
nix search: Search legacyPackages recursively
edolstra Apr 27, 2020
b51dff4
Improve error message when an argument is not a flake
edolstra Apr 27, 2020
829dcb3
flake-template.nix: Add defaultPackage
edolstra Apr 27, 2020
6521c92
Improve path:// handling
edolstra Apr 27, 2020
5ada083
Merge remote-tracking branch 'origin/master' into flakes
edolstra Apr 29, 2020
70bcd6a
Evaluation cache: Don't barf in read-only mode
edolstra Apr 29, 2020
9c4e057
nix copy: Move --from / --to check
edolstra Apr 29, 2020
9570036
nix copy: Build derivations
edolstra Apr 29, 2020
5d8504b
rename nix run to nix shell and nix app to nix run
mkenigs Apr 29, 2020
f459ca5
rename run to shell in tests
mkenigs Apr 29, 2020
0038bba
Merge pull request #3551 from mkenigs/rename-commands
edolstra Apr 30, 2020
941f952
Merge remote-tracking branch 'origin/master' into flakes
edolstra May 1, 2020
6f3244c
Merge remote-tracking branch 'origin/master' into flakes
edolstra May 5, 2020
2f8ee45
Merge remote-tracking branch 'origin/master' into flakes
edolstra May 6, 2020
80f4b7b
Merge remote-tracking branch 'origin/master' into flakes
edolstra May 6, 2020
ff394ff
Remove the nixpkgs.<attr> compatibility hack
edolstra May 6, 2020
b0e9b07
Remove obsolete FIXME
edolstra May 6, 2020
1ad71bc
Remove support for old lockfiles and the epoch/uri attributes
edolstra May 6, 2020
14a3a62
Update src/nix/search.cc
edolstra May 7, 2020
bf81dd4
InstallableExpr unused
mkenigs May 9, 2020
9f4cfbb
Refactor installables
mkenigs May 9, 2020
73ee1af
Reorder to build
mkenigs May 9, 2020
91ddee6
nix: Implement basic bash completion
edolstra May 10, 2020
e0c19ee
Add completion for paths
edolstra May 10, 2020
0884f18
Simplify
edolstra May 10, 2020
4c3c638
Cleanup
edolstra May 11, 2020
da310fa
Bash completion: Don't break on ':'
edolstra May 11, 2020
e917332
Shut up warnings while running completers
edolstra May 11, 2020
259ff74
Add completion for installables
edolstra May 11, 2020
27d34ef
When completing flakerefs, only return directories
edolstra May 11, 2020
649c2db
nix flake: Add completion support
edolstra May 11, 2020
437614b
Fix macOS build
edolstra May 12, 2020
b8b2dbf
Fix InstallableCommand
edolstra May 12, 2020
fbade0b
Merge pull request #3583 from mkenigs/InstallablesRefactor
edolstra May 12, 2020
215f09d
Merge pull request #3587 from NixOS/bash-completion
edolstra May 12, 2020
849d396
Update src/libfetchers/git.cc
edolstra May 13, 2020
5f64655
Move registry-related commands from 'nix flake' to 'nix registry'
edolstra May 15, 2020
8fbc854
use nixpkgs#bashInteractive for dev-shell
mkenigs Apr 27, 2020
04821bc
use flake's nixpkgs to find bashInteractive
mkenigs May 5, 2020
0858793
Call lockFlake once and store in _lockedFlake
mkenigs May 13, 2020
ba7d7ed
Create bashInteractive InstallableFlake
mkenigs May 14, 2020
c4beded
rm includes
mkenigs May 16, 2020
00b562c
Fix GitHub test
edolstra May 21, 2020
8d67794
handle circular flake dependencies in list-inputs
mkenigs May 21, 2020
934cc80
circular test
mkenigs May 21, 2020
04fb4e8
Merge branch 'nixpkgs#bashInteractive' of https://github.com/mkenigs/…
edolstra May 28, 2020
6286272
nixpkgsFlakeRef(): Use locked nixpkgs
edolstra May 28, 2020
c3eff22
Merge branch 'store-visited' of https://github.com/mkenigs/nix into f…
edolstra May 28, 2020
17ca997
Merge remote-tracking branch 'origin/master' into flakes
edolstra May 28, 2020
5256bc7
add gitlab libfetcher
kloenk May 28, 2020
56f9abf
Merge branch 'gitlab' of https://github.com/Kloenk/nixos-nix into flakes
edolstra May 29, 2020
5633c09
Factor out GitHub / GitLab commonality
edolstra May 29, 2020
950b468
Remove TreeInfo
edolstra May 29, 2020
0e7f77a
Check revCount / lastModified input attributes if specified
edolstra May 29, 2020
89e0b3e
Move substitution into Input::fetch()
edolstra May 29, 2020
ff1320b
fetchOrSubstituteTree improvements
mkenigs Jun 1, 2020
7680993
Tree ctors
mkenigs Jun 1, 2020
c254254
use Tree ctor
mkenigs Jun 1, 2020
7dbba0a
Merge pull request #3645 from mkenigs/fetchOrSubstituteTree-improvements
edolstra Jun 2, 2020
c20591d
Merge remote-tracking branch 'origin/master' into flakes
edolstra Jun 3, 2020
81cafda
Fix GitHub test
edolstra Jun 3, 2020
f85606c
Merge remote-tracking branch 'origin/master' into flakes
edolstra Jun 4, 2020
959295c
Fix completion script install name
edolstra Jun 4, 2020
108debe
add support for selfhosted gitlab/github
kloenk Jun 4, 2020
d746ef4
Disable eval cache with --impure
edolstra Jun 4, 2020
dc30550
Merge pull request #3660 from Kloenk/selfhost-gitlab
edolstra Jun 4, 2020
810b2c6
nix flake init: Add a '--template' flag
edolstra Jun 4, 2020
ab54031
getDefaultUrl() -> value_or()
edolstra Jun 4, 2020
488ff83
Fix completion of --template
edolstra Jun 5, 2020
9ef6048
diffLockFiles(): Fix assertion failure
edolstra Jun 5, 2020
6470450
Add completion for --update-input
edolstra Jun 8, 2020
e073f2c
nix flake: Require 'flakes' feature
edolstra Jun 8, 2020
e938add
flake.nix: Remove edition
edolstra Jun 9, 2020
1205b41
flake.lock: Update
edolstra Jun 9, 2020
6cfc2db
Fix applyOverride() for github
edolstra Jun 9, 2020
447ea52
FileTransfer: Don't store status since curl already does that
edolstra Jun 9, 2020
29e0748
Show HTTP status message
edolstra Jun 9, 2020
fc6c7af
Add helper function printInputPath()
edolstra Jun 10, 2020
2226e97
Combine lock file update messages
edolstra Jun 10, 2020
195ed43
Preserve 'isFlake' when not updating a lock file entry
edolstra Jun 10, 2020
0c62b4a
Represent 'follows' inputs explicitly in the lock file
edolstra Jun 11, 2020
d15c20e
diffLockFiles(): Show 'follows' changes
edolstra Jun 11, 2020
7db879e
Check 'follows' inputs
edolstra Jun 11, 2020
1524752
Merge remote-tracking branch 'origin/master' into flakes
edolstra Jun 17, 2020
fdff09e
Fix coverage build
edolstra Jun 17, 2020
0a1d3c1
Don't provide 'getFlake' if the 'flakes' feature is not enabled
edolstra Jun 17, 2020
ad66fb0
getFlake -> builtins.getFlake
edolstra Jun 17, 2020
5332c43
InstallableFlake: Show all possible attribute names
edolstra Jun 17, 2020
2e4bd78
nix eval: Add --apply flag for post-processing the result
edolstra Jun 17, 2020
5d69bbf
Simplify shell.nix and default.nix
edolstra Jun 17, 2020
3d49219
github: Respect default branch
edolstra Jun 18, 2020
377345e
Remove unneeded #include
edolstra Jun 18, 2020
334e26b
nix flake check: Don't build apps
edolstra Jun 22, 2020
09fc06d
nix flake init: Use git add --force
edolstra Jun 23, 2020
adf2fbb
Merge remote-tracking branch 'origin/master' into flakes
edolstra Jun 26, 2020
bc03c6f
Move App
edolstra Jun 29, 2020
ca94686
Fix bash completion
edolstra Jun 29, 2020
b681408
Factor out EvalCache::forceDerivation()
edolstra Jun 29, 2020
50f13b0
EvalCache: Store string contexts
edolstra Jun 29, 2020
26cf0c6
nix run: Use packages/legacyPackages as fallback if there is no app d…
edolstra Jun 29, 2020
7d554f2
Support building flakes from a shallow Git repo
edolstra Jul 1, 2020
d746503
Add --inputs-from to use flake inputs as registry entries
edolstra Jul 1, 2020
6ff9aa8
Don't process an option if any of its arguments need completion
edolstra Jul 1, 2020
54712aa
Merge remote-tracking branch 'origin/master' into flakes
edolstra Jul 6, 2020
cd8eb8a
nix develop: Fall back to "bash" if nixpkgs#bashInteractive is unavai…
edolstra Jul 6, 2020
68f524d
nix develop: Support derivations with multiple outputs
edolstra Jul 6, 2020
1ab9da9
Merge remote-tracking branch 'origin/master' into flakes
edolstra Jul 7, 2020
9223603
Merge remote-tracking branch 'origin/master' into flakes
edolstra Jul 8, 2020
cf9f339
Fix gitlab-fetcher to obtain tags and branches
Ma27 Jul 13, 2020
832e111
Merge remote-tracking branch 'origin/master' into flakes
edolstra Jul 14, 2020
da3aea2
EvalCache: Ignore SQLite errors
edolstra Jul 14, 2020
298ff6a
Merge pull request #3809 from Ma27/gitlab-refs
edolstra Jul 14, 2020
e3c2b00
Make InstallableStorePath behave consistently with InstallableValue
edolstra Jul 15, 2020
94eb5fa
Clean up RealiseMode
edolstra Jul 15, 2020
dfe8f3e
nix why-depends: Fix misleading message
edolstra Jul 15, 2020
3624c04
nix: Add --derivation flag to operate on .drv paths
edolstra Jul 15, 2020
2d6d53b
nix: Fix examples
edolstra Jul 15, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: cachix/install-nix-action@v8
- run: nix-build release.nix --arg nix '{ outPath = ./.; revCount = 123; shortRev = "abcdefgh"; }' --arg systems '[ builtins.currentSystem ]' -A installerScript -A perlBindings
#- run: nix flake check
- run: nix-build -A checks.$(if [[ `uname` = Linux ]]; then echo x86_64-linux; else echo x86_64-darwin; fi)
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ makefiles = \
src/resolve-system-dependencies/local.mk \
scripts/local.mk \
corepkgs/local.mk \
misc/bash/local.mk \
misc/systemd/local.mk \
misc/launchd/local.mk \
misc/upstart/local.mk \
Expand Down
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ AC_PATH_PROG(flex, flex, false)
AC_PATH_PROG(bison, bison, false)
AC_PATH_PROG(dot, dot)
AC_PATH_PROG(lsof, lsof, lsof)
NEED_PROG(jq, jq)


AC_SUBST(coreutils, [$(dirname $(type -p cat))])
Expand Down
3 changes: 3 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
(import (fetchTarball https://github.com/edolstra/flake-compat/archive/master.tar.gz) {
src = builtins.fetchGit ./.;
}).defaultNix
28 changes: 28 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading