From 3c05bbcfd5d0367f59fbf303392aceb7f82d9184 Mon Sep 17 00:00:00 2001 From: Gon Solo Date: Tue, 16 Dec 2025 11:26:01 +0100 Subject: [PATCH] libparse-python: init at 0-unstable-2025-12-15 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: GaƩtan Lepage --- .../libparse-python/package.nix | 48 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 50 insertions(+) create mode 100644 pkgs/development/python-modules/libparse-python/package.nix diff --git a/pkgs/development/python-modules/libparse-python/package.nix b/pkgs/development/python-modules/libparse-python/package.nix new file mode 100644 index 000000000000..3df9e3c1f480 --- /dev/null +++ b/pkgs/development/python-modules/libparse-python/package.nix @@ -0,0 +1,48 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + pytestCheckHook, + setuptools, + pybind11, +}: + +buildPythonPackage { + pname = "libparse-python"; + version = "0-unstable-2025-08-30"; + pyproject = true; + + src = fetchFromGitHub { + owner = "librelane"; + repo = "libparse-python"; + rev = "ff5b26da3d66affb60696fd6c4af7f8726729c8c"; + fetchSubmodules = true; + hash = "sha256-H2UHh5RbxJ65yTbLybCEanl5qA4o0e/0rAQKmIhvXeQ="; + }; + + postPatch = '' + substituteInPlace yosys/passes/techmap/libparse.cc \ + --replace-fail \ + "void LibertyParser::error" \ + "__attribute__((weak)) void LibertyParser::error" + ''; + + build-system = [ + pybind11 + setuptools + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ "libparse" ]; + + meta = { + description = "Python library for parsing Yosys output"; + homepage = "https://github.com/librelane/libparse-python"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ gonsolo ]; + platforms = lib.platforms.linux; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 997a8b53bdce..91989494c1cb 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8520,6 +8520,8 @@ self: super: with self; { } ); + libparse-python = callPackage ../development/python-modules/libparse-python/package.nix { }; + libpass = callPackage ../development/python-modules/libpass { }; libpcap = callPackage ../development/python-modules/libpcap {