Update aider (#375634)
[NixPkgs.git] / pkgs / development / python-modules / verilogae / default.nix
blobab6bd93632c070818e1a441eb797c0ee4ff16dd3
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   setuptools-rust,
6   rustPlatform,
7   cargo,
8   rustc,
9   autoPatchelfHook,
10   pkg-config,
11   llvmPackages_15,
12   libxml2,
13   ncurses,
14   zlib,
17 buildPythonPackage rec {
18   pname = "verilogae";
19   version = "1.0.0";
20   pyproject = true;
22   src = fetchFromGitHub {
23     owner = "pascalkuthe";
24     repo = "OpenVAF";
25     rev = "VerilogAE-v${version}";
26     hash = "sha256-TILKKmgSyhyxp88sdflDXAoH++iP6CMpdoXN1/1fsjU=";
27   };
29   postPatch = ''
30     substituteInPlace openvaf/llvm/src/initialization.rs \
31       --replace-fail "i8" "libc::c_char"
32     substituteInPlace openvaf/osdi/build.rs \
33       --replace-fail "-fPIC" ""
34   '';
36   cargoDeps = rustPlatform.importCargoLock {
37     lockFile = ./Cargo.lock;
38     outputHashes = {
39       "salsa-0.17.0-pre.2" = "sha256-6GssvV76lFr5OzAUekz2h6f82Tn7usz5E8MSZ5DmgJw=";
40     };
41   };
43   nativeBuildInputs = [
44     setuptools-rust
45     rustPlatform.cargoSetupHook
46     rustPlatform.bindgenHook
47     cargo
48     rustc
49     autoPatchelfHook
50     pkg-config
51     llvmPackages_15.clang
52     llvmPackages_15.llvm
53   ];
55   buildInputs = [
56     libxml2.dev
57     llvmPackages_15.libclang
58     ncurses
59     zlib
60   ];
62   cargoBuildType = "release";
64   pythonImportsCheck = [ "verilogae" ];
66   hardeningDisable = [ "pic" ];
68   meta = {
69     description = "Verilog-A tool useful for compact model parameter extraction";
70     homepage = "https://man.sr.ht/~dspom/openvaf_doc/verilogae/";
71     license = lib.licenses.gpl3Only;
72     maintainers = with lib.maintainers; [
73       jasonodoom
74       jleightcap
75     ];
76     platforms = lib.platforms.linux;
77     sourceProvenance = [ lib.sourceTypes.binaryBytecode ];
78   };