linux_xanmod: 5.11.14 -> 5.11.15
[NixPkgs.git] / pkgs / development / python-modules / nix-kernel / default.nix
blob5758e60fa3fc63bc4de712aaf95a13aa9d98a683
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , isPy3k
5 , pexpect
6 , notebook
7 , nix
8 }:
10 buildPythonPackage rec {
11   pname = "nix-kernel";
12   version = "unstable-2020-04-26";
14   disabled = !isPy3k;
16   src = fetchFromGitHub {
17     owner = "GTrunSec";
18     repo = "nix-kernel";
19     rev = "dfa42d0812d508ded99f690ee1a83281d900a3ec";
20     sha256 = "1lf4rbbxjmq9h6g3wrdzx3v3dn1bndfmiybxiy0sjavgb6lzc8kq";
21   };
23   postPatch = ''
24     substituteInPlace nix-kernel/kernel.py \
25       --replace "'nix'" "'${nix}/bin/nix'" \
26       --replace "'nix repl'" "'${nix}/bin/nix repl'"
28     substituteInPlace setup.py \
29       --replace "cmdclass={'install': install_with_kernelspec}," ""
30   '';
32   propagatedBuildInputs = [
33     pexpect
34     notebook
35   ];
37   # no tests in repo
38   doCheck = false;
40   pythonImportsCheck = [ "nix-kernel" ];
42   meta = with lib; {
43     description = "Simple jupyter kernel for nix-repl";
44     homepage = "https://github.com/GTrunSec/nix-kernel";
45     license = licenses.mit;
46     maintainers = with maintainers; [ costrouc ];
47   };