git.iko.soy/typeable/nixpkgs
on master help sign in
python39Packages.plumbum: fix version, enable tests, add meta
commite9a32bb715147e5698e86cf8c7b749013874f65b authorSandro Jäckel <sandro.jaeckel@gmail.com> dateTue 8 Feb 2022, 20:01 (5 years ago) parent0a21b29
1 file changed+51−9
pkgs/development/python-modules/plumbum/default.nix+51−9
pkgs/development/python-modules/plumbum/default.nix+51−9
@@ -1,19 +1,61 @@
1−{ buildPythonPackage
2−, fetchPypi
3−, pytest
1+{ lib
2+, buildPythonPackage
3+, fetchFromGitHub
4+, openssh
5+, ps
6+, psutil
7+, pytest-mock
8+, pytest-timeout
9+, pytestCheckHook
10+, setuptools-scm
411}:
512
613buildPythonPackage rec {
714 pname = "plumbum";
815 version = "1.7.2";
916
10− checkInputs = [ pytest ];
17+ src = fetchFromGitHub {
18+ owner = "tomerfiliba";
19+ repo = "plumbum";
20+ rev = "v${version}";
21+ sha256 = "sha256-bCCcNFz+ZsbKSF7aCfy47lBHb873tDYN0qFuSCxJp1w=";
22+ };
23+
24+ postPatch = ''
25+ substituteInPlace setup.cfg \
26+ --replace "--cov-config=setup.cfg" ""
27+ '';
28+
29+ SETUPTOOLS_SCM_PRETEND_VERSION = version;
30+
31+ nativeBuildInputs = [
32+ setuptools-scm
33+ ];
34+
35+ checkInputs = [
36+ openssh
37+ ps
38+ psutil
39+ pytest-mock
40+ pytest-timeout
41+ pytestCheckHook
42+ ];
43+
44+ preCheck = ''
45+ export HOME=$TMP
46+ '';
1147
12− # No tests in archive
13− doCheck = false;
48+ disabledTests = [
49+ # broken in nix env
50+ "test_change_env"
51+ "test_dictlike"
52+ "test_local"
53+ ];
1454
15− src = fetchPypi {
16− inherit pname version;
17− sha256 = "0d1bf908076bbd0484d16412479cb97d6843069ee19f99e267e11dd980040523";
55+ meta = with lib; {
56+ description = " Plumbum: Shell Combinators ";
57+ homepage = " https://github.com/tomerfiliba/plumbum ";
58+ license = licenses.mit;
59+ maintainers = with maintainers; [ ];
1860 };
1961}