aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
AgeCommit message (Collapse)Author
2019-10-15Support non-x86_64-linux system types in flakesEelco Dolstra
A command like $ nix run nixpkgs#hello will now build the attribute 'packages.${system}.hello' rather than 'packages.hello'. Note that this does mean that the flake needs to export an attribute for every system type it supports, and you can't build on unsupported systems. So 'packages' typically looks like this: packages = nixpkgs.lib.genAttrs ["x86_64-linux" "i686-linux"] (system: { hello = ...; }); The 'checks', 'defaultPackage', 'devShell', 'apps' and 'defaultApp' outputs similarly are now attrsets that map system types to derivations/apps. 'nix flake check' checks that the derivations for all platforms evaluate correctly, but only builds the derivations in 'checks.${system}'. Fixes #2861. (That issue also talks about access to ~/.config/nixpkgs and --arg, but I think it's reasonable to say that flakes shouldn't support those.) The alternative to attribute selection is to pass the system type as an argument to the flake's 'outputs' function, e.g. 'outputs = { self, nixpkgs, system }: ...'. However, that approach would be at odds with hermetic evaluation and make it impossible to enumerate the packages provided by a flake.
2019-10-08Temporary compatibility hackEelco Dolstra
2019-10-08uri -> url for consistencyEelco Dolstra
2019-10-07Add a "dev" output to the 'nix' packageEelco Dolstra
This is to ensure that references like 'nix.dev' in dwarffs work regardless of whether we're using the 'nix' package from this overlay or from Nixpkgs.
2019-10-04nix-perl -> nix.perl-bindingsEelco Dolstra
2019-10-04Merge release.nix, shell.nix and release-common.nix into flake.nixEelco Dolstra
Also provide a Nixpkgs overlay, memoize Nixpkgs evaluation and fit the githubFlakes test.
2019-09-10flake.nix: Remove VM tests from 'checks'Eelco Dolstra
2019-08-30Remove 'name' attribute from flakesEelco Dolstra
This is no longer needed since flakes are given an identity in the 'inputs' attribute.
2019-08-30Update flake.{nix,lock}Eelco Dolstra
2019-07-26epoch -> editionEelco Dolstra
2019-06-03Made epochs more fine-grainedNick Van den Broeck
Fixes #2894
2019-05-31Rename requires -> inputs, provides -> outputsEelco Dolstra
Issue #2828.
2019-05-29flake.nix: Add more checksEelco Dolstra
2019-05-29Add 'nix flake check' commandEelco Dolstra
This evaluates all the 'provides' of a flake and builds the 'check' attributes.
2019-05-02nix dev-shell: Use 'provides.devShell' by defaultEelco Dolstra
Thus $ nix dev-shell will now build the 'provides.devShell' attribute from the flake in the current directory. If it doesn't exist, it falls back to 'provides.defaultPackage'.
2019-04-16Pass a flake to itself as "self"Eelco Dolstra
2019-04-08Allow relative paths in flakerefsEelco Dolstra
Also allow "." as an installable to refer to the flake in the current directory. E.g. $ nix build . will build 'provides.defaultPackage' in the flake in the current directory.
2019-04-08Add a flake.nixEelco Dolstra