Skip to content

Instantly share code, notes, and snippets.

@expipiplus1
Created October 16, 2019 12:18
Show Gist options
  • Save expipiplus1/c1d3ef4272179433028fdd2777fd051e to your computer and use it in GitHub Desktop.
Save expipiplus1/c1d3ef4272179433028fdd2777fd051e to your computer and use it in GitHub Desktop.
with (import (builtins.fetchTarball {
url =
"https://github.com/dmjio/miso/archive/39b9e26ff41d6aab3b9d13a9d102ac56017f6a1f.tar.gz";
sha256 = "1lwr35p9074b7wgz0jh4f2pjc7ls8isgzmn9xl86vb6cvsm035kf";
}) { });
with pkgs;
let
# dplyr xts
r = rWrapper.override { packages = with rPackages; [ ggplot2 devtools ]; };
servant-src = fetchFromGitHub {
owner = "haskell-servant";
repo = "servant";
sha256 = "11mb9j0qldfqprwvbq20f40ray7bdqk21gl5d81jvya5bh29bzzj";
rev = "a1a99552b58bf49f8f142be62eef8b6eae14b7c0";
};
servant-client-ghcjs = haskell.lib.doJailbreak
(haskell.packages.ghcjs86.callCabal2nix "servant-client-ghcjs"
(servant-src + "/servant-client-ghcjs") { });
inherit (pkgs) runCommand closurecompiler;
server = haskell.lib.addBuildDepend
(haskell.packages.ghc865.callCabal2nix "LambdaForms" ./. { }) r;
client = haskell.packages.ghcjs86.callCabal2nix "LambdaForms" ./. {
inherit servant-client-ghcjs;
};
in runCommand "lambda-forms" {} ''
mkdir -p $out/{bin,static}
cp ${server}/bin/* $out/bin
${closurecompiler}/bin/closure-compiler --compilation_level ADVANCED_OPTIMIZATIONS \
--jscomp_off=checkVars \
--externs=${client}/bin/client.jsexe/all.js.externs \
${client}/bin/client.jsexe/all.js > temp.js
mv temp.js $out/static/all.js
ls ${R}/lib/R/
echo "boo"
ls ${R}/lib/R/bin
echo "boo"
ls ${R}/lib/R/lib
echo $PATH
echo "woo"
ls ${R}/
''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment