about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2017-12-07 Provide random access to cached NARsEelco Dolstra5-104/+198
E.g. $ time nix cat-store --store https://cache.nixos.org?local-nar-cache=/tmp/nars \ /nix/store/b0w2hafndl09h64fhb86kw6bmhbmnpm1-blender-2.79/share/icons/hicolor/scalable/apps/blender.svg > /dev/null real 0m4.139s $ time nix cat-store --store https://cache.nixos.org?local-nar-cache=/tmp/nars \ /nix/store/b0w2hafndl09h64fhb86kw6bmhbmnpm1-blender-2.79/share/icons/hicolor/scalable/apps/blender.svg > /dev/null real 0m0.024s (Before, the second call took ~0.220s.) This will use a NAR listing in /tmp/nars/b0w2hafndl09h64fhb86kw6bmhbmnpm1.ls containing all metadata, including the offsets of regular files inside the NAR. Thus, we don't need to read the entire NAR. (We do read the entire listing, but that's generally pretty small. We could use a SQLite DB by borrowing some more code from nixos-channel-scripts/file-cache.hh.) This is primarily useful when Hydra is serving files from an S3 binary cache, in particular when you have giant NARs. E.g. we had some 12 GiB NARs, so accessing individuals files was pretty slow.
2017-12-07 nix ls-{nar,store}: Return offset of files in the NAR if knownEelco Dolstra2-7/+10
E.g. $ nix ls-store --json --recursive --store https://cache.nixos.org /nix/store/b0w2hafndl09h64fhb86kw6bmhbmnpm1-blender-2.79 \ | jq .entries.bin.entries.blender.narOffset 400
2017-12-06 ssh-store: fix length when writing narDaiderd Jordan1-3/+3
This fixes nix copy and other things that use copyStorePath.
2017-12-05 Merge branch 'fetchGit-fast-revision-update'Shea Levy1-24/+35
2017-12-04 Simplify build by including nlohmann/json.hppEelco Dolstra1-0/+14723
2017-12-04 Fix #1635.Eelco Dolstra1-3/+18
2017-11-29 Fix "Unexpected EOF reading a line" errorLinus Heckemann1-2/+2
propagated-user-env-packages files in nixpkgs aren't all terminated by newlines, as buildenv expected. Now it does not require a terminating newline; note that this introduces a behaviour change: propagated user env packages may now be spread across multiple lines. However, nix 1.11.x still expects them to be on a single line so this shouldn't be used in nixpkgs for now.
2017-11-28 Show log tail when a remote build failsEelco Dolstra1-2/+2
2017-11-25 build-remote: Fix missing log outputaszlig1-1/+1
The storeUri variable in the build-remote hook is declared very much to the start of the main function and a bunch of lines later, the same variable gets checked via hasPrefix() but it gets assigned *after* that check when the most suitable machine for the build was choosen. So I guess this was just a typo in d16fd2497374671c92cb877f9570d65783a7 and what we really want is to either checkd the prefix *after* assigning storeUri or use bestMachine->storeUri directly. I choose the latter, because the former could introduce even more regressions if the try block where the variable gets assigned terminates early. Nevertheless, the reason why the log output didn't work is because hasPrefix() checked for "ssh://" in front of storeUri, but if the storeUri isn't set correctly (or at all), we don't get the log file descriptor set up properly, leading to no log output. I've adjusted the remote-builds test to include a regression test for this, so that we can make sure we get a build output when using remote builds. In addition to that I've tested this with two of my build farms and the build logs are emitted correctly again. Signed-off-by: aszlig <aszlig@nix.build>
2017-11-24 nix path-info: Show URL of NARs in binary cachesEelco Dolstra1-0/+2
2017-11-24 nix-shell/nix-build: Support .drv files againEelco Dolstra3-2/+33
Fixes #1663. Also handle '!<output-name>' (#1694).
2017-11-24 fetchGit: Ignore tarballTtl if rev is set and not in the repo.Shea Levy1-24/+35
Fixes #1697.
2017-11-21 fetchGit/fetchMercurial: Fix directory inclusion checkEelco Dolstra2-4/+6
E.g. the existence of .gitignore would cause .git to be included.
2017-11-21 Propagate flags like --sandbox to the daemon properlyEelco Dolstra3-6/+12
2017-11-20 nix eval --raw: Use coerceToString()Eelco Dolstra1-2/+6
Thus, $ nix eval --raw '("foo")' foo $ nix eval --raw nixpkgs.hello /nix/store/1y6ckg6khrdsvll54s5spcmf3w6ka9k4-hello-2.10 $ nix eval --raw '(/etc/resolv.conf)' /nix/store/vml92ama92i8mz013nny461mlvg8mvap-resolv.conf
2017-11-20 nix run: Fix "flag '--command' requires 2 argument(s)"Eelco Dolstra1-1/+1
2017-11-20 nix run: Fix accidental removal of /nix/store existence checkEelco Dolstra1-1/+1
Parenthetical to #1686, we don't need to create a new root if we can just bind-mount on top of the existing /nix/store.
2017-11-20 nix run: Ignore non-directories while setting up the chrootEelco Dolstra1-3/+6
Fixes #1686.
2017-11-20 signed-binary-caches -> require-sigsEelco Dolstra2-1/+6
Unlike signed-binary-caches (which could only be '*' or ''), require-sigs is a proper Boolean option. The default is true.
2017-11-20 CleanupEelco Dolstra1-2/+2
2017-11-20 binary-cache-public-keys -> trusted-public-keysEelco Dolstra2-4/+5
The name had become a misnomer since it's not only for substitution from binary caches, but when adding/copying any (non-content-addressed) path to a store.
2017-11-20 Merge pull request #1645 from twhitehead/stat-raceEelco Dolstra1-12/+11
Fix (highly unlikely) race condition in readLink
2017-11-20 nix copy: Abbreviate "daemon"Eelco Dolstra1-2/+2
2017-11-15 Add a "profile" option to S3BinaryCacheStoreEelco Dolstra3-5/+14
This allows specifying the AWS configuration profile to use. E.g. nix copy --from s3://my-cache?profile=aws-dev-account /nix/store/cf3isrlqavvd5w7rpky1fa8j9lcnlggm-...
2017-11-14 anchor nix::Exit exceptionWill Dietz2-0/+2
2017-11-14 nix sign-paths: Support binary cachesEelco Dolstra2-15/+37
2017-11-14 Revert "Don't parse "x:x" as a URI"Eelco Dolstra1-1/+1
This reverts commit f90f660b243866b8860eeb24cc4a345d32cc7ce7. This broke Hydra's release.nix, which contained preCheck = ''export LOGNAME=${LOGNAME:-foo}'';
2017-11-14 nix ls-{nar,store}: Don't abort on missing filesEelco Dolstra1-1/+1
2017-11-14 nix ls-{nar,store} --json: Respect -REelco Dolstra4-6/+13
2017-11-14 Don't indent JSON outputEelco Dolstra4-4/+4
2017-11-14 nix ls-{store,nar}: Add --json flagEelco Dolstra4-40/+53
2017-11-14 Make config options available to legacy commandsEelco Dolstra2-4/+4
2017-11-08 Remove extraneous commentEelco Dolstra1-3/+0
2017-11-08 Merge pull request #1650 from copumpkin/darwin-sandbox-unix-socketEelco Dolstra1-1/+8
Always allow builds to use unix domain sockets in Darwin sandbox
2017-11-06 Merge pull request #1632 from AmineChikhaoui/sigint-copyEelco Dolstra1-1/+9
run query paths in parallel during nix copy and handle SIGINT
2017-11-03 fetchgit.cc -> fetchGit.ccEelco Dolstra1-0/+0
2017-11-03 Remove git:// support in NIX_PATHEelco Dolstra3-31/+9
This didn't support specifying a revision/branch, and was restricted to git:// URIs (since https:// or ssh:// would be ambiguous).
2017-11-03 fetchGit/fetchMercurial: Filter out directories with untracked filesEelco Dolstra2-8/+16
2017-11-03 fetchGit: Add a testEelco Dolstra1-1/+1
2017-11-03 fetchGit: Don't do a remote fetch if we already have the revEelco Dolstra1-15/+23
2017-11-03 Merge pull request #1651 from LnL7/darwin-sandbox-getpwuidEelco Dolstra1-0/+3
Allow getpwuid in the darwin sandbox
2017-11-03 Allow getpwuid in the darwin sandbox.Daiderd Jordan1-0/+3
2017-11-03 Merge pull request #1660 from 4z3/patch-1Eelco Dolstra1-1/+1
fetchMercurial: fix error message
2017-11-03 Merge pull request #1655 from copumpkin/patch-1Eelco Dolstra1-2/+2
Don't freak out if we get a 403 from S3
2017-11-03 Don't freak out if we get a 403 from S3Daniel Peebles1-2/+2
As far as we're concerned, not being able to access a file just means the file is missing. Plus, AWS explicitly goes out of its way to return a 403 if the file is missing and the requester doesn't have permission to list the bucket. Also getting rid of an old hack that Eelco said was only relevant to an older AWS SDK.
2017-11-02 fetchMercurial: fix error messagetv1-1/+1
2017-11-01 Fix buildEelco Dolstra2-2/+2
https://hydra.nixos.org/build/63172338
2017-11-01 fetchMercurial: Don't fetch hashes we already haveEelco Dolstra3-24/+62
2017-11-01 Add fetchMercurial primopEelco Dolstra3-3/+190
E.g. $ nix eval '(fetchMercurial https://www.mercurial-scm.org/repo/hello)' { branch = "default"; outPath = "/nix/store/alvb9y1kfz42bjishqmyy3pphnrh1pfa-source"; rev = "82e55d328c8ca4ee16520036c0aaace03a5beb65"; revCount = 1; shortRev = "82e55d328c8c"; } $ nix eval '(fetchMercurial { url = https://www.mercurial-scm.org/repo/hello; rev = "0a04b987be5ae354b710cefeba0e2d9de7ad41a9"; })' { branch = "default"; outPath = "/nix/store/alvb9y1kfz42bjishqmyy3pphnrh1pfa-source"; rev = "0a04b987be5ae354b710cefeba0e2d9de7ad41a9"; revCount = 0; shortRev = "0a04b987be5a"; } $ nix eval '(fetchMercurial /tmp/unclean-hg-tree)' { branch = "default"; outPath = "/nix/store/cm750cdw1x8wfpm3jq7mz09r30l9r024-source"; rev = "0000000000000000000000000000000000000000"; revCount = 0; shortRev = "000000000000"; }
2017-10-31 Fix filterSourceEelco Dolstra1-32/+14