2021-01-25 09:26:54 +01:00
|
|
|
{ lib
|
2021-12-04 13:20:57 -08:00
|
|
|
, stdenv
|
2018-10-28 11:24:29 -04:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2022-03-02 22:42:28 +01:00
|
|
|
, flit-core
|
2021-06-19 02:19:05 +02:00
|
|
|
, pytestCheckHook
|
2018-10-28 11:24:29 -04:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "testpath";
|
2022-03-02 22:42:28 +01:00
|
|
|
version = "0.6.0";
|
|
|
|
format = "pyproject";
|
2018-10-28 11:24:29 -04:00
|
|
|
|
|
|
|
src = fetchPypi {
|
2021-06-18 16:46:01 -07:00
|
|
|
inherit pname version;
|
2022-03-02 22:42:28 +01:00
|
|
|
sha256 = "sha256-LxuX5kQsAmgevgG9hPUxAop8rqGvOCUAD1I0XDAoXg8=";
|
2018-10-28 11:24:29 -04:00
|
|
|
};
|
|
|
|
|
2022-03-02 22:42:28 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
flit-core
|
|
|
|
];
|
|
|
|
|
2021-06-19 02:19:05 +02:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2021-12-04 13:20:57 -08:00
|
|
|
preCheck = lib.optionalString stdenv.isDarwin ''
|
|
|
|
# Work around https://github.com/jupyter/testpath/issues/24
|
|
|
|
export TMPDIR="/tmp"
|
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2018-10-28 11:24:29 -04:00
|
|
|
description = "Test utilities for code working with files and commands";
|
|
|
|
license = licenses.mit;
|
2020-03-31 21:11:51 -04:00
|
|
|
homepage = "https://github.com/jupyter/testpath";
|
2018-10-28 11:24:29 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|