git.iko.soy/typeable/nixpkgs
on master help sign in
bluespec: unstable-2020.02.09 -> unstable-2020.11.04

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

commitd402d913d754469f421572284e00292f83de1af5 authorJack Cummings <jack@mudshark.org> dateWed 25 Nov 2020, 07:25 (6 years ago) parent03cca8d
5 files changed+67−22
pkgs/development/compilers/bluespec/default.nix+32−21 pkgs/development/compilers/bluespec/libstp_stub_makefile.patch+28 pkgs/development/libraries/incrtcl/default.nix+2 pkgs/development/libraries/itktcl/default.nix+2 pkgs/top-level/all-packages.nix+3−1
pkgs/development/compilers/bluespec/default.nix+32−21
@@ -4,40 +4,45 @@
44, autoconf
55, automake
66, fontconfig
7−, gmp
7+, gmp-static
88, gperf
99, libX11
1010, libpoly
1111, perl
12+, flex
13+, bison
1214, pkgconfig
15+, itktcl
16+, incrtcl
17+, tcl
18+, tk
1319, verilog
1420, xorg
21+, yices
1522, zlib
1623, ghc
1724}:
1825
1926let
20− # yices wants a libgmp.a and fails otherwise
21− gmpStatic = gmp.override { withStatic = true; };
22−
23− ghcWithPackages = ghc.withPackages (g: (with g; [old-time regex-compat syb]));
27+ ghcWithPackages = ghc.withPackages (g: (with g; [old-time regex-compat syb split ]));
2428in stdenv.mkDerivation rec {
2529 pname = "bluespec";
26− version = "unstable-2020.02.09";
30+ version = "unstable-2020.11.04";
2731
2832 src = fetchFromGitHub {
29− owner = "B-Lang-org";
30− repo = "bsc";
31− rev = "05c8afb08078e437c635b9c708124b428ac51b3d";
32− sha256 = "06yhpkz7wga1a0p9031cfjqbzw7205bj2jxgdghhfzmllaiphniy";
33− fetchSubmodules = true;
34− };
33+ owner = "B-Lang-org";
34+ repo = "bsc";
35+ rev = "103357f32cf63f2ca2b16ebc8e2c675ec5562464";
36+ sha256 = "0iikzx0fxky0fmc31lyxfldy1wixr2mayzcn24b8d76wd4ix1vk3";
37+ };
3538
3639 enableParallelBuilding = true;
3740
38− buildInputs = [
41+ patches = [ ./libstp_stub_makefile.patch ];
42+
43+ buildInputs = yices.buildInputs ++ [
3944 zlib
40− gmpStatic gperf libpoly # yices
45+ tcl tk
4146 libX11 # tcltk
4247 xorg.libXft
4348 fontconfig
@@ -46,6 +51,8 @@ in stdenv.mkDerivation rec {
4651 nativeBuildInputs = [
4752 automake autoconf
4853 perl
54+ flex
55+ bison
4956 pkgconfig
5057 ghcWithPackages
5158 ];
@@ -54,13 +61,13 @@ in stdenv.mkDerivation rec {
5461 verilog
5562 ];
5663
57− patches = [
58− # drop stp support https://github.com/B-Lang-org/bsc/pull/31
59− (fetchpatch {
60− url = "https://github.com/flokli/bsc/commit/0bd48ecc2561541dc1368918863c0b2f4915006f.patch";
61− sha256 = "0bam9anld33zfi9d4gs502g94w49zhl5iqmbs2d1p5i19aqpy38l";
62− })
63− ];
64+
65+ postUnpack = ''
66+ mkdir -p $sourceRoot/src/vendor/yices/v2.6/yices2
67+ # XXX: only works because yices.src isn't a tarball.
68+ cp -av ${yices.src}/* $sourceRoot/src/vendor/yices/v2.6/yices2
69+ chmod -R +rwX $sourceRoot/src/vendor/yices/v2.6/yices2
70+ '';
6471
6572 preBuild = ''
6673 patchShebangs \
@@ -72,11 +79,15 @@ in stdenv.mkDerivation rec {
7279 substituteInPlace src/comp/Makefile \
7380 --replace 'BINDDIR' 'BINDIR' \
7481 --replace 'install-bsc install-bluetcl' 'install-bsc install-bluetcl $(UTILEXES) install-utils'
82+ # allow running bsc to bootstrap
83+ export LD_LIBRARY_PATH=/build/source/inst/lib/SAT
7584 '';
7685
7786 makeFlags = [
87+ "NO_DEPS_CHECKS=1" # skip the subrepo check (this deriviation uses yices.src instead of the subrepo)
7888 "NOGIT=1" # https://github.com/B-Lang-org/bsc/issues/12
7989 "LDCONFIG=ldconfig" # https://github.com/B-Lang-org/bsc/pull/43
90+ "STP_STUB=1"
8091 ];
8192
8293 installPhase = "mv inst $out";
pkgs/development/compilers/bluespec/libstp_stub_makefile.patchnew file+28
@@ -0,0 +1,28 @@
1+diff -ru bsc-orig/src/vendor/stp/Makefile bsc-new/src/vendor/stp/Makefile
2+--- bsc-orig/src/vendor/stp/Makefile 1969-12-31 16:00:01.000000000 -0800
3++++ bsc-new/src/vendor/stp/Makefile 2020-11-12 17:42:40.115143035 -0800
4+@@ -9,12 +9,13 @@
5+ SRC = src
6+ else
7+ SRC = src_stub
8++SNAME += lib/libstp_stub.so
9+ endif
10+
11+ ifeq ($(OSTYPE), Darwin)
12+-SNAME=libstp.dylib
13++SNAME = lib/libstp.dylib
14+ else
15+-SNAME=libstp.so.1
16++SNAME += lib/libstp.so.1
17+ endif
18+
19+ all: install
20+@@ -23,7 +24,7 @@
21+ $(MAKE) -C $(SRC) install
22+ ln -fsn HaskellIfc include_hs
23+ install -m 755 -d $(PREFIX)/lib/SAT
24+- install -m 644 lib/$(SNAME) $(PREFIX)/lib/SAT
25++ install -m 644 $(SNAME) $(PREFIX)/lib/SAT
26+
27+ clean:
28+ $(MAKE) -C $(SRC) clean
pkgs/development/libraries/incrtcl/default.nix+2
@@ -24,6 +24,8 @@ stdenv.mkDerivation rec {
2424 postInstall = ''
2525 rmdir $out/bin
2626 mv $out/lib/itcl${version}/* $out/lib
27+ ln -s libitcl${version}${stdenv.hostPlatform.extensions.sharedLibrary} \
28+ $out/lib/libitcl${stdenv.lib.versions.major version}${stdenv.hostPlatform.extensions.sharedLibrary}
2729 rmdir $out/lib/itcl${version}
2830 '';
2931
pkgs/development/libraries/itktcl/default.nix+2
@@ -22,6 +22,8 @@ stdenv.mkDerivation rec {
2222 postInstall = ''
2323 rmdir $out/bin
2424 mv $out/lib/itk${version}/* $out/lib
25+ ln -s libitk${version}${stdenv.hostPlatform.extensions.sharedLibrary} \
26+ $out/lib/libitk${stdenv.lib.versions.major version}${stdenv.hostPlatform.extensions.sharedLibrary}
2527 rmdir $out/lib/itk${version}
2628 '';
2729
pkgs/top-level/all-packages.nix+3−1
@@ -8730,7 +8730,9 @@ in
87308730
87318731 binaryen = callPackage ../development/compilers/binaryen { };
87328732
8733− bluespec = callPackage ../development/compilers/bluespec { };
8733+ bluespec = callPackage ../development/compilers/bluespec {
8734+ gmp-static = gmp.override { withStatic = true; };
8735+ };
87348736
87358737 ciao = callPackage ../development/compilers/ciao { };
87368738