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

treewide: move env variable(s) into env for structuredAttrs (K-M) (#489749)

parents 43041e96 25215911
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ stdenv.mkDerivation rec {
    opencl-headers
  ];

  LIBLEPT_HEADERSDIR = "${leptonica}/include";
  env.LIBLEPT_HEADERSDIR = "${leptonica}/include";

  meta = {
    description = "OCR engine";
+8 −7
Original line number Diff line number Diff line
@@ -114,8 +114,6 @@ stdenv.mkDerivation rec {
    "doc"
  ];

  FONTCONFIG_FILE = toString fontsConf;

  propagatedUserEnvPkgs = [ hicolor-icon-theme ];
  buildInputs = [
    cairo
@@ -150,11 +148,14 @@ stdenv.mkDerivation rec {
  ]
  ++ lib.optional lua.pkgs.isLuaJIT "-DLUA_LIBRARY=${lua}/lib/libluajit-5.1.so";

  env = {
    FONTCONFIG_FILE = toString fontsConf;
    GI_TYPELIB_PATH = "${pango.out}/lib/girepository-1.0";
    # LUA_CPATH and LUA_PATH are used only for *building*, see the --search flags
    # below for how awesome finds the libraries it needs at runtime.
    LUA_CPATH = "${luaEnv}/lib/lua/${lua.luaversion}/?.so";
    LUA_PATH = "${luaEnv}/share/lua/${lua.luaversion}/?.lua;;";
  };

  postInstall = ''
    # Don't use wrapProgram or the wrapper will duplicate the --search
+11 −10
Original line number Diff line number Diff line
@@ -192,7 +192,8 @@ stdenv.mkDerivation (
    ]
    ++ lib.optional optimize "--optimize";

    env.NIX_CFLAGS_COMPILE = toString [
    env = {
      NIX_CFLAGS_COMPILE = toString [
        # 'ioprio_set' syscall support:
        "-D_GNU_SOURCE"
        # compiler doesn't find headers without these:
@@ -200,6 +201,8 @@ stdenv.mkDerivation (
        "-I${lib.getDev sratom}/include/sratom-0"
        "-I${lib.getDev sord}/include/sord-0"
      ];
      LINKFLAGS = "-lpthread";
    };

    postInstall = ''
      # wscript does not install these for some reason
@@ -227,8 +230,6 @@ stdenv.mkDerivation (
        }"
    '';

    LINKFLAGS = "-lpthread";

    meta = {
      description = "Multi-track hard disk recording software";
      longDescription = ''
+4 −1
Original line number Diff line number Diff line
@@ -33,7 +33,10 @@ buildBazelPackage rec {
    "--registry"
    "file://${registry}"
  ];
  LIBTOOL = lib.optionalString stdenv.hostPlatform.isDarwin "${cctools}/bin/libtool";

  env = lib.optionalAttrs stdenv.hostPlatform.isDarwin {
    LIBTOOL = "${cctools}/bin/libtool";
  };

  postPatch = ''
    patchShebangs scripts/create-workspace-status.sh
+11 −11
Original line number Diff line number Diff line
@@ -177,12 +177,17 @@ stdenv.mkDerivation rec {
    cctools
  ];

  env.NIX_CFLAGS_COMPILE = toString (
    lib.optionals (stdenv.cc.isClang) [
  env =
    lib.optionalAttrs (stdenv.cc.isClang) {
      NIX_CFLAGS_COMPILE = toString [
        # wide_data.cxx:1750:15: error: variable length arrays in C++ are a Clang extension [-Werror,-Wvla-cxx-extension]
        "-Wno-error"
    ]
  );
      ];
    }
    // lib.optionalAttrs (withSuiteCheck && stdenv.hostPlatform.isLinux) {
      # bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
      LOCALE_ARCHIVE = "${glibcLocales}/lib/locale/locale-archive";
    };

  makeFlags = [
    "NO_DEPS_CHECKS=1" # skip the subrepo check (this deriviation uses yices-src instead of the subrepo)
@@ -235,11 +240,6 @@ stdenv.mkDerivation rec {

  checkTarget = if withSuiteCheck then "checkparallel" else "check-smoke"; # this is the shortest check but "check-suite" tests much more

  # bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
  LOCALE_ARCHIVE = lib.optionalString (
    withSuiteCheck && stdenv.hostPlatform.isLinux
  ) "${glibcLocales}/lib/locale/locale-archive";

  nativeCheckInputs = [
    gmp-static
    iverilog
Loading