Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / python-flirt / default.nix
blob54d942fd08408378514c46a7793eeb744b0c4996
1 { lib
2 , stdenv
3 , buildPythonPackage
4 , fetchFromGitHub
5 , rustPlatform
6 , libiconv
7 }:
9 buildPythonPackage rec {
10   pname = "python-flirt";
11   version = "0.8.6";
13   src = fetchFromGitHub {
14     owner = "williballenthin";
15     repo = "lancelot";
16     rev = "v${version}";
17     hash = "sha256-J48tRgJw6JjUrcAQdRELFE50pyDptbmbgYbr+rAK/PA=";
18   };
20   postPatch = ''
21     cp ${./Cargo.lock} Cargo.lock
22   '';
24   format = "pyproject";
26   nativeBuildInputs = with rustPlatform; [
27     cargoSetupHook
28     maturinBuildHook
29   ];
31   buildInputs = lib.optionals stdenv.isDarwin [
32     libiconv
33   ];
35   buildAndTestSubdir = "pyflirt";
37   cargoDeps = rustPlatform.importCargoLock {
38     lockFile = ./Cargo.lock;
39     outputHashes = {
40       "zydis-3.1.3" = "sha256-X+aURjNfXGXO4eh6RJ3bi8Eb2kvF09I34ZHffvYjt9I=";
41     };
42   };
44   pythonImportsCheck = [ "flirt" ];
46   meta = with lib; {
47     description = "Python library for parsing, compiling, and matching Fast Library Identification and Recognition Technology (FLIRT) signatures";
48     homepage = "https://github.com/williballenthin/lancelot/tree/master/pyflirt";
49     license = licenses.asl20;
50     maintainers = with maintainers; [ sbruder ];
51   };