Unverified Commit 2f6fc84a authored by jopejoe1's avatar jopejoe1 Committed by GitHub
Browse files

treewide: move CGO_* env vars into env for structuredAttrs (#492191)

parents fee322be 77446a7f
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -26,10 +26,12 @@ buildGoModule (finalAttrs: {
  proxyVendor = true;
  vendorHash = "sha256-0+YwlCHjiU46y333RSuaha4pLKFTYlj+M9+TFAALamY=";

  env = {
    # Fix error: 'Caught SIGILL in blst_cgo_init'
    # https://github.com/bnb-chain/bsc/issues/1521
    CGO_CFLAGS = "-O -D__BLST_PORTABLE__";
    CGO_CFLAGS_ALLOW = "-O -D__BLST_PORTABLE__";
  };

  ldflags = [
    "-s"
+1 −1
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ buildGoModule rec {
    "-X github.com/trezor/blockbook/common.buildDate=unknown"
  ];

  CGO_LDFLAGS = [
  env.CGO_LDFLAGS = toString [
    "-L${lib.getLib stdenv.cc.cc}/lib"
    "-lrocksdb"
    "-lz"
+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ buildGoModule (finalAttrs: {

  buildInputs = [ systemdLibs ];

  CGO_CFLAGS = "-I ${systemdLibs}/include";
  env.CGO_CFLAGS = "-I ${systemdLibs}/include";

  ldflags = [
    "-extldflags='-Wl,-z,lazy'"
+5 −1
Original line number Diff line number Diff line
@@ -52,7 +52,11 @@ buildGoModule rec {
    glibc
  ];

  CGO_LDFLAGS = "-lpcap -lpthread -static";
  env.CGO_LDFLAGS = toString [
    "-lpcap"
    "-lpthread"
    "-static"
  ];

  ldflags = [
    "-extldflags '-static'"
+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ buildGoModule (finalAttrs: {

  subPackages = [ "cmd/exportarr" ];

  CGO_ENABLE = 0;
  env.CGO_ENABLE = 0;

  ldflags = [
    "-s"
Loading