Commit 50ec3431 authored by Vaibhav Sagar's avatar Vaibhav Sagar

Add support for jupyterlabAppDir

parent aee398a8
{ compiler ? "ghc865" { compiler ? "ghc865"
, jupyterlabAppDir ? null
, nixpkgs ? import <nixpkgs> {} , nixpkgs ? import <nixpkgs> {}
, packages ? (_: []) , packages ? (_: [])
, pythonPackages ? (_: []) , pythonPackages ? (_: [])
, rtsopts ? "-M3g -N2" , rtsopts ? "-M3g -N2"
, systemPackages ? (_: []) , systemPackages ? (_: [])
}: }:
import (./release.nix) { inherit compiler nixpkgs packages pythonPackages rtsopts systemPackages; } import (./release.nix) { inherit compiler jupyterlabAppDir nixpkgs packages pythonPackages rtsopts systemPackages; }
{ compiler ? "ghc881" { compiler ? "ghc881"
, jupyterlabAppDir ? null
, nixpkgs ? import <nixpkgs> {} , nixpkgs ? import <nixpkgs> {}
, packages ? (_: []) , packages ? (_: [])
, pythonPackages ? (_: []) , pythonPackages ? (_: [])
, rtsopts ? "-M3g -N2" , rtsopts ? "-M3g -N2"
, systemPackages ? (_: []) , systemPackages ? (_: [])
}: }:
import (./release.nix) { inherit compiler nixpkgs packages pythonPackages rtsopts systemPackages; } import (./release.nix) { inherit compiler jupyterlabAppDir nixpkgs packages pythonPackages rtsopts systemPackages; }
{ compiler { compiler
, jupyterlabAppDir ? null
, nixpkgs ? import <nixpkgs> {} , nixpkgs ? import <nixpkgs> {}
, packages ? (_: []) , packages ? (_: [])
, pythonPackages ? (_: []) , pythonPackages ? (_: [])
...@@ -69,13 +70,16 @@ let ...@@ -69,13 +70,16 @@ let
--use-rtsopts="${rtsopts}" \ --use-rtsopts="${rtsopts}" \
&& ${jupyterlab}/bin/jupyter ${cmd} ${extraArgs} "$@" && ${jupyterlab}/bin/jupyter ${cmd} ${extraArgs} "$@"
''; '';
appDir = if jupyterlabAppDir != null
then "--app-dir=${jupyterlabAppDir}"
else "";
in in
nixpkgs.buildEnv { nixpkgs.buildEnv {
name = "ihaskell-with-packages"; name = "ihaskell-with-packages";
buildInputs = [ nixpkgs.makeWrapper ]; buildInputs = [ nixpkgs.makeWrapper ];
paths = [ ihaskellEnv jupyterlab ]; paths = [ ihaskellEnv jupyterlab ];
postBuild = '' postBuild = ''
ln -s ${ihaskellJupyterCmdSh "lab" ""}/bin/ihaskell-lab $out/bin/ ln -s ${ihaskellJupyterCmdSh "lab" appDir}/bin/ihaskell-lab $out/bin/
ln -s ${ihaskellJupyterCmdSh "notebook" ""}/bin/ihaskell-notebook $out/bin/ ln -s ${ihaskellJupyterCmdSh "notebook" ""}/bin/ihaskell-notebook $out/bin/
ln -s ${ihaskellJupyterCmdSh "nbconvert" ""}/bin/ihaskell-nbconvert $out/bin/ ln -s ${ihaskellJupyterCmdSh "nbconvert" ""}/bin/ihaskell-nbconvert $out/bin/
ln -s ${ihaskellJupyterCmdSh "console" "--kernel=haskell"}/bin/ihaskell-console $out/bin/ ln -s ${ihaskellJupyterCmdSh "console" "--kernel=haskell"}/bin/ihaskell-console $out/bin/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment