Merge pull request #102936 from fare-patches/fare

Gerbil Update
This commit is contained in:
Michael Raskin 2020-11-07 21:06:03 +00:00 committed by GitHub
commit ba70a79f3c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 121 additions and 28 deletions

View file

@ -35,6 +35,7 @@ gccStdenv.mkDerivation rec {
#runtimeDeps = [ gnused gnugrep ]; #runtimeDeps = [ gnused gnugrep ];
configureFlags = [ configureFlags = [
"--enable-targets=${gambit-params.targets}"
"--enable-single-host" "--enable-single-host"
"--enable-c-opt=${optimizationSetting}" "--enable-c-opt=${optimizationSetting}"
"--enable-gcc-opts" "--enable-gcc-opts"
@ -94,6 +95,7 @@ gccStdenv.mkDerivation rec {
# Now use the bootstrap compiler to build the real thing! # Now use the bootstrap compiler to build the real thing!
make -j$NIX_BUILD_CORES from-scratch make -j$NIX_BUILD_CORES from-scratch
${lib.optionalString gambit-params.modules "make -j$NIX_BUILD_CORES modules"}
''; '';
postInstall = '' postInstall = ''

View file

@ -2,12 +2,16 @@
rec { rec {
stable-params = { stable-params = {
stable = true;
defaultRuntimeOptions = "f8,-8,t8"; defaultRuntimeOptions = "f8,-8,t8";
buildRuntimeOptions = "f8,-8,t8"; buildRuntimeOptions = "f8,-8,t8";
fix-stamp = git-version : ""; fix-stamp = git-version : "";
targets = "java,js,php,python,ruby";
modules = false;
}; };
unstable-params = { unstable-params = {
stable = false;
defaultRuntimeOptions = "iL,fL,-L,tL"; defaultRuntimeOptions = "iL,fL,-L,tL";
buildRuntimeOptions = "i8,f8,-8,t8"; buildRuntimeOptions = "i8,f8,-8,t8";
fix-stamp = git-version : '' fix-stamp = git-version : ''
@ -15,6 +19,8 @@ rec {
--replace "$(grep '^PACKAGE_VERSION=.*$' configure)" 'PACKAGE_VERSION="v${git-version}"' \ --replace "$(grep '^PACKAGE_VERSION=.*$' configure)" 'PACKAGE_VERSION="v${git-version}"' \
--replace "$(grep '^PACKAGE_STRING=.*$' configure)" 'PACKAGE_STRING="Gambit v${git-version}"' ; --replace "$(grep '^PACKAGE_STRING=.*$' configure)" 'PACKAGE_STRING="Gambit v${git-version}"' ;
''; '';
targets = "arm,java,js,php,python,riscv-32,riscv-64,ruby,x86,x86-64"; # eats 100% cpu on _digest
modules = false;
}; };
export-gambopt = params : "export GAMBOPT=${params.buildRuntimeOptions} ;"; export-gambopt = params : "export GAMBOPT=${params.buildRuntimeOptions} ;";

View file

@ -1,13 +1,13 @@
{ callPackage, fetchFromGitHub, gambit-support }: { callPackage, fetchFromGitHub, gambit-support }:
callPackage ./build.nix { callPackage ./build.nix {
version = "unstable-2020-07-29"; version = "unstable-2020-09-20";
git-version = "4.9.3-1232-gbba388b8"; git-version = "4.9.3-1234-g6acd87df";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "feeley"; owner = "feeley";
repo = "gambit"; repo = "gambit";
rev = "bba388b80ca62a77883a8936d64b03316808696a"; rev = "6acd87dfa95bfca33082a431e72f023345dc07ee";
sha256 = "0iqlp1mvxz8g32kqrqm0phnnp1i5c4jrapqh2wqwa8fh1vgnizg1"; sha256 = "0a3dy4ij8hzlp3sjam4b6dp6yvyz5d7g2x784qm3gp89fi2ck56r";
}; };
gambit-params = gambit-support.unstable-params; gambit-params = gambit-support.unstable-params;
} }

View file

@ -2,8 +2,8 @@
gerbil-support.gerbilPackage { gerbil-support.gerbilPackage {
pname = "gerbil-ethereum"; pname = "gerbil-ethereum";
version = "unstable-2020-08-02"; version = "unstable-2020-10-18";
git-version = "0.0-15-g7cd2dd7"; git-version = "0.0-26-gf27ada8";
gerbil-package = "mukn/ethereum"; gerbil-package = "mukn/ethereum";
gerbil = gerbil-unstable; gerbil = gerbil-unstable;
gerbilInputs = with gerbil-support.gerbilPackages-unstable; gerbilInputs = with gerbil-support.gerbilPackages-unstable;
@ -15,8 +15,8 @@ gerbil-support.gerbilPackage {
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "fare"; owner = "fare";
repo = "gerbil-ethereum"; repo = "gerbil-ethereum";
rev = "7cd2dd7436b11917d0729dbafe087cfa8ec38f86"; rev = "f27ada8e7f4de4f8fbdfede9fe055914b254d8e7";
sha256 = "0qq3ch2dg735yrj3l2c9pb9qlvz98x3vjfi2xyr4fwr78smpqgb5"; sha256 = "1lykjqim6a44whj1r8kkpiz68wghkfqx5vjlrc2ldxlmgd4r9gvd";
}; };
meta = { meta = {
description = "Gerbil Ethereum: a Scheme alternative to web3.js"; description = "Gerbil Ethereum: a Scheme alternative to web3.js";

View file

@ -0,0 +1,27 @@
{ pkgs, lib, fetchFromGitHub, gerbil-unstable, gerbil-support, gambit-support }:
gerbil-support.gerbilPackage {
pname = "gerbil-libp2p";
version = "unstable-2018-12-27";
git-version = "2376b3f";
gerbil-package = "vyzo";
gerbil = gerbil-unstable;
gerbilInputs = [];
buildInputs = []; # Note: at *runtime*, depends on go-libp2p-daemon
gambit-params = gambit-support.unstable-params;
version-path = "version";
softwareName = "Gerbil-libp2p";
src = fetchFromGitHub {
owner = "vyzo";
repo = "gerbil-libp2p";
rev = "2376b3f39cee04dd4ec455c8ea4e5faa93c2bf88";
sha256 = "0jcy7hfg953078msigyfwp2g4ii44pi6q7vcpmq01cbbvxpxz6zw";
};
meta = {
description = "Gerbil libp2p: use libp2p from Gerbil";
homepage = "https://github.com/vyzo/gerbil-libp2p";
license = lib.licenses.mit;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ fare ];
};
}

View file

@ -2,8 +2,8 @@
gerbil-support.gerbilPackage { gerbil-support.gerbilPackage {
pname = "gerbil-persist"; pname = "gerbil-persist";
version = "unstable-2020-08-02"; version = "unstable-2020-08-31";
git-version = "0.0-4-ga3b2bd1"; git-version = "0.0-8-gd211390";
gerbil-package = "clan/persist"; gerbil-package = "clan/persist";
gerbil = gerbil-unstable; gerbil = gerbil-unstable;
gerbilInputs = with gerbil-support.gerbilPackages-unstable; [gerbil-utils gerbil-crypto gerbil-poo]; gerbilInputs = with gerbil-support.gerbilPackages-unstable; [gerbil-utils gerbil-crypto gerbil-poo];
@ -14,8 +14,8 @@ gerbil-support.gerbilPackage {
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "fare"; owner = "fare";
repo = "gerbil-persist"; repo = "gerbil-persist";
rev = "a3b2bd104612db0e4492737f09f72adea6684483"; rev = "d211390c8a199cf2b8c7400cd98977524e960015";
sha256 = "0mc01wva26ww1i7n8naa95mfw7i6lj8qg0bwsik7gb3dsj2acjvh"; sha256 = "13s6ws8ziwalfp23nalss41qnz667z2712lr3y123sypm5n5axk7";
}; };
meta = { meta = {
description = "Gerbil Persist: Persistent data and activities"; description = "Gerbil Persist: Persistent data and activities";

View file

@ -2,8 +2,8 @@
gerbil-support.gerbilPackage { gerbil-support.gerbilPackage {
pname = "gerbil-ethereum"; pname = "gerbil-ethereum";
version = "unstable-2020-08-02"; version = "unstable-2020-10-17";
git-version = "0.0-13-g1014154"; git-version = "0.0-35-g44d490d";
gerbil-package = "clan/poo"; gerbil-package = "clan/poo";
gerbil = gerbil-unstable; gerbil = gerbil-unstable;
gerbilInputs = with gerbil-support.gerbilPackages-unstable; [gerbil-utils gerbil-crypto]; gerbilInputs = with gerbil-support.gerbilPackages-unstable; [gerbil-utils gerbil-crypto];
@ -14,8 +14,8 @@ gerbil-support.gerbilPackage {
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "fare"; owner = "fare";
repo = "gerbil-poo"; repo = "gerbil-poo";
rev = "1014154fe4943dfbec7524666c831b601ba88559"; rev = "44d490d95b9d1b5d54eaedf2602419af8e086837";
sha256 = "0g8l5mi007n07qs79m9h3h3am1p7h0kzq7yb49h562b8frh5gp97"; sha256 = "082ndpy281saybcnp3bdidcibkk2ih6glrkbb5fdj1524ban4d0k";
}; };
meta = { meta = {
description = "Gerbil POO: Prototype Object Orientation for Gerbil Scheme"; description = "Gerbil POO: Prototype Object Orientation for Gerbil Scheme";

View file

@ -1,14 +1,16 @@
{ pkgs, gccStdenv, callPackage, fetchFromGitHub }: { pkgs, lib, gccStdenv, callPackage, fetchFromGitHub }:
# See ../gambit/build.nix regarding gccStdenv # See ../gambit/build.nix regarding gccStdenv
rec { rec {
# Gerbil libraries # Gerbil libraries
gerbilPackages-unstable = { gerbilPackages-unstable = {
gerbil-libp2p = callPackage ./gerbil-libp2p.nix { };
gerbil-utils = callPackage ./gerbil-utils.nix { }; gerbil-utils = callPackage ./gerbil-utils.nix { };
gerbil-crypto = callPackage ./gerbil-crypto.nix { }; gerbil-crypto = callPackage ./gerbil-crypto.nix { };
gerbil-poo = callPackage ./gerbil-poo.nix { }; gerbil-poo = callPackage ./gerbil-poo.nix { };
gerbil-persist = callPackage ./gerbil-persist.nix { }; gerbil-persist = callPackage ./gerbil-persist.nix { };
gerbil-ethereum = callPackage ./gerbil-ethereum.nix { }; gerbil-ethereum = callPackage ./gerbil-ethereum.nix { };
smug-gerbil = callPackage ./smug-gerbil.nix { };
}; };
# Use this function in any package that uses Gerbil libraries, to define the GERBIL_LOADPATH. # Use this function in any package that uses Gerbil libraries, to define the GERBIL_LOADPATH.
@ -23,6 +25,7 @@ rec {
gambit-params ? pkgs.gambit-support.stable-params, gambit-params ? pkgs.gambit-support.stable-params,
gerbilInputs ? [], gerbilInputs ? [],
buildInputs ? [], buildInputs ? [],
buildScript ? "./build.ss",
softwareName ? ""} : softwareName ? ""} :
let buildInputs_ = buildInputs; in let buildInputs_ = buildInputs; in
gccStdenv.mkDerivation rec { gccStdenv.mkDerivation rec {
@ -33,8 +36,8 @@ rec {
set -e ; set -e ;
if [ -n "${version-path}.ss" ] ; then if [ -n "${version-path}.ss" ] ; then
echo -e '(import :clan/versioning${builtins.concatStringsSep "" echo -e '(import :clan/versioning${builtins.concatStringsSep ""
(map (x : if x.passthru.version-path != "" (map (x : lib.optionalString (x.passthru.version-path != "")
then " :${x.passthru.gerbil-package}/${x.passthru.version-path}" else "") " :${x.passthru.gerbil-package}/${x.passthru.version-path}")
gerbilInputs) gerbilInputs)
})\n(register-software "${softwareName}" "v${git-version}")\n' > "${passthru.version-path}.ss" })\n(register-software "${softwareName}" "v${git-version}")\n' > "${passthru.version-path}.ss"
fi fi
@ -50,7 +53,7 @@ rec {
buildPhase = '' buildPhase = ''
runHook preBuild runHook preBuild
./build.ss ${buildScript}
runHook postBuild runHook postBuild
''; '';

View file

@ -2,8 +2,8 @@
gerbil-support.gerbilPackage { gerbil-support.gerbilPackage {
pname = "gerbil-utils"; pname = "gerbil-utils";
version = "unstable-2020-08-02"; version = "unstable-2020-10-18";
git-version = "0.2-21-g7e7d053"; git-version = "0.2-36-g8b481b7";
gerbil-package = "clan"; gerbil-package = "clan";
gerbil = gerbil-unstable; gerbil = gerbil-unstable;
gambit-params = gambit-support.unstable-params; gambit-params = gambit-support.unstable-params;
@ -12,8 +12,8 @@ gerbil-support.gerbilPackage {
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "fare"; owner = "fare";
repo = "gerbil-utils"; repo = "gerbil-utils";
rev = "7e7d053ec5e78cc58d38cb03baf554d83b31b0c6"; rev = "8b481b787e13e07e14d0718d670aab016131a090";
sha256 = "078vqdcddfavqq0d9pw430iz1562cgx1ck3fw6dpwxjkyc6m4bms"; sha256 = "0br8k5b2wcv4wcp65r2bfhji3af2qgqjspf41syqslq9awx47f3m";
}; };
meta = { meta = {
description = "Gerbil Clan: Community curated Collection of Common Utilities"; description = "Gerbil Clan: Community curated Collection of Common Utilities";

View file

@ -0,0 +1,30 @@
{ pkgs, lib, fetchFromGitHub, gerbil-unstable, gerbil-support, gambit-support }:
gerbil-support.gerbilPackage {
pname = "smug-gerbil";
version = "unstable-2019-12-24";
git-version = "95d60d4";
gerbil-package = "drewc/smug";
gerbil = gerbil-unstable;
gerbilInputs = [];
buildInputs = [];
gambit-params = gambit-support.unstable-params;
version-path = ""; #"version";
softwareName = "Smug-Gerbil";
src = fetchFromGitHub {
owner = "drewc";
repo = "smug-gerbil";
rev = "95d60d486c1603743c6d3c525e6d5f5761b984e5";
sha256 = "0ys07z78gq60z833si2j7xa1scqvbljlx1zb32vdf32f1b27c04j";
};
meta = {
description = "Super Monadic Über Go-into : Parsers and Gerbil Scheme";
homepage = "https://github.com/drewc/smug-gerbil";
license = lib.licenses.mit;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ fare ];
};
buildScript = ''
for i in primitive simple tokens smug ; do gxc -O $i.ss ; done
'';
}

View file

@ -1,13 +1,13 @@
{ callPackage, fetchFromGitHub, gambit-unstable, gambit-support }: { callPackage, fetchFromGitHub, gambit-unstable, gambit-support }:
callPackage ./build.nix rec { callPackage ./build.nix rec {
version = "unstable-2020-08-02"; version = "unstable-2020-11-05";
git-version = "0.16-120-g3f248e13"; git-version = "0.16-152-g808929ae";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "vyzo"; owner = "vyzo";
repo = "gerbil"; repo = "gerbil";
rev = "3f248e139dfa11be74284fc812253fbecafbaf31"; rev = "808929aeb8823959191f35df53bc0c0150911b4b";
sha256 = "18v192cypj0nbmfcyflm8qnwp27qwy65m0a19ggs47wwbzhgvgqh"; sha256 = "0d9k2gkrs9qvlnk7xa3gjzs3gln3ydds7yd2313pvbw4q2lcz8iw";
}; };
inherit gambit-support; inherit gambit-support;
gambit = gambit-unstable; gambit = gambit-unstable;

View file

@ -0,0 +1,23 @@
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule {
pname = "go-libp2p-daemon";
version = "0.3.0";
src = fetchFromGitHub {
owner = "libp2p";
repo = "go-libp2p-daemon";
rev = "bfa207ed34c27947f0828a4ae8d10bda62aa49a9";
sha256 = "1f3gjkmpqngajjpijpjdmkmsjfm9bdgakb5r28fnc6w9dmfyj51x";
};
vendorSha256 = "0g25r7wd1hvnwxxq18mpx1r1wig6dnlnvzkpvgw79q6nymxlppmv";
doCheck = false;
meta = with lib; {
homepage = "https://github.com/libp2p/go-libp2p-daemon";
license = licenses.mit;
maintainers = with maintainers; [ fare ];
};
}

View file

@ -20750,6 +20750,8 @@ in
exercism = callPackage ../applications/misc/exercism { }; exercism = callPackage ../applications/misc/exercism { };
go-libp2p-daemon = callPackage ../servers/go-libp2p-daemon { };
go-motion = callPackage ../development/tools/go-motion { }; go-motion = callPackage ../development/tools/go-motion { };
gpg-mdp = callPackage ../applications/misc/gpg-mdp { }; gpg-mdp = callPackage ../applications/misc/gpg-mdp { };