nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

tinyscheme: don't require the gcc stdenv

+37 -5
+26
pkgs/development/interpreters/tinyscheme/02-use-toolchain-env-vars.patch
··· 1 + diff --git a/makefile b/makefile 2 + index aeb2fcd..4c111a1 100644 3 + --- a/makefile 4 + +++ b/makefile 5 + @@ -18,7 +18,7 @@ 6 + #AR= echo 7 + 8 + # Unix, generally 9 + -CC = gcc -fpic -pedantic 10 + +CC := $(CC) -fpic -pedantic 11 + DEBUG=-g -Wall -Wno-char-subscripts -O 12 + Osuf=o 13 + SOsuf=so 14 + @@ -27,10 +27,10 @@ EXE_EXT= 15 + LIBPREFIX=lib 16 + OUT = -o $@ 17 + RM= -rm -f 18 + -AR= ar crs 19 + +AR := $(AR) crs 20 + 21 + # Linux 22 + -LD = gcc 23 + +LD := $(CC) 24 + LDFLAGS = -shared 25 + DEBUG=-g -Wno-char-subscripts -O 26 + SYS_LIBS= -ldl -lm
+10 -2
pkgs/development/interpreters/tinyscheme/default.nix
··· 1 - { lib, stdenv, fetchurl }: 1 + { lib, stdenv, fetchurl, dos2unix }: 2 2 3 3 stdenv.mkDerivation rec { 4 4 pname = "tinyscheme"; ··· 9 9 sha256 = "sha256-F7Cxv/0i89SdWDPiKhILM5A50s/aC0bW/FHdLwG0B60="; 10 10 }; 11 11 12 - patchPhase = '' 12 + nativeBuildInputs = [ dos2unix ]; 13 + 14 + prePatch = "dos2unix makefile"; 15 + patches = [ 16 + # We want to have the makefile pick up $CC, etc. so that we don't have 17 + # to unnecessarily tie this package to the GCC stdenv. 18 + ./02-use-toolchain-env-vars.patch 19 + ]; 20 + postPatch = '' 13 21 substituteInPlace scheme.c --replace "init.scm" "$out/lib/init.scm" 14 22 ''; 15 23
+1 -3
pkgs/top-level/all-packages.nix
··· 14346 14346 wasi-libc = pkgsCross.wasi32.wasilibc; 14347 14347 }; 14348 14348 14349 - tinyscheme = callPackage ../development/interpreters/tinyscheme { 14350 - stdenv = gccStdenv; 14351 - }; 14349 + tinyscheme = callPackage ../development/interpreters/tinyscheme { }; 14352 14350 14353 14351 bupc = callPackage ../development/compilers/bupc { }; 14354 14352