pkgs/development/compilers: stdenv.lib -> lib

This commit is contained in:
Ben Siraphob
2021-01-23 08:57:37 +07:00
parent bbaff89ceb
commit acc5f7b18a
320 changed files with 1660 additions and 1657 deletions
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, patchelf, gmp }:
{ lib, stdenv, fetchurl, patchelf, gmp }:
let
dynamic-linker = stdenv.cc.bintools.dynamicLinker;
in
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
throw "Architecture not supported";
buildInputs = [ gmp ];
nativeBuildInputs = stdenv.lib.optional stdenv.isLinux patchelf;
nativeBuildInputs = lib.optional stdenv.isLinux patchelf;
buildPhase = ''
make update \
@@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
make install PREFIX=$out
'';
postFixup = stdenv.lib.optionalString stdenv.isLinux ''
postFixup = lib.optionalString stdenv.isLinux ''
patchelf --set-interpreter ${dynamic-linker} $out/lib/mlton/mlton-compile
patchelf --set-rpath ${gmp}/lib $out/lib/mlton/mlton-compile
@@ -39,7 +39,7 @@ stdenv.mkDerivation rec {
patchelf --set-interpreter ${dynamic-linker} $out/bin/$e
patchelf --set-rpath ${gmp}/lib $out/bin/$e
done
'' + stdenv.lib.optionalString stdenv.isDarwin ''
'' + lib.optionalString stdenv.isDarwin ''
install_name_tool -change \
/opt/local/lib/libgmp.10.dylib \
${gmp}/lib/libgmp.10.dylib \