From 0afac45561abdf6f4d3cd932f9016112a5af48c5 Mon Sep 17 00:00:00 2001 From: Francois-Rene Rideau Date: Wed, 25 Nov 2020 02:30:06 -0500 Subject: glow-lang: init at 2023-04-26 Post Release v0.3.2 --- .../compilers/gerbil/gerbil-support.nix | 2 +- pkgs/development/compilers/gerbil/glow-lang.nix | 55 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 3 +- 3 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 pkgs/development/compilers/gerbil/glow-lang.nix (limited to 'pkgs') diff --git a/pkgs/development/compilers/gerbil/gerbil-support.nix b/pkgs/development/compilers/gerbil/gerbil-support.nix index e4b85fe5b54e..3d57e2a73c52 100644 --- a/pkgs/development/compilers/gerbil/gerbil-support.nix +++ b/pkgs/development/compilers/gerbil/gerbil-support.nix @@ -5,7 +5,7 @@ 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 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 000000000000..c6e5aa10fa3a --- /dev/null +++ b/pkgs/development/compilers/gerbil/glow-lang.nix @@ -0,0 +1,55 @@ +{ lib, fetchFromGitHub, gerbil-support, gerbilPackages, gerbil, ... }: + +rec { + pname = "glow-lang"; + version = "unstable-2023-04-26"; + git-version = "0.3.2-222-gb19cd980"; + 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 = fetchFromGitHub; + owner = "Glow-Lang"; + repo = "glow"; + rev = "b19cd98082dfc5156d1b4fc83cde161572d6a211"; + sha256 = "0k3qy5826pxqr9ylnnpq4iikxf4j50987vhpa5qiv99j0p643xr3"; + }; + + 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 <