Commit 18fcbf12 authored by Tristan Ross's avatar Tristan Ross Committed by Masum Reza
Browse files

libselinux: move ldflags to env

parent 9a531206
Loading
Loading
Loading
Loading
+98 −98
Original line number Diff line number Diff line
@@ -15,9 +15,7 @@

assert enablePython -> swig != null && python3 != null;

stdenv.mkDerivation (
  finalAttrs:
  {
stdenv.mkDerivation (finalAttrs: {
  pname = "libselinux";
  version = "3.8.1";
  inherit (libsepol) se_url;
@@ -81,7 +79,15 @@ stdenv.mkDerivation (
  # command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
  hardeningDisable = [ "fortify" ];

    env.NIX_CFLAGS_COMPILE = "-Wno-error -D_FILE_OFFSET_BITS=64";
  env =
    {
      NIX_CFLAGS_COMPILE = "-Wno-error -D_FILE_OFFSET_BITS=64";
    }
    // lib.optionalAttrs
      (stdenv.cc.bintools.isLLVM && lib.versionAtLeast stdenv.cc.bintools.version "17")
      {
        NIX_LDFLAGS = "--undefined-version";
      };

  makeFlags =
    [
@@ -118,10 +124,4 @@ stdenv.mkDerivation (
  meta = removeAttrs libsepol.meta [ "outputsToInstall" ] // {
    description = "SELinux core library";
  };
  }
  //
    lib.optionalAttrs (stdenv.cc.bintools.isLLVM && lib.versionAtLeast stdenv.cc.bintools.version "17")
      {
        NIX_LDFLAGS = "--undefined-version";
      }
)
})