nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 buildPythonPackage,
3 fetchPypi,
4 lib,
5 rustPlatform,
6}:
7
8buildPythonPackage rec {
9 pname = "minify-html";
10 version = "0.18.1";
11
12 pyproject = true;
13
14 # Fetching from Pypi, because there is no Cargo.lock in the GitHub repo.
15 src = fetchPypi {
16 inherit version;
17 pname = "minify_html";
18 hash = "sha256-Q5mFMO9TdwHwA6jpCLdW147/MDyGsEGpWFXikFGLp5w=";
19 };
20
21 cargoDeps = rustPlatform.fetchCargoVendor {
22 inherit pname version src;
23 hash = "sha256-K0m+rM0dcosAOl5jYdh9CSRrL/Vuk1ATWHPQJbLxvRw=";
24 };
25
26 nativeBuildInputs = with rustPlatform; [
27 cargoSetupHook
28 maturinBuildHook
29 ];
30
31 pythonImportsCheck = [ "minify_html" ];
32
33 meta = {
34 description = "Extremely fast and smart HTML + JS + CSS minifier";
35 homepage = "https://github.com/wilsonzlin/minify-html/tree/master/minify-html-python";
36 changelog = "https://github.com/wilsonzlin/minify-html/blob/v${version}/CHANGELOG.md";
37 license = lib.licenses.mit;
38 maintainers = with lib.maintainers; [
39 DutchGerman
40 friedow
41 ];
42 };
43}