Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 isPy3k, 6 pexpect, 7 notebook, 8 nix, 9}: 10 11buildPythonPackage rec { 12 pname = "nix-kernel"; 13 version = "unstable-2020-04-26"; 14 format = "setuptools"; 15 16 disabled = !isPy3k; 17 18 src = fetchFromGitHub { 19 owner = "GTrunSec"; 20 repo = "nix-kernel"; 21 rev = "dfa42d0812d508ded99f690ee1a83281d900a3ec"; 22 sha256 = "1lf4rbbxjmq9h6g3wrdzx3v3dn1bndfmiybxiy0sjavgb6lzc8kq"; 23 }; 24 25 postPatch = '' 26 substituteInPlace nix-kernel/kernel.py \ 27 --replace "'nix'" "'${nix}/bin/nix'" \ 28 --replace "'nix repl'" "'${nix}/bin/nix repl'" 29 30 substituteInPlace setup.py \ 31 --replace "cmdclass={'install': install_with_kernelspec}," "" 32 ''; 33 34 propagatedBuildInputs = [ 35 pexpect 36 notebook 37 ]; 38 39 # no tests in repo 40 doCheck = false; 41 42 pythonImportsCheck = [ "nix-kernel" ]; 43 44 meta = with lib; { 45 description = "Simple jupyter kernel for nix-repl"; 46 homepage = "https://github.com/GTrunSec/nix-kernel"; 47 license = licenses.mit; 48 maintainers = [ ]; 49 }; 50}