Merge pull request #261120 from MuKnIO/gerbil-0.18

Gerbil 0.18

authored by

7c6f434c and committed by
GitHub
245a5d60 7ac98903

+326 -108
+11 -1
pkgs/development/compilers/gambit/build.nix
··· 5 5 stampYmd ? 0, stampHms ? 0, 6 6 gambit-support, 7 7 optimizationSetting ? "-O1", 8 - gambit-params ? pkgs.gambit-support.stable-params }: 8 + gambit-params ? pkgs.gambit-support.stable-params, 9 + rev ? git-version }: 9 10 10 11 # Note that according to a benchmark run by Marc Feeley on May 2018, 11 12 # clang is 10x (with default settings) to 15% (with -O2) slower than GCC at compiling ··· 30 31 inherit src version git-version; 31 32 bootstrap = gambit-support.gambit-bootstrap; 32 33 34 + passthru = { 35 + inherit src version git-version rev stampYmd stampHms optimizationSetting openssl; 36 + }; 37 + 38 + 33 39 nativeBuildInputs = [ git autoconf ]; 34 40 35 41 # TODO: if/when we can get all the library packages we depend on to have static versions, ··· 47 53 "--enable-c-opt=${optimizationSetting}" 48 54 "--enable-c-opt-rts=-O2" 49 55 "--enable-gcc-opts" 56 + "--enable-trust-c-tco" 50 57 "--enable-shared" 51 58 "--enable-absolute-shared-libs" # Yes, NixOS will want an absolute path, and fix it. 52 59 "--enable-openssl" ··· 70 77 # "--enable-char-size=1" # default is 4 71 78 # "--enable-march=native" # Nope, makes it not work on machines older than the builder 72 79 ] ++ gambit-params.extraOptions 80 + # TODO: pick an appropriate architecture to optimize on on x86-64? 81 + # https://gcc.gnu.org/onlinedocs/gcc-4.8.4/gcc/i386-and-x86-64-Options.html#i386-and-x86-64-Options 82 + # ++ lib.optional pkgs.stdenv.isx86_64 "--enable-march=core-avx2" 73 83 # Do not enable poll on darwin due to https://github.com/gambit/gambit/issues/498 74 84 ++ lib.optional (!gccStdenv.isDarwin) "--enable-poll"; 75 85
+1 -1
pkgs/development/compilers/gambit/default.nix
··· 2 2 3 3 callPackage ./build.nix rec { 4 4 version = "4.9.5"; 5 - git-version = version; 5 + git-version = "v${version}"; 6 6 src = fetchurl { 7 7 url = "https://gambitscheme.org/4.9.5/gambit-v4_9_5.tgz"; 8 8 sha256 = "sha256-4o74218OexFZcgwVAFPcq498TK4fDlyDiUR5cHP4wdw=";
+5 -4
pkgs/development/compilers/gambit/gambit-support.nix
··· 13 13 --replace "$(grep '^PACKAGE_VERSION=.*$' configure)" 'PACKAGE_VERSION="v${git-version}"' \ 14 14 --replace "$(grep '^PACKAGE_STRING=.*$' configure)" 'PACKAGE_STRING="Gambit v${git-version}"' ; 15 15 substituteInPlace include/makefile.in \ 16 - --replace "echo > stamp.h;" "(echo '#define ___STAMP_VERSION \"${git-version}\"'; echo '#define ___STAMP_YMD ${toString stampYmd}'; echo '#define ___STAMP_HMS ${toString stampHms}';) > stamp.h;"; 16 + --replace "\$\$(\$(GIT) describe --tag --always | sed 's/-bootstrap\$\$//')" "v${git-version}" \ 17 + --replace "echo > stamp.h;" "(echo '#define ___STAMP_VERSION \"v${git-version}\"'; echo '#define ___STAMP_YMD ${toString stampYmd}'; echo '#define ___STAMP_HMS ${toString stampHms}';) > stamp.h;"; 18 + grep -i ' version=\|echo..#define ___STAMP_VERSION' include/makefile.in # XXX DEBUG -- REMOVE ME 17 19 ''; 18 20 modules = true; 19 - #extraOptions = []; 20 - extraOptions = ["--enable-trust-c-tco" "CFLAGS=-foptimize-sibling-calls"]; 21 + extraOptions = ["CFLAGS=-foptimize-sibling-calls"]; 21 22 }; 22 23 23 24 unstable-params = stable-params // { 24 25 stable = false; 25 - extraOptions = ["--enable-trust-c-tco"]; # "CFLAGS=-foptimize-sibling-calls" not necessary in latest unstable 26 + extraOptions = []; # "CFLAGS=-foptimize-sibling-calls" not necessary in latest unstable 26 27 }; 27 28 28 29 export-gambopt = params : "export GAMBOPT=${params.buildRuntimeOptions} ;";
+8 -7
pkgs/development/compilers/gambit/unstable.nix
··· 1 1 { callPackage, fetchFromGitHub, gambit-support }: 2 2 3 - callPackage ./build.nix { 4 - version = "unstable-2023-08-06"; 5 - git-version = "4.9.5-5-gf1fbe9aa"; 6 - stampYmd = 20230806; 7 - stampHms = 195822; 3 + callPackage ./build.nix rec { 4 + version = "unstable-2023-10-07"; 5 + git-version = "4.9.5-59-g342399c7"; 6 + stampYmd = 20231007; 7 + stampHms = 170745; 8 + rev = "342399c736ec560c0ff4faeaeb9599b45633f26c"; 8 9 src = fetchFromGitHub { 9 10 owner = "gambit"; 10 11 repo = "gambit"; 11 - rev = "f1fbe9aa0f461e89f2a91bc050c1373ee6d66482"; 12 - sha256 = "0b0gd6cwj8zxwcqglpsnmanysiq4mvma2mrgdfr6qy99avhbhzxm"; 12 + inherit rev; 13 + sha256 = "121pj6lxihjjnfq33lq4m5hi461xbs9f41qd4l46556dr15cyf8f"; 13 14 }; 14 15 gambit-params = gambit-support.unstable-params; 15 16 }
+58 -25
pkgs/development/compilers/gerbil/build.nix
··· 1 1 { pkgs, gccStdenv, lib, coreutils, 2 - openssl, zlib, sqlite, libxml2, libyaml, libmysqlclient, lmdb, leveldb, postgresql, 3 - version, git-version, 2 + openssl, zlib, sqlite, 3 + version, git-version, src, 4 4 gambit-support, 5 - gambit ? pkgs.gambit, gambit-params ? pkgs.gambit-support.stable-params, src }: 5 + gambit-git-version, 6 + gambit-stampYmd, 7 + gambit-stampHms, 8 + gambit-params }: 6 9 7 10 # We use Gambit, that works 10x better with GCC than Clang. See ../gambit/build.nix 8 11 let stdenv = gccStdenv; in ··· 12 15 inherit version; 13 16 inherit src; 14 17 15 - buildInputs_libraries = [ openssl zlib sqlite libxml2 libyaml libmysqlclient lmdb leveldb postgresql ]; 18 + buildInputs_libraries = [ openssl zlib sqlite ]; 16 19 17 20 # TODO: either fix all of Gerbil's dependencies to provide static libraries, 18 21 # or give up and delete all tentative support for static libraries. 19 22 #buildInputs_staticLibraries = map makeStaticLibraries buildInputs_libraries; 20 23 21 - buildInputs = [ gambit ] 22 - ++ buildInputs_libraries; # ++ buildInputs_staticLibraries; 23 - 24 - env.NIX_CFLAGS_COMPILE = "-I${libmysqlclient}/include/mysql -L${libmysqlclient}/lib/mysql"; 24 + buildInputs = buildInputs_libraries; 25 25 26 26 postPatch = '' 27 27 echo '(define (gerbil-version-string) "v${git-version}")' > src/gerbil/runtime/gx-version.scm ; ··· 29 29 grep -Fl '#!/usr/bin/env' `find . -type f -executable` | while read f ; do 30 30 substituteInPlace "$f" --replace '#!/usr/bin/env' '#!${coreutils}/bin/env' ; 31 31 done ; 32 + substituteInPlace ./configure --replace 'set -e' 'set -e ; git () { echo "v${git-version}" ;}' ; 33 + substituteInPlace ./src/build/build-version.scm --replace "with-exception-catcher" '(lambda _ "v${git-version}")' ; 34 + #rmdir src/gambit 35 + #cp -a ${pkgs.gambit-unstable.src} ./src/gambit 36 + chmod -R u+w ./src/gambit 37 + ( cd src/gambit ; ${gambit-params.fixStamp gambit-git-version gambit-stampYmd gambit-stampHms} ) 38 + for f in src/bootstrap/gerbil/compiler/driver__0.scm \ 39 + src/build/build-libgerbil.ss \ 40 + src/gerbil/compiler/driver.ss ; do 41 + substituteInPlace "$f" --replace '"gcc"' '"${gccStdenv.cc}/bin/${gccStdenv.cc.targetPrefix}gcc"' ; 42 + done 32 43 ''; 33 44 34 45 ## TODO: make static compilation work. ··· 40 51 # OPENSSL_LIBSSL=${makeStaticLibraries openssl}/lib/libssl.a # MISSING! 41 52 # ZLIB=${makeStaticLibraries zlib}/lib/libz.a 42 53 # SQLITE=${makeStaticLibraries sqlite}/lib/sqlite.a # MISSING! 43 - # LIBXML2=${makeStaticLibraries libxml2}/lib/libxml2.a # MISSING! 44 - # YAML=${makeStaticLibraries libyaml}/lib/libyaml.a # MISSING! 45 - # MYSQL=${makeStaticLibraries libmysqlclient}/lib/mariadb/libmariadb.a 46 - # LMDB=${makeStaticLibraries lmdb}/lib/mysql/libmysqlclient_r.a # MISSING! 47 - # LEVELDB=${makeStaticLibraries leveldb}/lib/libleveldb.a 48 54 # EOF 49 55 56 + configureFlags = [ 57 + "--prefix=$out/gerbil" 58 + "--enable-zlib" 59 + "--enable-sqlite" 60 + "--enable-shared" 61 + "--disable-deprecated" 62 + "--enable-march=" # Avoid non-portable invalid instructions 63 + ]; 64 + 50 65 configurePhase = '' 51 - (cd src && ./configure \ 52 - --prefix=$out/gerbil \ 53 - --with-gambit=${gambit}/gambit \ 54 - --enable-libxml \ 55 - --enable-libyaml \ 56 - --enable-zlib \ 57 - --enable-sqlite \ 58 - --enable-mysql \ 59 - --enable-lmdb \ 60 - --enable-leveldb) 66 + export CC=${gccStdenv.cc}/bin/${gccStdenv.cc.targetPrefix}gcc \ 67 + CXX=${gccStdenv.cc}/bin/${gccStdenv.cc.targetPrefix}g++ \ 68 + CPP=${gccStdenv.cc}/bin/${gccStdenv.cc.targetPrefix}cpp \ 69 + CXXCPP=${gccStdenv.cc}/bin/${gccStdenv.cc.targetPrefix}cpp \ 70 + LD=${gccStdenv.cc}/bin/${gccStdenv.cc.targetPrefix}ld \ 71 + XMKMF=${coreutils}/bin/false 72 + unset CFLAGS LDFLAGS LIBS CPPFLAGS CXXFLAGS 73 + (cd src/gambit ; ${gambit-params.fixStamp gambit-git-version gambit-stampYmd gambit-stampHms}) 74 + ./configure ${builtins.concatStringsSep " " configureFlags} 75 + (cd src/gambit ; 76 + substituteInPlace config.status \ 77 + ${lib.optionalString (gccStdenv.isDarwin && !gambit-params.stable) 78 + ''--replace "/usr/local/opt/openssl@1.1" "${lib.getLib openssl}"''} \ 79 + --replace "/usr/local/opt/openssl" "${lib.getLib openssl}" 80 + ./config.status 81 + ) 61 82 ''; 83 + 84 + extraLdOptions = [ 85 + "-L${zlib}/lib" 86 + "-L${openssl.out}/lib" 87 + "-L${sqlite.out}/lib" 88 + ]; 62 89 63 90 buildPhase = '' 64 91 runHook preBuild ··· 68 95 export GERBIL_BUILD_CORES=$NIX_BUILD_CORES 69 96 export GERBIL_GXC=$PWD/bin/gxc 70 97 export GERBIL_BASE=$PWD 71 - export GERBIL_HOME=$PWD 98 + export GERBIL_PREFIX=$PWD 72 99 export GERBIL_PATH=$PWD/lib 73 100 export PATH=$PWD/bin:$PATH 74 101 ${gambit-support.export-gambopt gambit-params} ··· 76 103 # Build, replacing make by build.sh 77 104 ( cd src && sh build.sh ) 78 105 106 + f=build/lib/libgerbil.so.ldd ; [ -f $f ] && : 107 + substituteInPlace "$f" --replace '(' \ 108 + '(${lib.strings.concatStrings (map (x: "\"${x}\" " ) extraLdOptions)}' 109 + 79 110 runHook postBuild 80 111 ''; 81 112 82 113 installPhase = '' 83 114 runHook preInstall 84 115 mkdir -p $out/gerbil $out/bin 85 - (cd src; ./install) 116 + ./install.sh 86 117 (cd $out/bin ; ln -s ../gerbil/bin/* .) 87 118 runHook postInstall 88 119 ''; ··· 98 129 platforms = lib.platforms.unix; 99 130 maintainers = with lib.maintainers; [ fare ]; 100 131 }; 132 + 133 + outputsToInstall = [ "out" ]; 101 134 }
+12 -6
pkgs/development/compilers/gerbil/default.nix
··· 1 - { callPackage, fetchFromGitHub }: 1 + { callPackage, fetchFromGitHub, gambit-unstable, gambit-support, pkgs, gccStdenv }: 2 2 3 3 callPackage ./build.nix rec { 4 - version = "0.17"; 5 - git-version = version; 4 + version = "0.18"; 5 + git-version = "0.18"; 6 6 src = fetchFromGitHub { 7 - owner = "vyzo"; 7 + owner = "mighty-gerbils"; 8 8 repo = "gerbil"; 9 - rev = "v${version}"; 10 - sha256 = "0xzi9mhrmzcajhlz5qcnz4yjlljvbkbm9426iifgjn47ac0965zw"; 9 + rev = "8ca36a928bc9345f9d28e5f2dfcb55ca558e85f9"; 10 + sha256 = "sha256-EMiYgQM/Gl+dh6AxLYRZ0BKZ+VKFd+Lkyy9Pw11ivE8="; 11 + fetchSubmodules = true; 11 12 }; 13 + inherit gambit-support; 14 + gambit-params = gambit-support.unstable-params; 15 + gambit-git-version = "4.9.5-40-g24201248"; # pkgs.gambit-unstable.passthru.git-version 16 + gambit-stampYmd = "20230917"; # pkgs.gambit-unstable.passthru.git-stampYmd 17 + gambit-stampHms = "182043"; # pkgs.gambit-unstable.passthru.git-stampHms 12 18 }
+5 -5
pkgs/development/compilers/gerbil/gerbil-crypto.nix
··· 2 2 3 3 { 4 4 pname = "gerbil-crypto"; 5 - version = "unstable-2023-03-27"; 6 - git-version = "0.0-18-ge57f887"; 5 + version = "unstable-2023-09-27"; 6 + git-version = "0.0-23-g341e09d"; 7 7 gerbil-package = "clan/crypto"; 8 8 gerbilInputs = with gerbilPackages; [ gerbil-utils gerbil-poo ]; 9 9 nativeBuildInputs = [ pkgs.pkg-config ]; ··· 13 13 14 14 pre-src = { 15 15 fun = fetchFromGitHub; 16 - owner = "fare"; 16 + owner = "mighty-gerbils"; 17 17 repo = "gerbil-crypto"; 18 - rev = "e57f88742d9b41640b4a7d9bd3e86c688d4a83f9"; 19 - sha256 = "08hrk3s82hbigvza75vgx9kc7qf64yhhn3xm5calc859sy6ai4ka"; 18 + rev = "341e09dcb15c09c836eae18093c0f63f71c0a72f"; 19 + sha256 = "1rq50q4p4vhr5drjvirmdkxaa4wszj1rxnhjaqz98bfpjm90yk4j"; 20 20 }; 21 21 22 22 meta = with lib; {
+10 -9
pkgs/development/compilers/gerbil/gerbil-ethereum.nix
··· 2 2 3 3 rec { 4 4 pname = "gerbil-ethereum"; 5 - version = "unstable-2023-05-30"; 6 - git-version = "0.0-375-g989a5ca"; 5 + version = "unstable-2023-10-06"; 6 + git-version = "0.1-1-g08b08fc"; 7 7 softwareName = "Gerbil-ethereum"; 8 - gerbil-package = "mukn/ethereum"; 8 + gerbil-package = "clan/ethereum"; 9 9 version-path = "version"; 10 10 11 - gerbilInputs = with gerbilPackages; [ gerbil-utils gerbil-crypto gerbil-poo gerbil-persist ]; 11 + gerbilInputs = with gerbilPackages; [ 12 + gerbil-utils gerbil-crypto gerbil-poo gerbil-persist gerbil-leveldb ]; 12 13 13 14 pre-src = { 14 15 fun = fetchFromGitHub; 15 - owner = "fare"; 16 + owner = "mighty-gerbils"; 16 17 repo = "gerbil-ethereum"; 17 - rev = "989a5ca78958e42c4a1ec242786ade89f1887e48"; 18 - sha256 = "0bs2knhx3hy3k72yidgaplwjd48y86arqscdik8hgxwmhm9z8kwp"; 18 + rev = "08b08fce8c83cb59bfb532eebb1c7a2dd4bd57ab"; 19 + sha256 = "1sy7l869d2xqhq2qflsmkvr343jfhzsq43ixx75rqfpr3cdljz0b"; 19 20 }; 20 21 21 22 postInstall = '' 22 - cp scripts/{croesus.prv,genesis.json,logback.xml,yolo-evm.conf,yolo-kevm.conf,run-ethereum-test-net.ss} $out/gerbil/lib/mukn/ethereum/scripts/ 23 + cp scripts/{croesus.prv,genesis.json,logback.xml,yolo-evm.conf,yolo-kevm.conf,run-ethereum-test-net.ss} $out/gerbil/lib/clan/ethereum/scripts/ 23 24 mkdir -p $out/bin 24 25 cat > $out/bin/run-ethereum-test-net <<EOF 25 26 #!/bin/sh ··· 33 34 export GERBIL_PATH GERBIL_LOADPATH GLOW_SOURCE ORIG_GERBIL_PATH ORIG_GERBIL_LOADPATH 34 35 exec ${gerbil}/bin/gxi "\$0" "\$@" 35 36 |# 36 - (import :mukn/ethereum/scripts/run-ethereum-test-net :clan/multicall) 37 + (import :clan/ethereum/scripts/run-ethereum-test-net :clan/multicall) 37 38 (apply call-entry-point (cdr (command-line))) 38 39 EOF 39 40 chmod a+x $out/bin/run-ethereum-test-net
+31
pkgs/development/compilers/gerbil/gerbil-leveldb.nix
··· 1 + { pkgs, lib, fetchFromGitHub, gerbilPackages, leveldb, ... }: 2 + 3 + { 4 + pname = "gerbil-leveldb"; 5 + version = "unstable-2023-09-23"; 6 + git-version = "c62e47f"; 7 + gerbil-package = "clan"; 8 + gerbilInputs = [ ]; 9 + nativeBuildInputs = [ pkgs.pkg-config ]; 10 + buildInputs = [ leveldb ]; 11 + version-path = ""; 12 + softwareName = "Gerbil-LevelDB"; 13 + 14 + pre-src = { 15 + fun = fetchFromGitHub; 16 + owner = "mighty-gerbils"; 17 + repo = "gerbil-leveldb"; 18 + rev = "c62e47f352377b6843fb3e4b27030762a510a0d8"; 19 + sha256 = "177zn1smv2zq97mlryf8fi7v5gbjk07v5i0dix3r2wsanphaawvl"; 20 + }; 21 + 22 + meta = with lib; { 23 + description = "LevelDB bindings for Gerbil"; 24 + homepage = "https://github.com/mighty-gerbils/gerbil-leveldb"; 25 + license = licenses.asl20; 26 + platforms = platforms.unix; 27 + maintainers = with maintainers; [ fare ]; 28 + }; 29 + 30 + # "-L${leveldb}/lib" 31 + }
+29
pkgs/development/compilers/gerbil/gerbil-libxml.nix
··· 1 + { pkgs, lib, fetchFromGitHub, gerbilPackages, libxml2, ... }: 2 + 3 + { 4 + pname = "gerbil-libxml"; 5 + version = "unstable-2023-09-23"; 6 + git-version = "b08e5d8"; 7 + gerbil-package = "clan"; 8 + gerbilInputs = [ ]; 9 + nativeBuildInputs = [ pkgs.pkg-config ]; 10 + buildInputs = [ libxml2 ]; 11 + version-path = ""; 12 + softwareName = "Gerbil-LibXML"; 13 + 14 + pre-src = { 15 + fun = fetchFromGitHub; 16 + owner = "mighty-gerbils"; 17 + repo = "gerbil-libxml"; 18 + rev = "b08e5d8fe4688a162824062579ce152a10adb4cf"; 19 + sha256 = "1zfccqaibwy2b3srwmwwgv91dwy1xl18cfimxhcsxl6mxvgm61pd"; 20 + }; 21 + 22 + meta = with lib; { 23 + description = "libxml bindings for Gerbil"; 24 + homepage = "https://github.com/mighty-gerbils/gerbil-libxml"; 25 + license = licenses.asl20; 26 + platforms = platforms.unix; 27 + maintainers = with maintainers; [ fare ]; 28 + }; 29 + }
+31
pkgs/development/compilers/gerbil/gerbil-libyaml.nix
··· 1 + { pkgs, lib, fetchFromGitHub, gerbilPackages, libyaml, ... }: 2 + 3 + { 4 + pname = "gerbil-libyaml"; 5 + version = "unstable-2023-09-23"; 6 + git-version = "398a197"; 7 + gerbil-package = "clan"; 8 + gerbilInputs = [ ]; 9 + nativeBuildInputs = [ pkgs.pkg-config ]; 10 + buildInputs = [ libyaml ]; 11 + version-path = ""; 12 + softwareName = "Gerbil-LibYAML"; 13 + 14 + pre-src = { 15 + fun = fetchFromGitHub; 16 + owner = "mighty-gerbils"; 17 + repo = "gerbil-libyaml"; 18 + rev = "398a19782b1526de94b70de165c027d4b6029dac"; 19 + sha256 = "0plmwx1i23c9nzzg6zxz2xi0y92la97mak9hg6h3c6d8kxvajb5c"; 20 + }; 21 + 22 + meta = with lib; { 23 + description = "libyaml bindings for Gerbil"; 24 + homepage = "https://github.com/mighty-gerbils/gerbil-libyaml"; 25 + license = licenses.asl20; 26 + platforms = platforms.unix; 27 + maintainers = with maintainers; [ fare ]; 28 + }; 29 + 30 + # "-L${libyaml}/lib" 31 + }
+31
pkgs/development/compilers/gerbil/gerbil-lmdb.nix
··· 1 + { pkgs, lib, fetchFromGitHub, gerbilPackages, lmdb, ... }: 2 + 3 + { 4 + pname = "gerbil-lmdb"; 5 + version = "unstable-2023-09-23"; 6 + git-version = "6d64813"; 7 + gerbil-package = "clan"; 8 + gerbilInputs = [ ]; 9 + nativeBuildInputs = [ pkgs.pkg-config ]; 10 + buildInputs = [ lmdb ]; 11 + version-path = ""; 12 + softwareName = "Gerbil-LMDB"; 13 + 14 + pre-src = { 15 + fun = fetchFromGitHub; 16 + owner = "mighty-gerbils"; 17 + repo = "gerbil-lmdb"; 18 + rev = "6d64813afe5766776a0d7ef45f80c784b820742c"; 19 + sha256 = "12kywxx4qjxchmhcd66700r2yfqjnh12ijgqnpqaccvigi07iq9b"; 20 + }; 21 + 22 + meta = with lib; { 23 + description = "LMDB bindings for Gerbil"; 24 + homepage = "https://github.com/mighty-gerbils/gerbil-lmdb"; 25 + license = licenses.asl20; 26 + platforms = platforms.unix; 27 + maintainers = with maintainers; [ fare ]; 28 + }; 29 + 30 + # "-L${lmdb.out}/lib" 31 + }
+31
pkgs/development/compilers/gerbil/gerbil-mysql.nix
··· 1 + { pkgs, lib, fetchFromGitHub, gerbilPackages, mariadb-connector-c, ... }: 2 + 3 + { 4 + pname = "gerbil-mysql"; 5 + version = "unstable-2023-09-23"; 6 + git-version = "ecec94c"; 7 + gerbil-package = "clan"; 8 + gerbilInputs = [ ]; 9 + nativeBuildInputs = [ pkgs.pkg-config ]; 10 + buildInputs = [ mariadb-connector-c ]; 11 + version-path = ""; 12 + softwareName = "Gerbil-MySQL"; 13 + 14 + pre-src = { 15 + fun = fetchFromGitHub; 16 + owner = "mighty-gerbils"; 17 + repo = "gerbil-mysql"; 18 + rev = "ecec94c76d7aa23331b7e02ac7732a7923f100a5"; 19 + sha256 = "01506r0ivgp6cxvwracmg7pwr735ngb7899ga3lxy181lzkp6b2c"; 20 + }; 21 + 22 + meta = with lib; { 23 + description = "MySQL bindings for Gerbil"; 24 + homepage = "https://github.com/mighty-gerbils/gerbil-mysql"; 25 + license = licenses.asl20; 26 + platforms = platforms.unix; 27 + maintainers = with maintainers; [ fare ]; 28 + }; 29 + 30 + # "-L${mariadb-connector-c}/lib/mariadb" 31 + }
+6 -6
pkgs/development/compilers/gerbil/gerbil-persist.nix
··· 1 1 { lib, fetchFromGitHub, gerbilPackages, ... }: 2 2 { 3 3 pname = "gerbil-persist"; 4 - version = "unstable-2023-03-02"; 5 - git-version = "0.1.0-24-ge2305f5"; 4 + version = "unstable-2023-10-07"; 5 + git-version = "0.1.1-1-g3ce1d4a"; 6 6 softwareName = "Gerbil-persist"; 7 7 gerbil-package = "clan/persist"; 8 8 version-path = "version"; 9 9 10 - gerbilInputs = with gerbilPackages; [ gerbil-utils gerbil-crypto gerbil-poo ]; 10 + gerbilInputs = with gerbilPackages; [ gerbil-utils gerbil-crypto gerbil-poo gerbil-leveldb ]; 11 11 12 12 pre-src = { 13 13 fun = fetchFromGitHub; 14 - owner = "fare"; 14 + owner = "mighty-gerbils"; 15 15 repo = "gerbil-persist"; 16 - rev = "e2305f53571e55292179286ca2d88e046ec6638b"; 17 - sha256 = "1vsi4rfzpqg4hhn53d2r26iw715vzwz0hiai9r34z4diwzqixfgn"; 16 + rev = "3ce1d4a4b1d7be290e54f884d780c02ceee8f10e"; 17 + sha256 = "1kzvgpqkpq4wlc0hlfxy314fbv6215aksrrlrrpq9w97wdibmv7x"; 18 18 }; 19 19 20 20 meta = with lib; {
+5 -5
pkgs/development/compilers/gerbil/gerbil-poo.nix
··· 2 2 3 3 { 4 4 pname = "gerbil-poo"; 5 - version = "unstable-2023-04-28"; 6 - git-version = "0.0-106-g418b582"; 5 + version = "unstable-2023-10-07"; 6 + git-version = "0.1-1-g367ab43"; 7 7 softwareName = "Gerbil-POO"; 8 8 gerbil-package = "clan/poo"; 9 9 version-path = "version"; ··· 12 12 13 13 pre-src = { 14 14 fun = fetchFromGitHub; 15 - owner = "fare"; 15 + owner = "mighty-gerbils"; 16 16 repo = "gerbil-poo"; 17 - rev = "418b582ae72e1494cf3a5f334d31d4f6503578f5"; 18 - sha256 = "0qdzs7l6hp45dji5bc3879k4c8k9x6cj4qxz68cskjhn8wrc5lr8"; 17 + rev = "367ab4376fdd6fc0b0892da2becef35a5039c583"; 18 + sha256 = "0ci88zqi7gb55ahl0n7dk1ihij2j6dn8jb6rzfiilck773x46kdh"; 19 19 }; 20 20 21 21 meta = with lib; {
+31 -22
pkgs/development/compilers/gerbil/gerbil-support.nix
··· 1 1 { pkgs, lib, callPackage, ... }: 2 2 3 - with pkgs.gerbil-support; { 3 + with pkgs.gerbil-support; { 4 + 5 + pppToName = ppp: lib.removeSuffix ".nix" (baseNameOf ppp); # from pre-package path to name 6 + callPpp = ppp: callPackage ppp prePackage-defaults; # from pre-package path to pre-package 7 + pppToKV = ppp: { name = pppToName ppp; value = callPpp ppp; }; # from pre-package path to name 8 + ppplToPpa = ppps: builtins.listToAttrs (map pppToKV ppps); # from pre-package path list to name/pre-package attr 4 9 5 10 prePackages-unstable = 6 - let pks = [ ./gerbil-libp2p.nix ./smug-gerbil.nix ./ftw.nix 7 - ./gerbil-utils.nix ./gerbil-crypto.nix ./gerbil-poo.nix 8 - ./gerbil-persist.nix ./gerbil-ethereum.nix ./glow-lang.nix ]; 9 - call = pkg: callPackage pkg prePackage-defaults; 10 - pkgName = pkg: lib.removeSuffix ".nix" (baseNameOf pkg); 11 - f = pkg: { name = pkgName pkg; value = call pkg; }; in 12 - builtins.listToAttrs (map f pks); 11 + ppplToPpa 12 + [ ./gerbil-leveldb.nix ./gerbil-lmdb.nix ./gerbil-mysql.nix 13 + ./gerbil-libxml.nix ./gerbil-libyaml.nix 14 + ./smug-gerbil.nix # ./ftw.nix 15 + ./gerbil-utils.nix ./gerbil-crypto.nix ./gerbil-poo.nix 16 + ./gerbil-persist.nix ./gerbil-ethereum.nix 17 + # ./gerbil-libp2p.nix 18 + ./glow-lang.nix 19 + ]; 13 20 14 21 prePackage-defaults = { 15 22 gerbil = pkgs.gerbil-unstable; ··· 25 32 softwareName = ""; 26 33 }; 27 34 28 - gerbilPackages-unstable = 29 - builtins.mapAttrs (_: gerbilPackage) prePackages-unstable; 35 + ppaToPl = builtins.mapAttrs (_: gerbilPackage); 36 + gerbilPackages-unstable = ppaToPl prePackages-unstable; 30 37 31 38 resolve-pre-src = pre-src: pre-src.fun (removeAttrs pre-src ["fun"]); 32 39 33 - gerbilVersionFromGit = pkg: 34 - let version-path = "${pkg.passthru.pre-pkg.version-path}.ss"; in 35 - if builtins.pathExists version-path then 40 + gerbilVersionFromGit = srcDir: version-path: 41 + let version-file = "${srcDir}/${version-path}.ss"; in 42 + if builtins.pathExists version-file then 36 43 let m = 37 44 builtins.match "\\(import :clan/versioning.*\\)\n\\(register-software \"([-_.A-Za-z0-9]+)\" \"([-_.A-Za-z0-9]+)\"\\) ;; ([-0-9]+)\n" 38 - (builtins.readFile version-path); in 39 - { version = builtins.elemAt m 2; git-version = builtins.elemAt m 1; } 40 - else { version = "0.0"; 41 - git-version = let gitpath = "${toString pkg.src}/.git"; in 45 + (builtins.readFile version-file); in 46 + { version = "${builtins.elemAt m 2}-git"; git-version = builtins.elemAt m 1; } 47 + else { version = "0.0-git"; 48 + git-version = let gitpath = "${srcDir}/.git"; in 42 49 if builtins.pathExists gitpath then lib.commitIdFromGitRepo gitpath else "0"; }; 43 50 44 - gerbilSkippableFiles = [".git" ".build" ".build_outputs" "run" "result" "dep" "BLAH" 45 - "version.ss" "tmp.nix"]; 51 + gerbilSkippableFiles = [".git" ".build" ".build_outputs" "run" "result" "dep" "BLAH" "tmp.nix"]; 46 52 47 53 gerbilSourceFilter = path: type: 48 54 let baseName = baseNameOf path; in ··· 66 72 if old-sha256 == new-sha256 then {} else 67 73 view "Overriding ${name} old-sha256: ${old-sha256} new-sha256: ${new-sha256}" 68 74 { ${name} = super.${name} // { 69 - pre-src = new-pre-src; 70 - version = "override"; 71 - git-version = if new-pre-src ? rev then lib.substring 0 7 new-pre-src.rev else "unknown";};}; 75 + pre-src = new-pre-src; 76 + version = "override"; 77 + git-version = if new-pre-src ? rev 78 + then lib.substring 0 7 new-pre-src.rev 79 + else "unknown";}; 80 + }; 72 81 73 82 pkgsOverrideGerbilPackageSrc = name: pre-src: pkgs: super: { 74 83 gerbil-support = (super-support:
+5 -5
pkgs/development/compilers/gerbil/gerbil-utils.nix
··· 2 2 3 3 { 4 4 pname = "gerbil-utils"; 5 - version = "unstable-2023-07-22"; 6 - git-version = "0.2-198-g2fb01ce"; 5 + version = "unstable-2023-10-08"; 6 + git-version = "0.3-3-g2914428"; 7 7 softwareName = "Gerbil-utils"; 8 8 gerbil-package = "clan"; 9 9 version-path = "version"; 10 10 11 11 pre-src = { 12 12 fun = fetchFromGitHub; 13 - owner = "fare"; 13 + owner = "mighty-gerbils"; 14 14 repo = "gerbil-utils"; 15 - rev = "2fb01ce0b302f232f5c4daf4987457b6357d609d"; 16 - sha256 = "127q98gk1x6y1nlkkpnbnkz989ybpszy7aiy43hzai2q6xn4nv72"; 15 + rev = "29144289b40ce624adf30eab23b796ddd6b6b55d"; 16 + sha256 = "0qysw2zs5acgri3wrjb3ngnnhd17xpr9hcdr4ya383k8k7jacr8a"; 17 17 }; 18 18 19 19 meta = with lib; {
+6 -5
pkgs/development/compilers/gerbil/glow-lang.nix
··· 2 2 3 3 rec { 4 4 pname = "glow-lang"; 5 - version = "unstable-2023-04-26"; 6 - git-version = "0.3.2-222-gb19cd980"; 5 + version = "unstable-2023-10-06"; 6 + git-version = "0.3.2-232-ga1a7a9e5"; 7 7 softwareName = "Glow"; 8 8 gerbil-package = "mukn/glow"; 9 9 version-path = "version"; 10 10 11 11 gerbilInputs = with gerbilPackages; 12 12 [ gerbil-utils gerbil-crypto gerbil-poo gerbil-persist gerbil-ethereum 13 - gerbil-libp2p smug-gerbil ftw ]; 13 + smug-gerbil gerbil-leveldb # gerbil-libp2p ftw 14 + ]; 14 15 15 16 pre-src = { 16 17 fun = fetchFromGitHub; 17 18 owner = "Glow-Lang"; 18 19 repo = "glow"; 19 - rev = "b19cd98082dfc5156d1b4fc83cde161572d6a211"; 20 - sha256 = "0k3qy5826pxqr9ylnnpq4iikxf4j50987vhpa5qiv99j0p643xr3"; 20 + rev = "a1a7a9e51ba9a466d91c397d9da55af90076110c"; 21 + sha256 = "0wgav4gbg6mlxgisjjbyhvhz94b29vv2rkjkjy1jl7v0hs3wbm52"; 21 22 }; 22 23 23 24 postPatch = ''
+10 -7
pkgs/development/compilers/gerbil/unstable.nix
··· 1 - { callPackage, fetchFromGitHub, gambit-unstable, gambit-support }: 1 + { callPackage, fetchFromGitHub, gambit-unstable, gambit-support, pkgs, gccStdenv }: 2 2 3 3 callPackage ./build.nix rec { 4 - version = "unstable-2023-08-07"; 5 - git-version = "0.17.0-187-gba545b77"; 4 + version = "unstable-2023-10-13"; 5 + git-version = "0.18-2-g8ed012ff"; 6 6 src = fetchFromGitHub { 7 - owner = "vyzo"; 7 + owner = "mighty-gerbils"; 8 8 repo = "gerbil"; 9 - rev = "ba545b77e8e85118089232e3cd263856e414b24b"; 10 - sha256 = "1f4v1qawx2i8333kshj4pbj5r21z0868pwrr3r710n6ng3pd9gqn"; 9 + rev = "8ed012ff9571fcfebcc07815813001a3f356150d"; 10 + sha256 = "056kmjn7sd0hjwikmg7v3a1kvgsgvfi7pi9xcx3ixym9g3bqa4mx"; 11 + fetchSubmodules = true; 11 12 }; 12 13 inherit gambit-support; 13 - gambit = gambit-unstable; 14 14 gambit-params = gambit-support.unstable-params; 15 + gambit-git-version = "4.9.5-40-g24201248"; # pkgs.gambit-unstable.passthru.git-version 16 + gambit-stampYmd = "20230917"; # pkgs.gambit-unstable.passthru.git-stampYmd 17 + gambit-stampHms = "182043"; # pkgs.gambit-unstable.passthru.git-stampHms 15 18 }