evcc: 0.131.8 -> 0.131.10 (#364658)
[NixPkgs.git] / pkgs / development / python-modules / nh3 / default.nix
blobf438525e5182903f1579b0fac06003045ae6226a
2   lib,
3   stdenv,
4   buildPythonPackage,
5   pythonOlder,
6   rustPlatform,
7   libiconv,
8   fetchFromGitHub,
9   darwin,
11 let
12   pname = "nh3";
13   version = "0.2.17";
14   src = fetchFromGitHub {
15     owner = "messense";
16     repo = pname;
17     rev = "v${version}";
18     hash = "sha256-j9OoXAuuCWsBHanN+SzSip94ZA+kY8HUVvfY/omUSSM=";
19   };
21 buildPythonPackage {
22   inherit pname version src;
23   format = "pyproject";
24   disabled = pythonOlder "3.6";
26   cargoDeps = rustPlatform.fetchCargoTarball {
27     inherit src;
28     name = "${pname}-${version}";
29     hash = "sha256-WomlVzKOUfcgAWGJInSvZn9hm+bFpgc4nJbRiyPCU64=";
30   };
32   nativeBuildInputs = with rustPlatform; [
33     cargoSetupHook
34     maturinBuildHook
35   ];
37   buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
38     libiconv
39     darwin.apple_sdk.frameworks.Security
40   ];
42   pythonImportsCheck = [ "nh3" ];
44   meta = with lib; {
45     description = "Python binding to Ammonia HTML sanitizer Rust crate";
46     homepage = "https://github.com/messense/nh3";
47     license = licenses.mit;
48     maintainers = with maintainers; [ happysalada ];
49   };