1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-29 14:53:16 +02:00
nix/src/libexpr
Alyssa Ross 4f80464645
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.
2021-06-23 15:00:36 +00:00
..
flake Create parent trusted list path before writing 2021-05-08 21:31:28 -05:00
primops Replace the trailing markdown spaces by a backslash 2021-04-23 14:37:21 +02:00
attr-path.cc string2Int(): Return std::optional 2021-01-08 12:22:21 +01:00
attr-path.hh Some backports from the flakes branch 2020-06-18 14:03:00 +02:00
attr-set.cc Replace Value type setters with mk* functions 2020-12-18 21:48:22 +01:00
attr-set.hh libexpr: misc improvements for proper error position 2021-04-13 23:12:38 +02:00
common-eval-args.cc Group common options 2021-01-25 19:03:13 +01:00
common-eval-args.hh Fix --override-flake and add a test 2020-01-22 20:00:58 +01:00
eval-cache.cc libcmd/installables: force re-evaluation of cached failures 2021-04-19 19:51:04 +02:00
eval-cache.hh libcmd/installables: force re-evaluation of cached failures 2021-04-19 19:51:04 +02:00
eval-inline.hh Improve error formatting 2021-01-21 11:02:09 +01:00
eval.cc Merge pull request #4440 from Ma27/misc-pos-fixes 2021-04-23 11:10:59 +02:00
eval.hh Move <nix/fetchurl.nix> into the nix binary 2020-12-22 14:43:20 +01:00
fetchurl.nix Move <nix/fetchurl.nix> into the nix binary 2020-12-22 14:43:20 +01:00
function-trace.cc Revert the enum struct change 2020-06-18 22:11:26 +00:00
function-trace.hh Hide FunctionCallTrace constructor/destructor 2020-01-05 16:21:34 +01:00
get-drvs.cc Use BuildableReq for buildPaths and ensurePath 2021-04-05 08:33:00 -04:00
get-drvs.hh Squashed get CA derivations building 2020-08-07 19:51:55 +00:00
imported-drv-to-derivation.nix Move some corepkgs into the nix binary 2020-03-11 16:57:48 +01:00
json-to-value.cc Bump nlohmann-json version to 3.9.1 2020-09-21 14:24:43 -04:00
json-to-value.hh Fix extra ; warnings involving MakeError 2019-11-10 11:24:47 -05:00
lexer.l Remove an unknown pragma gcc warning 2020-12-02 14:33:20 +01:00
local.mk Apply OS checks to host platform, not build 2021-06-23 15:00:36 +00:00
nix-expr.pc.in pkg-config files: Use c++17 2019-03-14 14:11:12 +01:00
nixexpr.cc Improve error formatting 2021-01-21 11:02:09 +01:00
nixexpr.hh libexpr: misc improvements for proper error position 2021-04-13 23:12:38 +02:00
parser.y libexpr: misc improvements for proper error position 2021-04-13 23:12:38 +02:00
primops.cc primops: math.h -> cmath 2021-05-10 16:41:10 +02:00
primops.hh Add missing #pragma once 2020-10-06 10:40:07 +02:00
symbol-table.hh nix flake show: Use evaluation cache 2020-04-17 01:02:29 +02:00
value-to-json.cc Rename Value::normalType() -> Value::type() 2020-12-17 14:45:45 +01:00
value-to-json.hh nix path-info: Add --json flag 2016-08-29 17:29:24 +02:00
value-to-xml.cc Rename Value::normalType() -> Value::type() 2020-12-17 14:45:45 +01:00
value-to-xml.hh Use "#pragma once" to prevent repeated header file inclusion 2012-07-18 14:59:03 -04:00
value.hh libexpr: misc improvements for proper error position 2021-04-13 23:12:38 +02:00