aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-01-10Merge pull request #3308 from trusktr/patch-1Eelco Dolstra
Add a link to official channels in the docs.
2020-01-10Merge pull request #3307 from yorickvP/yorickvp/nlohmann-fromJSONEelco Dolstra
builtins.fromJSON: use nlohmann/json parser instead of custom parser
2020-01-09Add link to official channels in nix-channel command refJoe Pea
2020-01-09Add a link to official channels in the Channels chapter.Joe Pea
2020-01-09json-to-value: use unique_ptr instead of raw pointersYorick van Pelt
2020-01-09builtins.fromJSON: use nlohmann/json parser instead of custom parserYorick van Pelt
2020-01-07Merge pull request #3305 from knl/interpret-u-escapes-in-JSON-stringsEelco Dolstra
Add support for unicode escape sequences in fromJSON
2020-01-07Add support for \u escape in fromJSONNikola Knezevic
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.
2020-01-07Remove redundant check in parseJSONStringNikola Knezevic
2020-01-06Fix use of uninitialized store pathEelco Dolstra
Fixes 'building of '/nix/store/00000000000000000000000000000000-': ...'.
2020-01-06Merge pull request #3303 from LnL7/darwin-sandboxEelco Dolstra
build: fix sandboxing on darwin
2020-01-05build: fix sandboxing on darwinDaiderd Jordan
Starting ba87b08f8529e4d9f8c58d8c625152058ceadb75 getEnv now returns an std::optional which means these getEnv() != "" conditions no longer happen if the variables are not defined.
2020-01-05Merge pull request #3302 from LnL7/darwin-repair-with-sandboxEelco Dolstra
build: fix path repairing with the darwin sandbox
2020-01-05Hide FunctionCallTrace constructor/destructorEelco Dolstra
This prevents them from being inlined. On gcc 9, this reduces the stack size needed for nix-instantiate '<nixpkgs>' -A texlive.combined.scheme-full --dry-run from 12.9 MiB to 4.8 MiB.
2020-01-04build: fix path repairing when hash rewriting is requiredDaiderd Jordan
Handle store path repairing on darwin when sandboxing is enabled. Unlike on linux sandboxing on darwin still requires hash rewriting.
2020-01-04build: recover store path when replacing failsDaiderd Jordan
This shouldn't happen in normal circumstances, but just in case attempt to move the temporary path back if possible.
2020-01-03Merge pull request #3298 from edef1c/passasfile-noprefixEelco Dolstra
passAsFile: leave out the hash prefix
2020-01-02passAsFile: leave out the hash prefixedef
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.
2020-01-03Merge pull request #3297 from edef1c/passasfile-hashEelco Dolstra
passAsFile: hash the attribute name instead of numbering sequentially
2020-01-02passAsFile: hash the attribute name instead of numbering sequentiallyPuck Meerburg
This makes the paths consistent without relying on ordering. Co-authored-by: edef <edef@edef.eu>
2020-01-02Merge pull request #3296 from grahamc/export-reference-graphEelco Dolstra
exportReferencesGraph: support working
2020-01-01exportReferencesGraph: support workingGraham Christensen
Before, we would get: [deploy@bastion:~]$ nix-store -r /nix/store/grfnl76cahwls0igd2by2pqv0dimi8h2-nixos-system-eris-19.09.20191213.03f3def.drv these derivations will be built: /nix/store/3ka4ihvwh6wsyhpd2qa9f59506mnxvx1-initrd-linux-4.19.88.drv /nix/store/ssxwmll7v21did1c8j027q0m8w6pg41i-unit-prometheus-alertmanager-irc-notifier.service.drv /nix/store/mvyvkj46ay7pp7b1znqbkck2mq98k0qd-unit-script-network-local-commands-start.drv /nix/store/vsl1y9mz38qfk6pyirjwnfzfggz5akg6-unit-network-local-commands.service.drv /nix/store/wi5ighfwwb83fdmav6z6n2fw6npm9ffl-unit-prometheus-hydra-exporter.service.drv /nix/store/x0qkv535n75pbl3xn6nn1w7qkrg9wwyg-unit-prometheus-packet-sd.service.drv /nix/store/lv491znsjxdf51xnfxh9ld7r1zg14d52-unit-script-packet-sd-env-key-pre-start.drv /nix/store/nw4nzlca49agsajvpibx7zg5b873gk9f-unit-script-packet-sd-env-key-start.drv /nix/store/x674wwabdwjrkhnykair4c8mpxa9532w-unit-packet-sd-env-key.service.drv /nix/store/ywivz64ilb1ywlv652pkixw3vxzfvgv8-unit-wireguard-wg0.service.drv /nix/store/v3b648293g3zl8pnn0m1345nvmyd8dwb-unit-script-acme-selfsigned-status.nixos.org-start.drv /nix/store/zci5d3zvr6fgdicz6k7jjka6lmx0v3g4-unit-acme-selfsigned-status.nixos.org.service.drv /nix/store/f6pwvnm63d0kw5df0v7sipd1rkhqxk5g-system-units.drv /nix/store/iax8071knxk9c7krpm9jqg0lcrawf4lc-etc.drv /nix/store/grfnl76cahwls0igd2by2pqv0dimi8h2-nixos-system-eris-19.09.20191213.03f3def.drv error: invalid file name 'closure-init-0' in 'exportReferencesGraph' This was tough to debug, I didn't figure out which one was broken until I did: nix-store -r /nix/store/grfnl76cahwls0igd2by2pqv0dimi8h2-nixos-system-eris-19.09.20191213.03f3def.drv 2>&1 | grep nix/store | xargs -n1 nix-store -r and then looking at the remaining build graph: $ nix-store -r /nix/store/grfnl76cahwls0igd2by2pqv0dimi8h2-nixos-system-eris-19.09.20191213.03f3def.drv these derivations will be built: /nix/store/3ka4ihvwh6wsyhpd2qa9f59506mnxvx1-initrd-linux-4.19.88.drv /nix/store/grfnl76cahwls0igd2by2pqv0dimi8h2-nixos-system-eris-19.09.20191213.03f3def.drv error: invalid file name 'closure-init-0' in 'exportReferencesGraph' and knowing the initrd build is before the system, then: $ nix show-derivation /nix/store/3ka4ihvwh6wsyhpd2qa9f59506mnxvx1-initrd-linux-4.19.88.drv { "/nix/store/3ka4ihvwh6wsyhpd2qa9f59506mnxvx1-initrd-linux-4.19.88.drv": { [...] "exportReferencesGraph": "closure-init-0 /nix/store/...-stage-1-init.sh closure-mdadm.conf-1 /nix/store/...-mdadm.conf closure-ubuntu.conf-2 ...", [...] } } I then searched the repo for "in 'exportReferencesGraph'", found this recently updated regex, and realized it was missing a "-".
2019-12-25Merge pull request #3289 from michaelforney/tar-JEelco Dolstra
Pass -J to tar for xz decompression
2019-12-22Pass -J to tar for xz decompressionMichael Forney
Some tar implementations can't auto-detect compression formats, so they must be specified explicitly.
2019-12-23Merge pull request #3284 from puffnfresh/wslEelco Dolstra
Disable use-sqlite-wal under WSL
2019-12-23Merge pull request #3287 from michaelforney/cp-flagEelco Dolstra
Pass -P to cp to preserve symlinks
2019-12-21Pass -P to cp to preserve symlinksMichael Forney
This is commonly the default behavior with -R, but POSIX leaves the default unspecified.
2019-12-21Disable use-sqlite-wal under WSLBrian McKenna
Before: $ nix-channel --update unpacking channels... warning: SQLite database '/nix/var/nix/db/db.sqlite' is busy (SQLITE_PROTOCOL) warning: SQLite database '/nix/var/nix/db/db.sqlite' is busy (SQLITE_PROTOCOL) warning: SQLite database '/nix/var/nix/db/db.sqlite' is busy (SQLITE_PROTOCOL) warning: SQLite database '/nix/var/nix/db/db.sqlite' is busy (SQLITE_PROTOCOL) warning: SQLite database '/nix/var/nix/db/db.sqlite' is busy (SQLITE_PROTOCOL) After: $ inst/bin/nix-channel --update unpacking channels... created 1 symlinks in user environment I've seen complaints that "sandbox" caused problems under WSL but I'm having no problems. I think recent changes could have fixed the issue.
2019-12-19tarfile.cc: Restore timestampsEelco Dolstra
This is needed to get the lastModified attribute of GitHub flakes.
2019-12-19tarfile.cc: Don't change the cwdEelco Dolstra
Nix is multithreaded so it's not safe to change the cwd.
2019-12-19tarfile.cc: Style fixesEelco Dolstra
2019-12-19Merge branch 'libarchive' of https://github.com/yorickvP/nixEelco Dolstra
2019-12-19Cleanup: Remove unused makeDeb/makeRPM functionsEelco Dolstra
2019-12-18nix make-content-addressable: Add --json flagEelco Dolstra
Fixes #3274.
2019-12-17Add priority setting to storesEelco Dolstra
This allows overriding the priority of substituters, e.g. $ nix-store --store ~/my-nix/ -r /nix/store/df3m4da96d84ljzxx4mygfshm1p0r2n3-geeqie-1.4 \ --substituters 'http://cache.nixos.org?priority=100 daemon?priority=10' Fixes #3264.
2019-12-16nix-store -r: Handle symlinks to store pathsEelco Dolstra
Fixes #3270.
2019-12-16StorePath::new(): Check store directoryEelco Dolstra
2019-12-15Fix cargo testEelco Dolstra
2019-12-15Tweak error messageEelco Dolstra
2019-12-15Merge branch 'limit_depth_resolveExprPath' of https://github.com/d-goldin/nixEelco Dolstra
2019-12-14Merge pull request #3269 from xzfc/nix-shellEelco Dolstra
nix-shell: don't check for "nix-shell" in shebang script name
2019-12-14Fix progress barEelco Dolstra
2019-12-14nix-shell: don't check for "nix-shell" in shebang script nameAlbert Safin
2019-12-13Move some codeEelco Dolstra
2019-12-13Don't leak exceptionsEelco Dolstra
2019-12-13Improve gzip error messageEelco Dolstra
2019-12-13Get rid of CBoxEelco Dolstra
2019-12-13Validate tarball componentsEelco Dolstra
2019-12-13Simplify tarball testEelco Dolstra
2019-12-13bugfix: Adding depth limit to resolveExprPathDima
There is no termination condition for evaluation of cyclical expression paths which can lead to infinite loops. This addresses one spot in the parser in a similar fashion as utils.cc/canonPath does. This issue can be reproduced by something like: ``` ln -s a b ln -s b a nix-instantiate -E 'import ./a' ```