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