diff options
Diffstat (limited to 'pkgs/stdenv')
-rw-r--r-- | pkgs/stdenv/default.nix | 1 | ||||
-rw-r--r-- | pkgs/stdenv/generic/default.nix | 7 | ||||
-rw-r--r-- | pkgs/stdenv/generic/make-derivation.nix | 2 | ||||
-rw-r--r-- | pkgs/stdenv/linux/bootstrap-files/riscv64.nix | 12 | ||||
-rw-r--r-- | pkgs/stdenv/linux/default.nix | 1 |
5 files changed, 21 insertions, 2 deletions
diff --git a/pkgs/stdenv/default.nix b/pkgs/stdenv/default.nix index d6c59573f2a5..0d328d98ba11 100644 --- a/pkgs/stdenv/default.nix +++ b/pkgs/stdenv/default.nix @@ -56,6 +56,7 @@ in powerpc-linux = /* stagesLinux */ stagesNative; powerpc64-linux = stagesLinux; powerpc64le-linux = stagesLinux; + riscv64-linux = stagesLinux; x86_64-darwin = stagesDarwin; aarch64-darwin = stagesDarwin; x86_64-solaris = stagesNix; diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix index 49ebc67f854e..4fb98e5e8013 100644 --- a/pkgs/stdenv/generic/default.nix +++ b/pkgs/stdenv/generic/default.nix @@ -112,7 +112,7 @@ let # are absolute unless we go out of our way to make them relative (like with CF) # TODO: This really wants to be in stdenv/darwin but we don't have hostPlatform # there (yet?) so it goes here until then. - preHook = preHook+ lib.optionalString buildPlatform.isDarwin '' + preHook = preHook + lib.optionalString buildPlatform.isDarwin '' export NIX_DONT_SET_RPATH_FOR_BUILD=1 '' + lib.optionalString (hostPlatform.isDarwin || (hostPlatform.parsed.kernel.execFormat != lib.systems.parse.execFormats.elf && hostPlatform.parsed.kernel.execFormat != lib.systems.parse.execFormats.macho)) '' export NIX_DONT_SET_RPATH=1 @@ -168,6 +168,11 @@ let inherit overrides; inherit cc hasCC; + + # Convenience for doing some very basic shell syntax checking by parsing a script + # without running any commands. Because this will also skip `shopt -s extglob` + # commands and extglob affects the Bash parser, we enable extglob always. + shellDryRun = "${stdenv.shell} -n -O extglob"; } # Propagate any extra attributes. For instance, we use this to diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix index 8fa306370494..2465449867cb 100644 --- a/pkgs/stdenv/generic/make-derivation.nix +++ b/pkgs/stdenv/generic/make-derivation.nix @@ -282,7 +282,7 @@ else let ++ [ "-DCMAKE_SYSTEM_NAME=${lib.findFirst lib.isString "Generic" ( lib.optional (!stdenv.hostPlatform.isRedox) stdenv.hostPlatform.uname.system)}"] ++ lib.optional (stdenv.hostPlatform.uname.processor != null) "-DCMAKE_SYSTEM_PROCESSOR=${stdenv.hostPlatform.uname.processor}" - ++ lib.optional (stdenv.hostPlatform.uname.release != null) "-DCMAKE_SYSTEM_VERSION=${stdenv.hostPlatform.release}" + ++ lib.optional (stdenv.hostPlatform.uname.release != null) "-DCMAKE_SYSTEM_VERSION=${stdenv.hostPlatform.uname.release}" ++ lib.optional (stdenv.hostPlatform.isDarwin) "-DCMAKE_OSX_ARCHITECTURES=${stdenv.hostPlatform.darwinArch}" ++ lib.optional (stdenv.buildPlatform.uname.system != null) "-DCMAKE_HOST_SYSTEM_NAME=${stdenv.buildPlatform.uname.system}" ++ lib.optional (stdenv.buildPlatform.uname.processor != null) "-DCMAKE_HOST_SYSTEM_PROCESSOR=${stdenv.buildPlatform.uname.processor}" diff --git a/pkgs/stdenv/linux/bootstrap-files/riscv64.nix b/pkgs/stdenv/linux/bootstrap-files/riscv64.nix new file mode 100644 index 000000000000..aaf1f153c787 --- /dev/null +++ b/pkgs/stdenv/linux/bootstrap-files/riscv64.nix @@ -0,0 +1,12 @@ +{ + busybox = import <nix/fetchurl.nix> { + url = "http://tarballs.nixos.org/stdenv-linux/riscv64/9bd3cf0063b80428bd85a286205adab4b6ffcbd6/busybox"; + sha256 = "6f61912f94bc4ef287d1ff48a9521ed16bd07d8d8ec775e471f32c64d346583d"; + executable = true; + }; + + bootstrapTools = import <nix/fetchurl.nix> { + url = "http://tarballs.nixos.org/stdenv-linux/riscv64/9bd3cf0063b80428bd85a286205adab4b6ffcbd6/bootstrap-tools.tar.xz"; + sha256 = "5466b19288e980125fc62ebb864d09908ffe0bc50cebe52cfee89acff14d5b9f"; + }; +} diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index b2b0dad82d82..d2c28b97ff93 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -16,6 +16,7 @@ armv7l-linux = import ./bootstrap-files/armv7l.nix; aarch64-linux = import ./bootstrap-files/aarch64.nix; mipsel-linux = import ./bootstrap-files/loongson2f.nix; + riscv64-linux = import ./bootstrap-files/riscv64.nix; }; musl = { aarch64-linux = import ./bootstrap-files/aarch64-musl.nix; |