Age | Commit message (Collapse) | Author |
|
Make function arguments retain position info
|
|
|
|
This provides a pluggable mechanism for defining new fetchers. It adds
a builtin function 'fetchTree' that generalizes existing fetchers like
'fetchGit', 'fetchMercurial' and 'fetchTarball'. 'fetchTree' takes a
set of attributes, e.g.
fetchTree {
type = "git";
url = "https://example.org/repo.git";
ref = "some-branch";
rev = "abcdef...";
}
The existing fetchers are just wrappers around this. Note that the
input attributes to fetchTree are the same as flake input
specifications and flake lock file entries.
All fetchers share a common cache stored in
~/.cache/nix/fetcher-cache-v1.sqlite. This replaces the ad hoc caching
mechanisms in fetchGit and download.cc (e.g. ~/.cache/nix/{tarballs,git-revs*}).
This also adds support for Git worktrees (c169ea59049f861aaba429f48b828d0820b74d1d).
|
|
This allows querying the location of function arguments. E.g.
builtins.unsafeGetAttrPos "x" (builtins.functionArgs ({ x }: null))
=> { column = 57; file = "/home/infinisil/src/nix/inst/test.nix"; line = 1; }
|
|
(cherry picked from commit 2c692a3b144523bca68dd6de618124ba6c9bb332)
|
|
|
|
Before this change it would be false for all evaluations but the first.
Now it follows the input argument (as it should).
|
|
|
|
|
|
|
|
|
|
This fixes fetching repositories with no submodules and also cleans up
.git files in checkouts.
|
|
|
|
|
|
Extracted from 678301072f05b650dc15c5edb4c25f08f0d6cace.
|
|
|
|
|
|
Fixes
error: derivation '/nix/store/klivma7r7h5lndb99f7xxmlh5whyayvg-zlib-1.2.11.drv' has incorrect output '/nix/store/fv98nnx5ykgbq8sqabilkgkbc4169q05-zlib-1.2.11-dev', should be '/nix/store/adm7pilzlj3z5k249s8b4wv3scprhzi1-zlib-1.2.11-dev'
|
|
As fromTOML supports \u and \U escapes, bring fromJSON on par. As JSON defaults
to UTF-8 encoding (every JSON parser must support UTF-8), this change parses the
`\u hex hex hex hex` sequence (\u followed by 4 hexadecimal digits) into an
UTF-8 representation.
Add a test to verify correct parsing, using all escape sequences from json.org.
|
|
Having a colon in the path may cause issues, and having the hash
function indicated isn't actually necessary. We now verify the path
format in the tests to prevent regressions.
|
|
Fixes #3270.
|
|
|
|
|
|
Closes #3256
|
|
|
|
https://hydra.nixos.org/build/107724274
|
|
|
|
This is no longer needed.
|
|
Ensure enough space in attrset bindings
|
|
Fixes #3239.
|
|
|
|
$TMPDIR isn't necessarily set and would cause this test to fail.
|
|
Derivations that want to use recursion should now set
requiredSystemFeatures = [ "recursive-nix" ];
to make the daemon socket appear.
Also, Nix should be configured with "experimental-features =
recursive-nix".
|
|
|
|
|
|
|
|
This is an alternative to the IN_NIX_SHELL environment variable,
allowing the expression to adapt itself to nix-shell without
triggering those adaptations when used as a dependency of another
shell.
Closes #3147
|
|
|
|
|
|
Experimental features are now opt-in. There is currently one
experimental feature: "nix-command" (which enables the "nix"
command. This will allow us to merge experimental features more
quickly, without committing to supporting them indefinitely.
Typical usage:
$ nix build --experimental-features 'nix-command flakes' nixpkgs#hello
(cherry picked from commit 8e478c234100cf03ea1b777d4bd42a9be7be9e8c,
without the "flakes" feature)
|
|
|
|
This is already done by the installer, so no need to do it again.
|
|
'nix-daemon' now creates subdirectories for users when they first
connect.
Fixes #509 (CVE-2019-17365).
Should also fix #3127.
|
|
If the user invokes nix with --trace-function-calls it means that they
want to see the trace.
|
|
|
|
|
|
|
|
It doesn't seem very reliable on ZFS.
|
|
|
|
|