tinyscheme: don't require the gcc stdenv
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
diff --git a/makefile b/makefile
|
||||
index aeb2fcd..4c111a1 100644
|
||||
--- a/makefile
|
||||
+++ b/makefile
|
||||
@@ -18,7 +18,7 @@
|
||||
#AR= echo
|
||||
|
||||
# Unix, generally
|
||||
-CC = gcc -fpic -pedantic
|
||||
+CC := $(CC) -fpic -pedantic
|
||||
DEBUG=-g -Wall -Wno-char-subscripts -O
|
||||
Osuf=o
|
||||
SOsuf=so
|
||||
@@ -27,10 +27,10 @@ EXE_EXT=
|
||||
LIBPREFIX=lib
|
||||
OUT = -o $@
|
||||
RM= -rm -f
|
||||
-AR= ar crs
|
||||
+AR := $(AR) crs
|
||||
|
||||
# Linux
|
||||
-LD = gcc
|
||||
+LD := $(CC)
|
||||
LDFLAGS = -shared
|
||||
DEBUG=-g -Wno-char-subscripts -O
|
||||
SYS_LIBS= -ldl -lm
|
||||
@@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, fetchurl }:
|
||||
{ lib, stdenv, fetchurl, dos2unix }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "tinyscheme";
|
||||
@@ -9,7 +9,15 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "sha256-F7Cxv/0i89SdWDPiKhILM5A50s/aC0bW/FHdLwG0B60=";
|
||||
};
|
||||
|
||||
patchPhase = ''
|
||||
nativeBuildInputs = [ dos2unix ];
|
||||
|
||||
prePatch = "dos2unix makefile";
|
||||
patches = [
|
||||
# We want to have the makefile pick up $CC, etc. so that we don't have
|
||||
# to unnecessarily tie this package to the GCC stdenv.
|
||||
./02-use-toolchain-env-vars.patch
|
||||
];
|
||||
postPatch = ''
|
||||
substituteInPlace scheme.c --replace "init.scm" "$out/lib/init.scm"
|
||||
'';
|
||||
|
||||
|
||||
@@ -14346,9 +14346,7 @@ with pkgs;
|
||||
wasi-libc = pkgsCross.wasi32.wasilibc;
|
||||
};
|
||||
|
||||
tinyscheme = callPackage ../development/interpreters/tinyscheme {
|
||||
stdenv = gccStdenv;
|
||||
};
|
||||
tinyscheme = callPackage ../development/interpreters/tinyscheme { };
|
||||
|
||||
bupc = callPackage ../development/compilers/bupc { };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user