aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
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
2019-05-29Put flake-related stuff in its own namespaceEelco Dolstra
2019-05-29Make unsupported flake attributes a fatal errorEelco Dolstra
2019-05-29Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2019-05-29bump cpptoml to v0.1.1Ding Xiang Fei
2019-05-29Get last commit time of github flakesEelco Dolstra
2019-05-29Add date of last commit to SourceInfoEelco Dolstra
This is primarily useful for version string generation, where we need a monotonically increasing number. The revcount is the preferred thing to use, but isn't available for GitHub flakes (since it requires fetching the entire history). The last commit timestamp OTOH can be extracted from GitHub tarballs.
2019-05-28Iterate over referencesEelco Dolstra
2019-05-28Merge branch 'attrPaths' of https://github.com/NinjaTrappeur/nixEelco Dolstra
2019-05-28nix flake info: Add missing newlineEelco Dolstra
2019-05-28printFlakeInfo: Separate JSON outputEelco Dolstra
2019-05-28callFlake(): Emit source info attributes for non-flake dependenciesEelco Dolstra
2019-05-28nix flake deps: Remove --json flag for nowEelco Dolstra
It doesn't produce valid JSON at the moment (but a concatenation of JSON objects). Anyway we probably should merge this command info 'nix flake info'.
2019-05-28printFlakeInfo/printNonFlakeInfo: Factor out commonalityEelco Dolstra
2019-05-28nix flake info/deps: Stop progress bar before printing outputEelco Dolstra
2019-05-28Remove redundant resolvedRef fields since they're already in SourceInfoEelco Dolstra
2019-05-28Rename contentHash -> narHash for consistencyEelco Dolstra
2019-05-28Move hash into SourceInfo and rename to narHash to avoid ambiguityEelco Dolstra
2019-05-28Store SourceInfo in Flake and NonFlakeEelco Dolstra
This deduplicates some shared fields. Factoring out the commonality is useful in places like makeFlakeValue().
2019-05-28Merge branch 'nonFlakeRequiresTest' of https://github.com/CSVdB/nix into flakesEelco Dolstra
2019-05-28Added nonFlakeRequires testNick Van den Broeck
Fixes #2888
2019-05-28Fixed relative path parsingNick Van den Broeck
Fixed #2821
2019-05-23Register flake source trees as GC rootsEelco Dolstra
This ensures that flakes don't get garbage-collected, which is important to get nix-channel-like behaviour. For example, running $ nix build hydra: will create a GC root ~/.cache/nix/flake-closures/hydra -> /nix/store/xarfiqcwa4w8r4qpz1a769xxs8c3phgn-flake-closure where the contents/references of the linked file in the store are the flake source trees used by the 'hydra' flake: /nix/store/n6d5f5lkpfjbmkyby0nlg8y1wbkmbc7i-source /nix/store/vbkg4zy1qd29fnhflsv9k2j9jnbqd5m2-source /nix/store/z46xni7d47s5wk694359mq9ay353ar94-source Note that this in itself is not enough to allow offline use; the fetcher for the flakeref (e.g. fetchGit or downloadCached) must not fail if it cannot fetch the latest version of the file, so long as it knows a cached version. Issue #2868.
2019-05-23FlakeRef::to_string(): Check round tripEelco Dolstra
2019-05-23fetchGit: Don't barf if we can't update our Git cloneEelco Dolstra
Instead print a warning that we're continuing with the most recently fetched version.
2019-05-22Prevent the global registry from being GC'edEelco Dolstra
Issue #2868.
2019-05-22Refactor downloadCached() interfaceEelco Dolstra
2019-05-22Fetch the flake registry from the NixOS/flake-registry repoEelco Dolstra
2019-05-22Check the flake epochEelco Dolstra
Closes #2883.
2019-05-22nix flake deps: Print flake dependenciesEelco Dolstra
2019-05-22Move flake-related flags into a separate classEelco Dolstra
Also, rename --dont-save-lock-file to --no-save-lock-file and change noRegistries to useRegistries.
2019-05-22Improve FlakeCommandEelco Dolstra
It now handles commonality like calling getFlake() and resolving relative local flake refs. Fixes #2822.
2019-05-21Use warn(), tweak messagesEelco Dolstra
2019-05-21Only rewrite the lockfile if it changedEelco Dolstra
This removes spurious warnings about failure to write the lockfile.