blob: ff4c63891e5539a1b68aebadd248611e09f957ec (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
{ lib, buildPythonPackage, fetchPypi, isPy3k, fetchpatch, python, ply }:
buildPythonPackage rec {
pname = "slimit";
version = "0.8.1";
src = fetchPypi {
inherit pname version;
extension = "zip";
sha256 = "f433dcef899f166b207b67d91d3f7344659cb33b8259818f084167244e17720b";
};
# Some patches from https://github.com/rspivak/slimit/pull/65
patches = lib.optionals isPy3k [
(fetchpatch {
url = https://github.com/lelit/slimit/commit/a61e12d88cc123c4b7af2abef21d06fd182e561a.patch;
sha256 = "0lbhvkgn4l8g9fwvb81rfwjx7hsaq2pid8a5gczdk1ba65wfvdq5";
})
(fetchpatch {
url = https://github.com/lelit/slimit/commit/e8331659fb89e8a4613c5e4e338c877fead9c551.patch;
sha256 = "1hv4ysn09c9bfd5bxhhrp51hsi81hdidmx0y7zcrjjiich9ayrni";
})
];
propagatedBuildInputs = [ ply ];
checkPhase = ''
${python.interpreter} -m unittest discover -s src/slimit
'';
meta = with lib; {
description = "JavaScript minifier";
homepage = http://slimit.readthedocs.org/;
license = licenses.mit;
};
}
|