nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 nix-update-script,
6 setuptools-rust,
7 rustPlatform,
8 cargo,
9 rustc,
10 pkg-config,
11 llvmPackages,
12 libxml2,
13 ncurses,
14 zlib,
15}:
16
17buildPythonPackage.override { stdenv = llvmPackages.stdenv; } rec {
18 pname = "verilogae";
19 version = "24.0.0mob-unstable-2025-07-21";
20 pyproject = true;
21
22 src = fetchFromGitHub {
23 owner = "OpenVAF";
24 repo = "OpenVAF-Reloaded";
25 rev = "d878f5519b1767b64c6ebeb4d67e29e7cd46e60b";
26 hash = "sha256-TDE2Ewokhm2KSKe+sunUbV8KD3kaTSd5dB3CLCWGJ9U=";
27 };
28
29 postPatch = ''
30 substituteInPlace openvaf/osdi/build.rs \
31 --replace-fail "-fPIC" ""
32 '';
33
34 cargoDeps = rustPlatform.fetchCargoVendor {
35 inherit pname version src;
36 hash = "sha256-5SLrVL3h6+tptHv3GV7r8HUTrYQC9VdF68O2/Uct3xA=";
37 };
38
39 nativeBuildInputs = [
40 setuptools-rust
41 rustPlatform.cargoSetupHook
42 rustPlatform.bindgenHook
43 cargo
44 rustc
45 pkg-config
46 llvmPackages.llvm
47 ];
48
49 buildInputs = [
50 libxml2.dev
51 llvmPackages.libclang
52 ncurses
53 zlib
54 ];
55
56 cargoBuildType = "release";
57
58 pythonImportsCheck = [ "verilogae" ];
59
60 hardeningDisable = [ "pic" ];
61
62 passthru.updateScript = nix-update-script {
63 extraArgs = [ "--version=branch" ];
64 };
65
66 meta = {
67 description = "Verilog-A tool useful for compact model parameter extraction";
68 homepage = "https://man.sr.ht/~dspom/openvaf_doc/verilogae/";
69 license = lib.licenses.gpl3Only;
70 maintainers = with lib.maintainers; [
71 jasonodoom
72 jleightcap
73 ];
74 platforms = lib.platforms.unix;
75 sourceProvenance = [ lib.sourceTypes.binaryBytecode ];
76 };
77}