mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
libcap: disable go for unsupported host platforms (#412336)
This commit is contained in:
commit
3f20d926a3
2 changed files with 4 additions and 3 deletions
|
@ -556,7 +556,7 @@ let
|
|||
"x86_64" = "amd64";
|
||||
"wasm32" = "wasm";
|
||||
}
|
||||
.${final.parsed.cpu.name} or (throw "Unknown CPU variant ${final.parsed.cpu.name} by Go");
|
||||
.${final.parsed.cpu.name} or null;
|
||||
GOOS = if final.isWasi then "wasip1" else final.parsed.kernel.name;
|
||||
|
||||
# See https://go.dev/wiki/GoArm
|
||||
|
|
|
@ -8,7 +8,8 @@
|
|||
usePam ? !isStatic,
|
||||
pam ? null,
|
||||
isStatic ? stdenv.hostPlatform.isStatic,
|
||||
withGo ? pkgsBuildHost.go.meta.available,
|
||||
go,
|
||||
withGo ? lib.meta.availableOn stdenv.buildPlatform go && stdenv.hostPlatform.go.GOARCH != null,
|
||||
|
||||
# passthru.tests
|
||||
bind,
|
||||
|
@ -47,7 +48,7 @@ stdenv.mkDerivation rec {
|
|||
];
|
||||
|
||||
nativeBuildInputs = lib.optionals withGo [
|
||||
pkgsBuildHost.go
|
||||
go
|
||||
];
|
||||
|
||||
buildInputs = lib.optional usePam pam;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue