tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
python312Packages.courlan: refactor
Fabian Affolter
2 years ago
577710d5
3e6c1b07
+17
-12
1 changed file
expand all
collapse all
unified
split
pkgs
development
python-modules
courlan
default.nix
+17
-12
pkgs/development/python-modules/courlan/default.nix
reviewed
···
4
4
, fetchPypi
5
5
, langcodes
6
6
, pytestCheckHook
7
7
+
, pythonOlder
8
8
+
, setuptools
7
9
, tld
8
10
, urllib3
9
9
-
, pythonOlder
10
11
}:
11
12
12
13
buildPythonPackage rec {
13
14
pname = "courlan";
14
15
version = "1.1.0";
15
15
-
format = "setuptools";
16
16
+
pyproject = true;
16
17
17
18
disabled = pythonOlder "3.6";
18
19
···
21
22
hash = "sha256-1wZoQzTxi+StofvVfyaArfADZkj22ECFL3pIItOt/Y0=";
22
23
};
23
24
24
24
-
propagatedBuildInputs = [
25
25
+
# Tests try to write to /tmp directly. use $TMPDIR instead.
26
26
+
postPatch = ''
27
27
+
substituteInPlace tests/unit_tests.py \
28
28
+
--replace-fail "\"courlan --help\"" "\"$out/bin/courlan --help\"" \
29
29
+
--replace-fail "courlan_bin = \"courlan\"" "courlan_bin = \"$out/bin/courlan\"" \
30
30
+
--replace-fail "/tmp" "$TMPDIR"
31
31
+
'';
32
32
+
33
33
+
build-system = [
34
34
+
setuptools
35
35
+
];
36
36
+
37
37
+
dependencies = [
25
38
babel
26
39
langcodes
27
40
tld
···
37
50
"test_urlcheck"
38
51
];
39
52
40
40
-
# tests try to write to /tmp directly. use $TMPDIR instead.
41
41
-
postPatch = ''
42
42
-
substituteInPlace tests/unit_tests.py \
43
43
-
--replace "\"courlan --help\"" "\"$out/bin/courlan --help\"" \
44
44
-
--replace "courlan_bin = \"courlan\"" "courlan_bin = \"$out/bin/courlan\"" \
45
45
-
--replace "/tmp" "$TMPDIR"
46
46
-
'';
47
47
-
48
53
pythonImportsCheck = [ "courlan" ];
49
54
50
55
meta = with lib; {
51
56
description = "Clean, filter and sample URLs to optimize data collection";
52
52
-
mainProgram = "courlan";
53
57
homepage = "https://github.com/adbar/courlan";
54
58
changelog = "https://github.com/adbar/courlan/blob/v${version}/HISTORY.md";
55
59
license = licenses.asl20;
56
60
maintainers = with maintainers; [ jokatzke ];
61
61
+
mainProgram = "courlan";
57
62
};
58
63
}