@philiptaron's lix workspace
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
config
contrib function-trace: always show the trace 2019-09-18 23:23:21 +02:00
corepkgs
doc/manual Fix typos in the Nix Manual. 2019-10-08 14:02:40 -04:00
m4
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
perl
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
.editorconfig
.gitignore
.travis.yml
.version Bump version 2019-09-04 15:59:33 +02:00
bootstrap.sh
configure.ac
COPYING
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
Makefile
Makefile.config.in
nix.spec.in Remove world-writability from per-user directories 2019-10-09 23:34:48 +02:00
README.md

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.