chez-scheme: 9.5-20171109 -> 9.5.1

- Add a new postInstall hook that installs Chez's kernel.o file into
the library directory. This library /should/ be installed by Chez, but
isn't, and it's the only way to properly embed Chez in your applications
or write your own shell/bootfile harness directly.

- Fixes the version number for Nix to properly reflect the one Chez
shows the user.

- Loose odds and ends (fix homepage URL, tidy up comments)

Signed-off-by: Austin Seipp <aseipp@pobox.com>

+37 -8
+37 -8
pkgs/development/compilers/chez/default.nix
··· 2 3 stdenv.mkDerivation rec { 4 name = "chez-scheme-${version}"; 5 - version = "9.5-${dver}"; 6 - dver = "20171109"; 7 8 src = fetchgit { 9 url = "https://github.com/cisco/chezscheme.git"; ··· 13 }; 14 15 nativeBuildInputs = [ coreutils ] ++ stdenv.lib.optional stdenv.isDarwin cctools; 16 - 17 buildInputs = [ ncurses libiconv libX11 ]; 18 19 - /* We patch out a very annoying 'feature' in ./configure, which 20 ** tries to use 'git' to update submodules. 21 ** 22 ** We have to also fix a few occurrences to tools with absolute ··· 38 --replace "/usr/bin/libtool" libtool 39 ''; 40 41 - /* Don't use configureFlags, since that just implicitly appends 42 ** everything onto a --prefix flag, which ./configure gets very angry 43 ** about. 44 */ 45 configurePhase = '' 46 - ./configure --threads --installprefix=$out --installman=$out/share/man 47 ''; 48 49 - enableParallelBuilding = true; 50 51 meta = { 52 description = "A powerful and incredibly fast R6RS Scheme compiler"; 53 - homepage = "http://www.scheme.com"; 54 license = stdenv.lib.licenses.asl20; 55 platforms = stdenv.lib.platforms.unix; 56 maintainers = with stdenv.lib.maintainers; [ thoughtpolice ];
··· 2 3 stdenv.mkDerivation rec { 4 name = "chez-scheme-${version}"; 5 + version = "9.5.1"; 6 7 src = fetchgit { 8 url = "https://github.com/cisco/chezscheme.git"; ··· 12 }; 13 14 nativeBuildInputs = [ coreutils ] ++ stdenv.lib.optional stdenv.isDarwin cctools; 15 buildInputs = [ ncurses libiconv libX11 ]; 16 17 + enableParallelBuilding = true; 18 + 19 + /* 20 + ** We patch out a very annoying 'feature' in ./configure, which 21 ** tries to use 'git' to update submodules. 22 ** 23 ** We have to also fix a few occurrences to tools with absolute ··· 39 --replace "/usr/bin/libtool" libtool 40 ''; 41 42 + /* 43 + ** Don't use configureFlags, since that just implicitly appends 44 ** everything onto a --prefix flag, which ./configure gets very angry 45 ** about. 46 + ** 47 + ** Also, carefully set a manual workarea argument, so that we 48 + ** can later easily find the machine type that we built Chez 49 + ** for. 50 */ 51 configurePhase = '' 52 + ./configure --threads \ 53 + --installprefix=$out --installman=$out/share/man \ 54 + --workarea=work 55 ''; 56 57 + /* 58 + ** Install the kernel.o file, so we can compile C applications that 59 + ** link directly to the Chez runtime (for booting their own files, or 60 + ** embedding.) 61 + ** 62 + ** Ideally in the future this would be less of a hack and could be 63 + ** done by Chez itself. Alternatively, there could just be a big 64 + ** case statement matching to the different stdenv.platform values... 65 + */ 66 + postInstall = '' 67 + m="$(ls ./work/boot)" 68 + if [ "x''${m[1]}" != "x" ]; then 69 + >&2 echo "ERROR: more than one bootfile build found; this is a nixpkgs error" 70 + exit 1 71 + fi 72 + 73 + kernel=./work/boot/$m/kernel.o 74 + kerneldest=$out/lib/csv${version}/$m/ 75 + 76 + echo installing $kernel to $kerneldest 77 + cp $kernel $kerneldest/kernel.o 78 + ''; 79 80 meta = { 81 description = "A powerful and incredibly fast R6RS Scheme compiler"; 82 + homepage = https://cisco.github.io/ChezScheme/; 83 license = stdenv.lib.licenses.asl20; 84 platforms = stdenv.lib.platforms.unix; 85 maintainers = with stdenv.lib.maintainers; [ thoughtpolice ];