diff --git a/pkgs/development/compilers/gerbil/gerbil-support.nix b/pkgs/development/compilers/gerbil/gerbil-support.nix index b775e60322889..b6ffcf5a370e6 100644 --- a/pkgs/development/compilers/gerbil/gerbil-support.nix +++ b/pkgs/development/compilers/gerbil/gerbil-support.nix @@ -9,7 +9,7 @@ selfPop (gerbil-support: with gerbil-support; { prePackages-unstable = let pks = [ ./gerbil-libp2p.nix ./smug-gerbil.nix ./ftw.nix ./gerbil-utils.nix ./gerbil-crypto.nix ./gerbil-poo.nix - ./gerbil-persist.nix ./gerbil-ethereum.nix ]; + ./gerbil-persist.nix ./gerbil-ethereum.nix ./glow-lang.nix ]; call = pkg: callPackage pkg (unpop prePackage-defaults); pkgName = pkg: lib.removeSuffix ".nix" (baseNameOf pkg); f = pkg: { name = pkgName pkg; value = call pkg; }; in diff --git a/pkgs/development/compilers/gerbil/glow-lang.nix b/pkgs/development/compilers/gerbil/glow-lang.nix new file mode 100644 index 0000000000000..b8a2933464cb2 --- /dev/null +++ b/pkgs/development/compilers/gerbil/glow-lang.nix @@ -0,0 +1,55 @@ +{ lib, fetchFromGitLab, gerbil-support, gerbilPackages, gerbil, ... }: + +rec { + pname = "glow-lang"; + version = "unstable-2021-09-12"; + git-version = "0.3.1"; + softwareName = "Glow"; + gerbil-package = "mukn/glow"; + version-path = "version"; + + gerbilInputs = with gerbilPackages; + [ gerbil-utils gerbil-crypto gerbil-poo gerbil-persist gerbil-ethereum + gerbil-libp2p smug-gerbil ftw ]; + + pre-src = { + fun = fetchFromGitLab; + owner = "mukn"; + repo = "glow"; + rev = "b8062a3bcf27c9c87ae591a59d6734e76931f644"; + sha256 = "0izq60hssw48qh5zbnhqq5b4v38dcc05sgls9p71510fix6qgpp8"; + }; + + postPatch = '' + substituteInPlace "runtime/glow-path.ss" --replace \ + '(def glow-install-path (source-path "dapps"))' \ + '(def glow-install-path "$out")' + ''; + + postInstall = '' + mkdir -p $out/bin $out/gerbil/lib/mukn/glow $out/share/glow/dapps + cp main.ss $out/gerbil/lib/mukn/glow/ + cp dapps/{buy_sig,coin_flip,rps_simple}.glow $out/share/glow/dapps/ + cat > $out/bin/glow <