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
+6 -6
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, writeText, sbclBootstrap
{ lib, stdenv, fetchurl, writeText, sbclBootstrap
, sbclBootstrapHost ? "${sbclBootstrap}/bin/sbcl --disable-debugger --no-userinit --no-sysinit"
, threadSupport ? (stdenv.isi686 || stdenv.isx86_64 || "aarch64-linux" == stdenv.hostPlatform.system)
, disableImmobileSpace ? false
@@ -70,17 +70,17 @@ stdenv.mkDerivation rec {
export HOME=$PWD/test-home
'';
enableFeatures = with stdenv.lib;
enableFeatures = with lib;
optional threadSupport "sb-thread" ++
optional stdenv.isAarch32 "arm";
disableFeatures = with stdenv.lib;
disableFeatures = with lib;
optional (!threadSupport) "sb-thread" ++
optionals disableImmobileSpace [ "immobile-space" "immobile-code" "compact-instance-header" ];
buildPhase = ''
sh make.sh --prefix=$out --xc-host="${sbclBootstrapHost}" ${
stdenv.lib.concatStringsSep " "
lib.concatStringsSep " "
(builtins.map (x: "--with-${x}") enableFeatures ++
builtins.map (x: "--without-${x}") disableFeatures)
}
@@ -90,7 +90,7 @@ stdenv.mkDerivation rec {
installPhase = ''
INSTALL_ROOT=$out sh install.sh
''
+ stdenv.lib.optionalString (!purgeNixReferences) ''
+ lib.optionalString (!purgeNixReferences) ''
cp -r src $out/lib/sbcl
cp -r contrib $out/lib/sbcl
cat >$out/lib/sbcl/sbclrc <<EOF
@@ -100,7 +100,7 @@ stdenv.mkDerivation rec {
EOF
'';
setupHook = stdenv.lib.optional purgeNixReferences (writeText "setupHook.sh" ''
setupHook = lib.optional purgeNixReferences (writeText "setupHook.sh" ''
addEnvHooks "$targetOffset" _setSbclHome
_setSbclHome() {
export SBCL_HOME='@out@/lib/sbcl/'
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, makeWrapper }:
{ lib, stdenv, fetchurl, makeWrapper }:
let
options = rec {
@@ -65,11 +65,11 @@ stdenv.mkDerivation rec {
--add-flags "--core $out/share/sbcl/sbcl.core"
'';
postFixup = stdenv.lib.optionalString (!stdenv.isAarch32 && stdenv.isLinux) ''
postFixup = lib.optionalString (!stdenv.isAarch32 && stdenv.isLinux) ''
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $out/share/sbcl/sbcl
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "Lisp compiler";
homepage = "http://www.sbcl.org";
license = licenses.publicDomain; # and FreeBSD
+6 -6
View File
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, writeText, sbclBootstrap
{ lib, stdenv, fetchurl, writeText, sbclBootstrap
, sbclBootstrapHost ? "${sbclBootstrap}/bin/sbcl --disable-debugger --no-userinit --no-sysinit"
, threadSupport ? (stdenv.isi686 || stdenv.isx86_64 || "aarch64-linux" == stdenv.hostPlatform.system)
, disableImmobileSpace ? false
@@ -70,17 +70,17 @@ stdenv.mkDerivation rec {
export HOME=$PWD/test-home
'';
enableFeatures = with stdenv.lib;
enableFeatures = with lib;
optional threadSupport "sb-thread" ++
optional stdenv.isAarch32 "arm";
disableFeatures = with stdenv.lib;
disableFeatures = with lib;
optional (!threadSupport) "sb-thread" ++
optionals disableImmobileSpace [ "immobile-space" "immobile-code" "compact-instance-header" ];
buildPhase = ''
sh make.sh --prefix=$out --xc-host="${sbclBootstrapHost}" ${
stdenv.lib.concatStringsSep " "
lib.concatStringsSep " "
(builtins.map (x: "--with-${x}") enableFeatures ++
builtins.map (x: "--without-${x}") disableFeatures)
}
@@ -90,7 +90,7 @@ stdenv.mkDerivation rec {
installPhase = ''
INSTALL_ROOT=$out sh install.sh
''
+ stdenv.lib.optionalString (!purgeNixReferences) ''
+ lib.optionalString (!purgeNixReferences) ''
cp -r src $out/lib/sbcl
cp -r contrib $out/lib/sbcl
cat >$out/lib/sbcl/sbclrc <<EOF
@@ -100,7 +100,7 @@ stdenv.mkDerivation rec {
EOF
'';
setupHook = stdenv.lib.optional purgeNixReferences (writeText "setupHook.sh" ''
setupHook = lib.optional purgeNixReferences (writeText "setupHook.sh" ''
addEnvHooks "$targetOffset" _setSbclHome
_setSbclHome() {
export SBCL_HOME='@out@/lib/sbcl/'