Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / nix-kernel / default.nix
blobc03db9cf42f24c01c0768edff662fc7fd5a35109
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";
13   format = "setuptools";
15   disabled = !isPy3k;
17   src = fetchFromGitHub {
18     owner = "GTrunSec";
19     repo = "nix-kernel";
20     rev = "dfa42d0812d508ded99f690ee1a83281d900a3ec";
21     sha256 = "1lf4rbbxjmq9h6g3wrdzx3v3dn1bndfmiybxiy0sjavgb6lzc8kq";
22   };
24   postPatch = ''
25     substituteInPlace nix-kernel/kernel.py \
26       --replace "'nix'" "'${nix}/bin/nix'" \
27       --replace "'nix repl'" "'${nix}/bin/nix repl'"
29     substituteInPlace setup.py \
30       --replace "cmdclass={'install': install_with_kernelspec}," ""
31   '';
33   propagatedBuildInputs = [
34     pexpect
35     notebook
36   ];
38   # no tests in repo
39   doCheck = false;
41   pythonImportsCheck = [ "nix-kernel" ];
43   meta = with lib; {
44     description = "Simple jupyter kernel for nix-repl";
45     homepage = "https://github.com/GTrunSec/nix-kernel";
46     license = licenses.mit;
47     maintainers = with maintainers; [ ];
48   };