-
Notifications
You must be signed in to change notification settings - Fork 3
/
default.nix
39 lines (26 loc) · 715 Bytes
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{
pkgs ? import <nixpkgs> {},
writeScriptBin ? pkgs.writeScriptBin,
python ? pkgs.python35 }:
# If you are using callPackage to invoke this, ensure that python attribute is set to atleast a python >= 3.5
with python.pkgs;
let
nix-kernel = buildPythonPackage rec {
version = "0.1.1";
pname = "nix-kernel";
name = "${pname}-${version}";
format = "setuptools";
propagatedBuildInputs = [ pexpect notebook ];
doCheck = false;
preBuild = ''
export HOME=$(pwd)
'';
src = ./.;
};
env = python.withPackages (ps: with ps; [ nix-kernel notebook ]);
in
writeScriptBin "nix-kernel" ''
#! ${pkgs.bash}/bin/bash
PATH=${pkgs.nix-repl}/bin:${env}/bin:$PATH
exec python -m nix-kernel $@
''