aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2019-06-17nix flake check: Check appsEelco Dolstra
2019-06-17nix flake info --json: Revive enumerating the outputsEelco Dolstra
2019-06-17nix app: Accept argumentsEelco Dolstra
Example: $ nix app blender-bin -- --version Blender 2.80 (sub 74)
2019-06-17nix app: Search for installable in the 'apps' outputEelco Dolstra
I.e. you can write $ nix app blender-bin:blender_2_80 which is equivalent to $ nix app blender-bin:apps.blender_2_80
2019-06-17Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2019-06-17Another attempt at getting pseudoterminals to work on macOSEelco Dolstra
2019-06-16Hopefully fix macOS testsEelco Dolstra
2019-06-16Set $TERMEelco Dolstra
2019-06-16Run builds in a pseudo-terminalEelco Dolstra
This allows many programs (e.g. gcc, clang, cmake) to print colorized log output (assuming $TERM is set to a value like "xterm"). There are other ways to get colors, in particular setting CLICOLOR_FORCE, but they're less widely supported and can break programs that parse tool output.
2019-06-16Style fixEelco Dolstra
2019-06-15nix: Add -L alias for --print-build-logsEelco Dolstra
2019-06-15nix: Support -j flagEelco Dolstra
2019-06-15Daemon: warn when an untrusted user cannot override a settingFélix Baylac-Jacqué
In a daemon-based Nix setup, some options cannot be overridden by a client unless the client's user is considered trusted. Currently, if an untrusted user tries to override one of those options, we are silently ignoring it. This can be pretty confusing in certain situations. e.g. a user thinks he disabled the sandbox when in reality he did not. We are now sending a warning message letting know the user some options have been ignored. Related to #1761.
2019-06-13For nixpkgs.<attr>, use legacyPackagesEelco Dolstra
This makes commands like 'nix run nixpkgs.chromium' work again.
2019-06-12Fix fetchTarball with chroot storesEelco Dolstra
Fixes #2405.
2019-06-11writeRegistry(): Write correct versionEelco Dolstra
2019-06-07Disable EvalCache in impure modeEelco Dolstra
2019-06-07Add flake evaluation cacheEelco Dolstra
This exploits the hermetic nature of flake evaluation to speed up repeated evaluations of a flake output attribute. For example (doing 'nix build' on an already present package): $ time nix build nixpkgs:firefox real 0m1.497s user 0m1.160s sys 0m0.139s $ time nix build nixpkgs:firefox real 0m0.052s user 0m0.038s sys 0m0.007s The cache is ~/.cache/nix/eval-cache-v1.sqlite, which has entries like INSERT INTO Attributes VALUES( X'92a907d4efe933af2a46959b082cdff176aa5bfeb47a98fabd234809a67ab195', 'packages.firefox', 1, '/nix/store/pbalzf8x19hckr8cwdv62rd6g0lqgc38-firefox-67.0.drv /nix/store/g6q0gx0v6xvdnizp8lrcw7c4gdkzana0-firefox-67.0 out'); where the hash 92a9... is a fingerprint over the flake store path and the contents of the lockfile. Because flakes are evaluated in pure mode, this uniquely identifies the evaluation result.
2019-06-05Move flake-related stuff to src/libexpr/flakeEelco Dolstra
2019-06-04Shorter syntax for referencing flake outputsEelco Dolstra
Fixes #2819.
2019-06-04Eliminate duplicate fetching of the top-level flakeEelco Dolstra
2019-06-04Add commentsEelco Dolstra
2019-06-04Make non-flake inputs lazyEelco Dolstra
Also add a proper test for non-flake inputs.
2019-06-04Check hashEelco Dolstra
2019-06-04Don't register invalid paths as GC rootsEelco Dolstra
Unfortunately this doesn't work. Maybe we should keep separate roots for each path.
2019-06-04Rename dep -> inputEelco Dolstra
Also use nlohmann::json range-based for.
2019-06-04Move LockFile and related types to a separate fileEelco Dolstra
2019-06-04Fix GC closure generationEelco Dolstra
2019-06-04Make flake input fetching lazyEelco Dolstra
As long as the flake input is locked, it is now only fetched when it is evaluated (e.g. "nixpkgs" is fetched when "inputs.nixpkgs.<something>" is evaluated). This required adding an "id" attribute to the members of "inputs" in lockfiles, e.g. "inputs": { "nixpkgs/release-19.03": { "id": "nixpkgs", "inputs": {}, "narHash": "sha256-eYtxncIMFVmOHaHBtTdPGcs/AnJqKqA6tHCm0UmPYQU=", "nonFlakeInputs": {}, "uri": "github:edolstra/nixpkgs/e9d5882bb861dc48f8d46960e7c820efdbe8f9c1" } } because the flake ID needs to be known beforehand to construct the "inputs" attrset. Fixes #2913.
2019-06-03Fix clang compilation errorEelco Dolstra
https://hydra.nixos.org/build/94332344 https://stackoverflow.com/questions/46114214/lambda-implicit-capture-fails-with-variable-declared-from-structured-binding
2019-06-03Made epochs more fine-grainedNick Van den Broeck
Fixes #2894
2019-06-03Add 'nix app' commandEelco Dolstra
This is like 'nix run', except that the command to execute is defined in a flake output, e.g. defaultApp = { type = "app"; program = "${packages.blender_2_80}/bin/blender"; }; Thus you can do $ nix app blender-bin to start Blender from the 'blender-bin' flake. In the future, we can extend this with sandboxing. (For example we would want to be able to specify that Blender should not have network access by default and should only have access to certain paths in the user's home directory.)
2019-06-03Bindings: Add convenience method for requiring an attributeEelco Dolstra
2019-06-03Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2019-06-01Fix segfault in builtin fetchurl with hashed mirrors + SRI hashesEelco Dolstra
2019-05-31DohEelco Dolstra
2019-05-31Fix handling of bare flakerefs containing a colonEelco Dolstra
2019-05-31Automatically determine subdir for path flakesEelco Dolstra
This means that in a flake in a subdirectory of a Git repo, you can now do $ nix build rather than the inconvenient $ nix build ../..?dir=foo/bar
2019-05-31Allow bare flakerefs as installablesEelco Dolstra
So now $ nix build blender-bin works and builds the default package from that flake. You don't need to add a colon at the end anymore.
2019-05-31Fix reading the lockfile of a flake in a subdirectoryEelco Dolstra
2019-05-31Add operator << for LockFileEelco Dolstra
Useful for debugging.
2019-05-31Support 'dir' and other parameters in path flakerefsEelco Dolstra
2019-05-31Show hash mismatch warnings in SRI formatEelco Dolstra
2019-05-31Rename requires -> inputs, provides -> outputsEelco Dolstra
Issue #2828.
2019-05-29nix flake info --json: List the "provides"Eelco Dolstra
It also lists the contents of "checks" and "packages". For example: $ nix flake info --json | jq { "branch": "HEAD", "description": "The purely functional package manager", "epoch": 2019, "id": "nix", "lastModified": 1559161142, "path": "/nix/store/2w2qla8735dbxah8gai8r1nsbf5x4f5d-source", "provides": { "checks": { "binaryTarball": {}, "nix-copy-closure": {}, "perlBindings": {}, "remoteBuilds": {}, "setuid": {} }, "defaultPackage": {}, "devShell": {}, "hydraJobs": {}, "packages": { "nix": {}, "nix-perl-bindings": {} } }, "revCount": 6955, "revision": "8cb24e04e8b6cc60e2504733afe78e0eadafcd98", "uri": "/home/eelco/Dev/nix" } Fixes #2820.
2019-05-29Hack: Use legacyPackages from NixpkgsEelco Dolstra
Nixpkgs doesn't provide a clean "packages" set yet, so until that's the case, look for packages in "legacyPackages" as well.
2019-05-29nix flake check: Use read-only mode if we're not buildingEelco Dolstra
2019-05-29nix flake check: Check defaultPackage, devShell and packagesEelco Dolstra
2019-05-29Add 'nix flake check' commandEelco Dolstra
This evaluates all the 'provides' of a flake and builds the 'check' attributes.
2019-05-29Remove makeFlakeValue()Eelco Dolstra