Find a file
Eelco Dolstra 7d38060a0d Support non-x86_64-linux system types in flakes
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-15 18:16:29 +02:00
.github Remove .github/FUNDING.yml 2019-07-23 15:21:23 +02:00
config update config/config.{sub,guess} 2018-08-13 20:00:17 +00:00
contrib function-trace: always show the trace 2019-09-18 23:23:21 +02:00
corepkgs Merge remote-tracking branch 'origin/master' into flakes 2019-06-25 14:27:57 +02:00
doc/manual Fix typos in the Nix Manual. 2019-10-08 14:02:40 -04:00
m4 autoconf: Fix C++17 detection not working on Ubuntu 16.04. 2019-07-03 04:32:25 +02:00
maintainers upload-release.pl: Fix sshfs call 2019-09-04 21:44:40 +02:00
misc Make nix-daemon.plist less fragile on macOS 2019-10-09 12:52:01 +01:00
mk mk: add support for passing LDFLAGS to libs and bins 2019-07-03 04:32:25 +02:00
perl autoconf: Allow overriding CFLAGS/CXXFLAGS from outside. 2019-07-03 04:32:25 +02:00
scripts Typo 2019-10-09 23:35:02 +02:00
src Support non-x86_64-linux system types in flakes 2019-10-15 18:16:29 +02:00
tests Support non-x86_64-linux system types in flakes 2019-10-15 18:16:29 +02:00
.dir-locals.el Add .dir-locals.el for Emacs 2016-01-28 11:12:04 +01:00
.editorconfig Add .editorconfig 2017-06-05 22:57:28 +01:00
.gitignore Move flake template into a separate file 2019-04-08 23:39:38 +02:00
.travis.yml Test the installer 2017-07-14 12:11:04 -04:00
.version Bump version 2019-09-04 15:59:33 +02:00
bootstrap.sh bootstrap: Simplify & make more robust. 2011-09-06 12:11:05 +00:00
configure.ac Merge remote-tracking branch 'origin/master' into flakes 2019-07-06 21:06:22 +02:00
COPYING * Change this to LGPL to keep the government happy. 2006-04-25 16:41:06 +00:00
flake.lock Temporary compatibility hack 2019-10-08 20:05:16 +02:00
flake.nix Support non-x86_64-linux system types in flakes 2019-10-15 18:16:29 +02:00
local.mk Fetch the flake registry from the NixOS/flake-registry repo 2019-05-22 22:56:46 +02:00
Makefile autoconf: Allow overriding CFLAGS/CXXFLAGS from outside. 2019-07-03 04:32:25 +02:00
Makefile.config.in Merge remote-tracking branch 'origin/master' into flakes 2019-07-06 21:06:22 +02:00
nix.spec.in Remove world-writability from per-user directories 2019-10-09 23:34:48 +02:00
README.md Add Open Collective 2019-07-18 10:57:26 +02:00

Open Collective supporters

Nix, the purely functional package manager

Nix is a new take on package management that is fairly unique. Because of its purity aspects, a lot of issues found in traditional package managers don't appear with Nix.

To find out more about the tool, usage and installation instructions, please read the manual, which is available on the Nix website at http://nixos.org/nix/manual.

Contributing

Take a look at the Hacking Section of the manual. It helps you to get started with building Nix from source.

License

Nix is released under the LGPL v2.1

This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit.