2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2023-10-19 13:55:26 +00:00
|
|
|
, setuptools
|
2020-04-24 23:36:52 +00:00
|
|
|
, nbformat
|
|
|
|
, nose
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "nbmerge";
|
2023-10-19 13:55:26 +00:00
|
|
|
version = "0.0.4";
|
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jbn";
|
|
|
|
repo = pname;
|
2023-10-19 13:55:26 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-Uqs/SO/AculHCFYcbjW08kLQX5GSU/eAwkN2iy/vhLM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-10-19 13:55:26 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [ nbformat ];
|
2023-10-19 13:55:26 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ nose ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
2023-10-19 13:55:26 +00:00
|
|
|
runHook preCheck
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
patchShebangs .
|
|
|
|
nosetests -v
|
|
|
|
PATH=$PATH:$out/bin ./cli_tests.sh
|
2023-10-19 13:55:26 +00:00
|
|
|
|
|
|
|
runHook postCheck
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2023-10-19 13:55:26 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"nbmerge"
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = {
|
|
|
|
description = "A tool to merge/concatenate Jupyter (IPython) notebooks";
|
|
|
|
inherit (src.meta) homepage;
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ ];
|
2023-10-19 13:55:26 +00:00
|
|
|
mainProgram = "nbmerge";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|