Commit 046f091e authored by John Ericson's avatar John Ericson
Browse files

treewide: Don't use envHook anymore

This commits needs a MAJOR audit as I oftentimes just guessed which of
`$hostOffset`, `$targetOffset`, or a fixed offset should be used.
parent a1cdc201
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ stdenv.mkDerivation {
      fi
    }

    envHooks=(''${envHooks[@]} addCoqPath)
    addEnvHooks "$targetOffset" addCoqPath
  '';

  passthru = {
+1 −1
Original line number Diff line number Diff line
@@ -109,7 +109,7 @@ self = stdenv.mkDerivation {
      fi
    }

    envHooks=(''${envHooks[@]} addCoqPath)
    addEnvHooks "$targetOffset" addCoqPath
  '';

  preConfigure = ''
+4 −2
Original line number Diff line number Diff line
addRLibPath () {
    addToSearchPath R_LIBS_SITE $1/library
    if [[ -d "$1/library" ]]; then
        addToSearchPath R_LIBS_SITE "$1/library"
    fi
}

envHooks+=(addRLibPath)
addEnvHooks "$targetOffset" addRLibPath
+5 −1
Original line number Diff line number Diff line
@@ -4,4 +4,8 @@ addEmacsVars () {
  fi
}

envHooks+=(addEmacsVars)
# If this is for a wrapper derivation, emacs and the dependencies are all
# run-time dependencies. If this is for precompiling packages into bytecode,
# emacs is a compile-time dependency of the package.
addEnvHooks "$targetOffset" addEmacsVars
addEnvHooks "$targetOffset" addEmacsVars
+2 −2
Original line number Diff line number Diff line
addCVars () {
gccWrapperOld_addCVars () {
    if test -d $1/include; then
        export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -isystem $1/include"
    fi
@@ -12,7 +12,7 @@ addCVars () {
    fi
}

envHooks=(${envHooks[@]} addCVars)
envBuildBuildHooks+=(gccWrapperOld_addCVars)

# Note: these come *after* $out in the PATH (see setup.sh).

Loading