Unverified Commit bbb9e10f authored by Wolfgang Walther's avatar Wolfgang Walther Committed by GitHub
Browse files

treewide: move NIX_LDFLAGS into env for structuredAttrs (p-s) (#486066)

parents e6eae2ee 1657ac59
Loading
Loading
Loading
Loading
+11 −8
Original line number Diff line number Diff line
@@ -145,14 +145,17 @@ stdenv.mkDerivation (finalAttrs: {

  doInstallCheck = true;

  env = {
    # The build system uses custom logic - defined in
    # cmake/modules/FindNLopt.cmake in the package source - for finding the nlopt
    # library, which doesn't pick up the package in the nix store.  We
    # additionally need to set the path via the NLOPT environment variable.
    NLOPT = nlopt;

  }
  // lib.optionalAttrs withSystemd {
    # prusa-slicer uses dlopen on `libudev.so` at runtime
  NIX_LDFLAGS = lib.optionalString withSystemd "-ludev";
    NIX_LDFLAGS = "-ludev";
  };

  prePatch = ''
    # Since version 2.5.0 of nlopt we need to link to libnlopt, as libnlopt_cxx
+1 −1
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ stdenv.mkDerivation {
    "SVN_INCLUDE=${subversion.dev}/include/subversion-1"
  ];

  NIX_LDFLAGS = "-lsvn_fs-1";
  env.NIX_LDFLAGS = "-lsvn_fs-1";

  dontWrapQtApps = true;

+3 −1
Original line number Diff line number Diff line
@@ -16,7 +16,9 @@ stdenv.mkDerivation (finalAttrs: {

  buildInputs = lib.optional stdenv.hostPlatform.isMusl musl-fts;

  NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-lfts";
  env = lib.optionalAttrs stdenv.hostPlatform.isMusl {
    NIX_LDFLAGS = "-lfts";
  };

  buildPhase = ''
    sh Build.sh -r -tpax
+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ stdenv.mkDerivation (finalAttrs: {
    sha256 = "sha256-frISiZ89ei7XfI5F2nJJehfQZsk0Mlb4n91q/AiZ2vA=";
  };

  NIX_LDFLAGS = "-lfftw3_threads";
  env.NIX_LDFLAGS = "-lfftw3_threads";

  patches = [
    # proper pthread return value (https://github.com/clearscene/pHash/pull/20)
+3 −1
Original line number Diff line number Diff line
@@ -45,7 +45,9 @@ stdenv.mkDerivation rec {
    "-Dudevrulesdir=${placeholder "out"}/lib/udev/rules.d"
  ];

  NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-lintl";
  env = lib.optionalAttrs stdenv.hostPlatform.isDarwin {
    NIX_LDFLAGS = "-lintl";
  };

  doInstallCheck = true;

Loading