python311Packages.nbmerge: refactor
- add mainProgram to meta - add pythonImportsCheck - introduce `pyproject = true` - add runHook to checkPhase
This commit is contained in:
parent
0e7b8055e4
commit
305c120f31
1 changed files with 16 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, setuptools
|
||||
, nbformat
|
||||
, nose
|
||||
}:
|
||||
|
@ -8,6 +9,7 @@
|
|||
buildPythonPackage rec {
|
||||
pname = "nbmerge";
|
||||
version = "0.0.4";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jbn";
|
||||
|
@ -16,19 +18,33 @@ buildPythonPackage rec {
|
|||
hash = "sha256-Uqs/SO/AculHCFYcbjW08kLQX5GSU/eAwkN2iy/vhLM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
setuptools
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [ nbformat ];
|
||||
|
||||
nativeCheckInputs = [ nose ];
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
|
||||
patchShebangs .
|
||||
nosetests -v
|
||||
PATH=$PATH:$out/bin ./cli_tests.sh
|
||||
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [
|
||||
"nbmerge"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "A tool to merge/concatenate Jupyter (IPython) notebooks";
|
||||
inherit (src.meta) homepage;
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ ];
|
||||
mainProgram = "nbmerge";
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue