diff options
author | Francois-Rene Rideau <fare@tunes.org> | 2020-09-25 21:19:24 -0400 |
---|---|---|
committer | Francois-Rene Rideau <fare@tunes.org> | 2020-11-06 12:03:58 -0500 |
commit | 8ff03048f93297392a82d37310a854062b843e7e (patch) | |
tree | 3c029efdd0a5681e0dabd959afeaf0ed9a1dba94 /pkgs/development/compilers/gerbil | |
parent | 078d667f9e46e50c152e6fc3480b4287ec3e31f6 (diff) |
gerbilPackages-unstable.smug-gerbil: init at 2019-12-24
Diffstat (limited to 'pkgs/development/compilers/gerbil')
-rw-r--r-- | pkgs/development/compilers/gerbil/gerbil-support.nix | 10 | ||||
-rw-r--r-- | pkgs/development/compilers/gerbil/smug-gerbil.nix | 30 |
2 files changed, 36 insertions, 4 deletions
diff --git a/pkgs/development/compilers/gerbil/gerbil-support.nix b/pkgs/development/compilers/gerbil/gerbil-support.nix index e3f4bb0e0d25..37f5c00efdb4 100644 --- a/pkgs/development/compilers/gerbil/gerbil-support.nix +++ b/pkgs/development/compilers/gerbil/gerbil-support.nix @@ -1,4 +1,4 @@ -{ pkgs, gccStdenv, callPackage, fetchFromGitHub }: +{ pkgs, lib, gccStdenv, callPackage, fetchFromGitHub }: # See ../gambit/build.nix regarding gccStdenv rec { @@ -9,6 +9,7 @@ rec { gerbil-poo = callPackage ./gerbil-poo.nix { }; gerbil-persist = callPackage ./gerbil-persist.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. @@ -23,6 +24,7 @@ rec { gambit-params ? pkgs.gambit-support.stable-params, gerbilInputs ? [], buildInputs ? [], + buildScript ? "./build.ss", softwareName ? ""} : let buildInputs_ = buildInputs; in gccStdenv.mkDerivation rec { @@ -33,8 +35,8 @@ rec { set -e ; if [ -n "${version-path}.ss" ] ; then echo -e '(import :clan/versioning${builtins.concatStringsSep "" - (map (x : if x.passthru.version-path != "" - then " :${x.passthru.gerbil-package}/${x.passthru.version-path}" else "") + (map (x : lib.optionalString (x.passthru.version-path != "") + " :${x.passthru.gerbil-package}/${x.passthru.version-path}") gerbilInputs) })\n(register-software "${softwareName}" "v${git-version}")\n' > "${passthru.version-path}.ss" fi @@ -50,7 +52,7 @@ rec { buildPhase = '' runHook preBuild - ./build.ss + ${buildScript} runHook postBuild ''; diff --git a/pkgs/development/compilers/gerbil/smug-gerbil.nix b/pkgs/development/compilers/gerbil/smug-gerbil.nix new file mode 100644 index 000000000000..732cdb500b9b --- /dev/null +++ b/pkgs/development/compilers/gerbil/smug-gerbil.nix @@ -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 + ''; +} |