Merge papers: 47.0 -> 47.3 (#379765)
[NixPkgs.git] / pkgs / development / python-modules / python-flirt / default.nix
blob47fdc3cfa08dc5740352000f660c0797aaba2617
2   lib,
3   stdenv,
4   buildPythonPackage,
5   fetchFromGitHub,
6   rustPlatform,
7   libiconv,
8 }:
10 buildPythonPackage rec {
11   pname = "python-flirt";
12   version = "0.8.6";
14   src = fetchFromGitHub {
15     owner = "williballenthin";
16     repo = "lancelot";
17     rev = "v${version}";
18     hash = "sha256-J48tRgJw6JjUrcAQdRELFE50pyDptbmbgYbr+rAK/PA=";
19   };
21   postPatch = ''
22     cp ${./Cargo.lock} Cargo.lock
23   '';
25   format = "pyproject";
27   nativeBuildInputs = with rustPlatform; [
28     cargoSetupHook
29     maturinBuildHook
30   ];
32   buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
34   buildAndTestSubdir = "pyflirt";
36   cargoDeps = rustPlatform.importCargoLock {
37     lockFile = ./Cargo.lock;
38     outputHashes = {
39       "zydis-3.1.3" = "sha256-X+aURjNfXGXO4eh6RJ3bi8Eb2kvF09I34ZHffvYjt9I=";
40     };
41   };
43   pythonImportsCheck = [ "flirt" ];
45   meta = with lib; {
46     description = "Python library for parsing, compiling, and matching Fast Library Identification and Recognition Technology (FLIRT) signatures";
47     homepage = "https://github.com/williballenthin/lancelot/tree/master/pyflirt";
48     license = licenses.asl20;
49     maintainers = with maintainers; [ sbruder ];
50   };