02dab4ab5c
Long term we should move everything over to `pyproject = true`, but in the mean time we can work towards deprecating the implicit `format` paremeter. cc https://github.com/NixOS/nixpkgs/issues/253154 cc @mweinelt @figsoda
49 lines
1 KiB
Nix
49 lines
1 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, isPy3k
|
|
, pexpect
|
|
, notebook
|
|
, nix
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "nix-kernel";
|
|
version = "unstable-2020-04-26";
|
|
format = "setuptools";
|
|
|
|
disabled = !isPy3k;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "GTrunSec";
|
|
repo = "nix-kernel";
|
|
rev = "dfa42d0812d508ded99f690ee1a83281d900a3ec";
|
|
sha256 = "1lf4rbbxjmq9h6g3wrdzx3v3dn1bndfmiybxiy0sjavgb6lzc8kq";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace nix-kernel/kernel.py \
|
|
--replace "'nix'" "'${nix}/bin/nix'" \
|
|
--replace "'nix repl'" "'${nix}/bin/nix repl'"
|
|
|
|
substituteInPlace setup.py \
|
|
--replace "cmdclass={'install': install_with_kernelspec}," ""
|
|
'';
|
|
|
|
propagatedBuildInputs = [
|
|
pexpect
|
|
notebook
|
|
];
|
|
|
|
# no tests in repo
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [ "nix-kernel" ];
|
|
|
|
meta = with lib; {
|
|
description = "Simple jupyter kernel for nix-repl";
|
|
homepage = "https://github.com/GTrunSec/nix-kernel";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ ];
|
|
};
|
|
}
|