Nix, the purely functional package manager
Go to file
Alyssa Ross 12dc642781
Apply OS checks to host platform, not build
Previously, the build system used uname(1) output when it wanted to
check the operating system it was being built for, which meant that it
didn't take into-account cross-compilation when the build and host
operating systems were different.

To fix this, instead of consulting uname output, we consult the host
triple, specifically the third "kernel" part.

For "kernel"s with stable ABIs, like Linux or Cygwin, we can use a
simple ifeq to test whether we're compiling for that system, but for
other platforms, like Darwin, FreeBSD, or Solaris, we have to use a
more complicated check to take into account the version numbers at the
end of the "kernel"s.  I couldn't find a way to just strip these
version numbers in GNU Make without shelling out, which would be even
more ugly IMO.  Because these checks differ between kernels, and the
patsubst ones are quite fiddly, I've added variables for each host OS
we might want to check to make them easier to reuse.

(cherry picked from commit 4f80464645)
2021-07-27 08:41:57 +00:00
.github Remove .github/FUNDING.yml 2019-07-23 15:21:23 +02:00
config Update config.guess for proper arm64 macOS detection 2020-12-04 12:22:31 +01:00
contrib function-trace: always show the trace 2020-01-05 16:30:32 +01:00
corepkgs nix-channel: Don't fetch binary-cache-url 2019-06-25 13:27:16 +02:00
doc/manual doc: Change install syntax to be fish compatible 2021-07-05 13:58:01 +02: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: add aarch64-darwin 2021-07-02 14:13:26 +02:00
misc Apply OS checks to host platform, not build 2021-07-27 08:41:57 +00:00
mk Apply OS checks to host platform, not build 2021-07-27 08:41:57 +00:00
perl Apply OS checks to host platform, not build 2021-07-27 08:41:57 +00:00
scripts installer: use native aarch64-darwin 2021-07-02 14:08:01 +02:00
src Apply OS checks to host platform, not build 2021-07-27 08:41:57 +00:00
tests fix setuid test eval 2021-06-23 09:37:14 +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 Treat plain derivation paths in context as normal paths. 2019-01-13 11:29:55 -05:00
.travis.yml Test the installer 2017-07-14 12:11:04 -04:00
.version Bump version 2021-07-02 15:00:14 +02:00
bootstrap.sh bootstrap: Simplify & make more robust. 2011-09-06 12:11:05 +00:00
configure.ac configure.ac: fix use of unread LIBS variable 2021-06-04 12:28:34 +00:00
COPYING * Change this to LGPL to keep the government happy. 2006-04-25 16:41:06 +00:00
local.mk Merge all nix-* binaries into nix 2018-10-26 12:54:00 +02:00
Makefile autoconf: Allow overriding CFLAGS/CXXFLAGS from outside. 2019-07-03 04:32:25 +02:00
Makefile.config.in Apply OS checks to host platform, not build 2021-07-27 08:41:57 +00:00
nix.spec.in Remove world-writability from per-user directories 2019-10-09 23:57:25 +02:00
README.md README, error msg: http -> https 2020-05-26 11:39:02 +02:00
release-common.nix Fix evaluation on 20.03 2021-06-01 15:27:32 +02:00
release.nix Remove Deb/RPM jobs 2021-06-23 11:41:06 +02:00
shell.nix Build with large config Boehm GC 2020-02-18 18:02:58 +01: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 https://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.