mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-24 21:14:52 +00:00

- add mainProgram to meta - add pythonImportsCheck - introduce `pyproject = true` - add runHook to checkPhase
51 lines
882 B
Nix
51 lines
882 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, setuptools
|
|
, nbformat
|
|
, nose
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "nbmerge";
|
|
version = "0.0.4";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "jbn";
|
|
repo = pname;
|
|
rev = "refs/tags/v${version}";
|
|
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";
|
|
};
|
|
}
|