about summary refs log tree commit diff
path: root/src/nix
AgeCommit message (Collapse)AuthorFilesLines
2017-04-25 StorePathCommands: Build installablesEelco Dolstra3-20/+13
So for instance "nix copy --to ... nixpkgs.hello" will build nixpkgs.hello first. It's debatable whether this is a good idea. It seems desirable for commands like "nix copy" but maybe not for commands like "nix path-info".
2017-04-25 Set default installableEelco Dolstra1-1/+7
Thus $ nix build -f foo.nix will build foo.nix. And $ nix build will build default.nix. However, this may not be a good idea because it's kind of inconsistent, given that "nix build foo" will build the "foo" attribute from the default installation source (i.e. the synthesis of $NIX_PATH), rather than ./default.nix. So I may revert this.
2017-04-25 Interpret any installable containing a slash as a pathEelco Dolstra1-11/+7
So "nix path-info ./result" now works.
2017-04-25 Make StorePathsCommand a subclass of InstallablesCommandEelco Dolstra2-24/+33
This allows commands like 'nix path-info', 'nix copy', 'nix verify' etc. to work on arbitrary installables. E.g. to copy geeqie to a binary cache: $ nix copy -r --to file:///tmp/binary-cache nixpkgs.geeqie Or to get the closure size of thunderbird: $ nix path-info -S nixpkgs.thunderbird
2017-04-25 Move code aroundEelco Dolstra8-80/+68
2017-04-25 Add "nix eval" commandEelco Dolstra1-0/+44
This replaces "nix-instantiate --eval". The result is evaluated strictly since this seems more useful.
2017-04-25 Restructure installables handling in the "nix" commandEelco Dolstra8-124/+249
2017-04-24 Factor out --jsonEelco Dolstra2-7/+3
2017-04-20 Improve nix show-config --jsonEelco Dolstra1-2/+1
In particular, show descriptions. This could be used for manpage generation etc.
2017-04-13 Add "nix show-config" commandEelco Dolstra1-0/+43
This dumps the entire Nix configuration, including all options that have default values.
2017-04-13 Convert Settings to the new config systemEelco Dolstra1-1/+0
This makes all config options self-documenting. Unknown or unparseable config settings and --option flags now cause a warning.
2017-04-08 Process nix.conf options in "new" nix commands, add test.Will Dietz1-0/+1
Without this (minor) change, the options set using "--option" or read from nix.conf were parsed but not used.
2017-03-16 nix copy: Make -r option use the "from" storeEelco Dolstra3-4/+14
Previously, we tried to compute the closure in the local store, which obviously doesn't work.
2017-03-16 copyPaths(): Use queryValidPaths() to reduce SSH latencyEelco Dolstra1-1/+1
2017-03-15 Add a "nix log" commandEelco Dolstra1-0/+57
This replaces "nix-store --read-log". It checks the local store and any configured substituters for the requested logs.
2017-01-26 exportReferencesGraph: Export more complete info in JSON formatEelco Dolstra1-49/+6
This writes info about every path in the closure in the same format as ‘nix path-info --json’. Thus it also includes NAR hashes and sizes. Example: [ { "path": "/nix/store/10h6li26i7g6z3mdpvra09yyf10mmzdr-hello-2.10", "narHash": "sha256:0ckdc4z20kkmpqdilx0wl6cricxv90lh85xpv2qljppcmz6vzcxl", "narSize": 197648, "references": [ "/nix/store/10h6li26i7g6z3mdpvra09yyf10mmzdr-hello-2.10", "/nix/store/27binbdy296qvjycdgr1535v8872vz3z-glibc-2.24" ], "closureSize": 20939776 }, { "path": "/nix/store/27binbdy296qvjycdgr1535v8872vz3z-glibc-2.24", "narHash": "sha256:1nfn3m3p98y1c0kd0brp80dn9n5mycwgrk183j17rajya0h7gax3", "narSize": 20742128, "references": [ "/nix/store/27binbdy296qvjycdgr1535v8872vz3z-glibc-2.24" ], "closureSize": 20742128 } ] Fixes #1134.
2017-01-19 Merge pull request #981 from shlevy/build-remote-c++Eelco Dolstra1-27/+1
build-remote: Implement in C++
2016-11-26 Revert "Get rid of unicode quotes (#1140)"Eelco Dolstra11-28/+28
This reverts commit f78126bfd6b6c8477fcdbc09b2f98772dbe9a1e7. There really is no need for such a massive change...
2016-11-25 Get rid of unicode quotes (#1140)Guillaume Maudoux11-28/+28
2016-11-10 Store::computeFSClosure(): Support a set of pathsEelco Dolstra1-2/+2
This way, callers can exploits the parallelism of computeFSClosure() when they have multiple paths that they need the (combined) closure of.
2016-11-10 build-remote: Implement in C++Shea Levy1-27/+1
2016-11-09 Merge branch 'ssh-store' of https://github.com/shlevy/nixEelco Dolstra4-5/+5
2016-09-21 printMsg(lvlError, ...) -> printError(...) etc.Eelco Dolstra2-7/+7
2016-09-14 nix path-info: Add some more examplesEelco Dolstra1-1/+9
2016-09-02 Merge openStore and openStoreAt with default argumentsShea Levy4-5/+5
2016-08-30 Fix 32-bit buildEelco Dolstra1-5/+2
2016-08-29 nix path-info: Add --json flagEelco Dolstra1-22/+81
Also, factor out JSON generation from value-to-json.{cc,hh}, and support producing indented JSON.
2016-08-23 nix build: Use Nix search pathEelco Dolstra2-6/+48
That is, unless --file is specified, the Nix search path is synthesized into an attribute set. Thus you can say $ nix build nixpkgs.hello assuming $NIX_PATH contains an entry of the form "nixpkgs=...". This is more verbose than $ nix build hello but is less ambiguous.
2016-08-10 Mark content-addressed paths in the Nix database and in .narinfoEelco Dolstra2-1/+6
This allows such paths to be imported without signatures.
2016-06-02 nix run: Set a reasonable uid/gidEelco Dolstra1-0/+7
2016-06-02 nix run: Handle the case where the /nix/store mount point doesn't existEelco Dolstra1-2/+39
2016-06-02 nix run: Mount the Nix store in a private namespaceEelco Dolstra1-1/+21
This is a convenience command to allow users who are not privileged to create /nix/store to use Nix with regular binary caches. For example, $ NIX_REMOTE="local?state=$HOME/nix/var&real=/$HOME/nix/store" nix run firefox bashInteractive will download Firefox and bash from cache.nixos.org, then start a shell in which $HOME/nix/store is mounted on /nix/store.
2016-06-02 Add basic "nix run" commandEelco Dolstra1-0/+62
2016-06-01 Make the store directory a member variable of StoreEelco Dolstra2-2/+2
2016-05-31 Shut up some clang warningsEelco Dolstra2-1/+3
2016-05-04 Add a Store::addToStore() variant that accepts a NAREelco Dolstra1-1/+1
As a side effect, this ensures that signatures are propagated when copying paths between stores. Also refactored import/export to make use of this.
2016-05-04 Add a copyStorePath() utility functionEelco Dolstra1-5/+1
2016-04-25 nix: Disable verbose buildsEelco Dolstra1-0/+2
2016-04-25 Improved logging abstractionEelco Dolstra7-148/+165
This also gets rid of --log-type, since the nested log type isn't useful in a multi-threaded situation, and nobody cares about the "pretty" log type.
2016-04-22 Factor out parallel processing of work items that have dependenciesEelco Dolstra1-55/+18
2016-04-22 nix copy: ParalleliseEelco Dolstra4-20/+59
2016-04-22 Fold "nix query-path-sigs" into "nix path-info"Eelco Dolstra2-31/+10
2016-04-22 Add "nix copy" commandEelco Dolstra1-0/+87
This replaces nix-push. For example, $ nix copy --to file:///tmp/cache -r $(type -p firefox) copies the closure of firefox to the specified binary cache. And $ nix copy --from file:///tmp/cache --to s3://my-cache /nix/store/abcd... copies between two binary caches. It will also replace nix-copy-closure, once we have an SSHStore class, e.g. $ nix copy --from ssh://alice@machine /nix/store/abcd...
2016-04-21 Implement S3BinaryCacheStore::queryAllValidPaths()Eelco Dolstra2-9/+10
This allows commands like "nix verify --all" or "nix path-info --all" to work on S3 caches. Unfortunately, this requires some ugly hackery: when querying the contents of the bucket, we don't want to have to read every .narinfo file. But the S3 bucket keys only include the hash part of each store path, not the name part. So as a special exception queryAllValidPaths() can now return store paths *without* the name part, and queryPathInfo() accepts such store paths (returning a ValidPathInfo object containing the full name).
2016-04-21 nix path-info: AddEelco Dolstra1-0/+75
Forgot to commit this earlier...
2016-04-21 nix --help: Show usage examplesEelco Dolstra3-0/+41
2016-04-19 Move path info caching from BinaryCacheStore to StoreEelco Dolstra2-25/+27
Caching path info is generally useful. For instance, it speeds up "nix path-info -rS /run/current-system" (i.e. showing the closure sizes of all paths in the closure of the current system) from 5.6s to 0.15s. This also eliminates some APIs like Store::queryDeriver() and Store::queryReferences().
2016-04-15 Unify "nix verify-paths" and "nix verify-store"Eelco Dolstra3-60/+31
"verify-store" is now simply an "--all" flag to "nix verify". This flag can be used for any other store path command as well (e.g. "nix path-info", "nix copy-sigs", ...).
2016-04-07 nix verify-paths: Add ‘--sigs-needed <N>’ flagEelco Dolstra1-15/+31
This specifies the number of distinct signatures required to consider each path "trusted". Also renamed ‘--no-sigs’ to ‘--no-trust’ for the flag that disables verifying whether a path is trusted (since a path can also be trusted if it has no signatures, but was built locally).
2016-04-05 Add "nix sign-paths" commandEelco Dolstra1-1/+49
E.g. $ nix sign-paths -k ./secret -r $(type -p geeqie) signs geeqie and all its dependencies using the key in ./secret.