libcap: use correct cross golang cross compiler (#373364)

(cherry picked from commit 619aca53daccee3bd84bfa643b48410ef1a015f1)

authored by Colin and committed by Vladimír Čunát 76c80aa7 4eec8b98

+6 -5
+6 -5
pkgs/by-name/li/libcap/package.nix
··· 1 1 { stdenv, lib, buildPackages, fetchurl, runtimeShell 2 + , pkgsBuildHost 2 3 , usePam ? !isStatic, pam ? null 3 4 , isStatic ? stdenv.hostPlatform.isStatic 4 - , withGo ? go.meta.available, go 5 + , withGo ? pkgsBuildHost.go.meta.available 5 6 6 7 # passthru.tests 7 8 , bind ··· 35 36 ]; 36 37 37 38 nativeBuildInputs = lib.optionals withGo [ 38 - go 39 + pkgsBuildHost.go 39 40 ]; 40 41 41 42 buildInputs = lib.optional usePam pam; ··· 50 51 "GOLANG=yes" 51 52 ''GOCACHE=''${TMPDIR}/go-cache'' 52 53 "GOFLAGS=-trimpath" 53 - "GOARCH=${go.GOARCH}" 54 - "GOOS=${go.GOOS}" 54 + "GOARCH=${pkgsBuildHost.go.GOARCH}" 55 + "GOOS=${pkgsBuildHost.go.GOOS}" 55 56 ] ++ lib.optionals isStatic [ "SHARED=no" "LIBCSTATIC=yes" ]; 56 57 57 58 postPatch = '' ··· 87 88 strictDeps = true; 88 89 89 90 disallowedReferences = lib.optionals withGo [ 90 - go 91 + pkgsBuildHost.go 91 92 ]; 92 93 93 94 passthru.tests = {