tangled
alpha
login
or
join now
tjh.dev
/
nixpkgs
0
fork
atom
nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
0
fork
atom
overview
issues
pulls
pipelines
python310Packages.diffimg: init at 0.3.0
Evils
2 years ago
c7769625
37ace213
+45
2 changed files
expand all
collapse all
unified
split
pkgs
development
python-modules
diffimg
default.nix
top-level
python-packages.nix
+43
pkgs/development/python-modules/diffimg/default.nix
reviewed
···
1
1
+
{ lib
2
2
+
, buildPythonPackage
3
3
+
, fetchFromGitHub
4
4
+
, pillow
5
5
+
, unittestCheckHook
6
6
+
}:
7
7
+
8
8
+
buildPythonPackage rec {
9
9
+
pname = "diffimg";
10
10
+
version = "0.3.0"; # github recognized 0.1.3, there's a v0.1.5 tag and setup.py says 0.3.0
11
11
+
format = "setuptools";
12
12
+
13
13
+
src = fetchFromGitHub {
14
14
+
owner = "nicolashahn";
15
15
+
repo = "diffimg";
16
16
+
rev = "b82f0bb416f100f9105ccccf1995872b29302461";
17
17
+
hash = "sha256-H/UQsqyfdnlESBe7yRu6nK/0dakQkAfeFaZNwjCMvdM=";
18
18
+
};
19
19
+
20
20
+
# it imports the wrong diff,
21
21
+
# fix offered to upstream https://github.com/nicolashahn/diffimg/pull/6
22
22
+
postPatch = ''
23
23
+
substituteInPlace diffimg/test.py \
24
24
+
--replace "from diff import diff" "from diffimg.diff import diff"
25
25
+
'';
26
26
+
27
27
+
propagatedBuildInputs = [
28
28
+
pillow
29
29
+
];
30
30
+
31
31
+
pythonImportsCheck = [ "diffimg" ];
32
32
+
33
33
+
nativeCheckInputs = [
34
34
+
unittestCheckHook
35
35
+
];
36
36
+
37
37
+
meta = with lib; {
38
38
+
description = "Differentiate images in python - get a ratio or percentage difference, and generate a diff image";
39
39
+
homepage = "https://github.com/nicolashahn/diffimg";
40
40
+
license = licenses.mit;
41
41
+
maintainers = with maintainers; [ evils ];
42
42
+
};
43
43
+
}
+2
pkgs/top-level/python-packages.nix
reviewed
···
2549
2549
2550
2550
diff-match-patch = callPackage ../development/python-modules/diff-match-patch { };
2551
2551
2552
2552
+
diffimg = callPackage ../development/python-modules/diffimg { };
2553
2553
+
2552
2554
digital-ocean = callPackage ../development/python-modules/digitalocean { };
2553
2555
2554
2556
digi-xbee = callPackage ../development/python-modules/digi-xbee { };