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

treewide: move CFLAGS into env for structuredAttrs (#492201)

parents f2771de7 2a29f30f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {

  buildInputs = [ libxcrypt ];

  CFLAGS = "-std=gnu89";
  env.CFLAGS = "-std=gnu89";

  preConfigure = ''
    sed -re 's/-[og] 0//g' -i Makefile*
+1 −1
Original line number Diff line number Diff line
@@ -166,7 +166,7 @@ stdenv.mkDerivation rec {
    "CONF_MODPATH_NVIDIA=${nvidia_x11.bin}/lib/xorg/modules"
  ];

  CFLAGS = [
  env.CFLAGS = toString [
    "-DX_MODULE_APPENDS=\\\"${xmodules}\\\""
  ];

+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ stdenv.mkDerivation (finalAttrs: {
    cmake
    pkg-config
  ];
  CFLAGS = "-D_GLIBCXX_USE_NANOSLEEP";
  env.CFLAGS = "-D_GLIBCXX_USE_NANOSLEEP";
  patches = [
    ./01-fix-sleep_for.patch
  ];
+3 −1
Original line number Diff line number Diff line
@@ -39,7 +39,9 @@ stdenv.mkDerivation (finalAttrs: {
    zlib
  ];

  CFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-D__off_t=off_t";
  env = lib.optionalAttrs stdenv.hostPlatform.isDarwin {
    CFLAGS = "-D__off_t=off_t";
  };

  postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
    # Fix the build on macOS with macFUSE installed. Needs autoreconfHook for
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ stdenv.mkDerivation {
      --replace "RXPATH=/usr/bin/ssh" "RXPATH=ssh"
  '';

  CFLAGS = "-D_DARWIN_C_SOURCE";
  env.CFLAGS = "-D_DARWIN_C_SOURCE";
  makeFlags = [ "DESTDIR=$(out)" ];
  buildInputs = [
    libx11
Loading