summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorNguyễn Gia Phong <mcsinyx@disroot.org>2025-09-18 14:34:37 +0900
committer宋文武 <iyzsong@member.fsf.org>2025-09-30 14:04:24 +0800
commit970169487a4c10384a2da03dcc58e026561bd0c9 (patch)
treefa24c7eea63547f943cc3b9dc4d534921f8372ac /gnu
parentb70e9d6e2a37fdbabc4a6f357c94dec0a2e8872b (diff)
gnu: Add python-fiu.
* gnu/packages/debug.scm (python-fiu): New variable. Closes: guix/guix#2765 Change-Id: I266bd6fb1ca5f201a1934a707b76930d343567b0 Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/debug.scm30
1 files changed, 30 insertions, 0 deletions
diff --git a/gnu/packages/debug.scm b/gnu/packages/debug.scm
index e6f6415d4a7..c16b05ffcb1 100644
--- a/gnu/packages/debug.scm
+++ b/gnu/packages/debug.scm
@@ -40,6 +40,7 @@
#:use-module (guix build-system gnu)
#:use-module (guix build-system cmake)
#:use-module (guix build-system go)
+ #:use-module (guix build-system pyproject)
#:use-module (guix build-system qt)
#:use-module (guix gexp)
#:use-module (gnu packages)
@@ -75,6 +76,7 @@
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages pretty-print)
#:use-module (gnu packages python)
+ #:use-module (gnu packages python-build)
#:use-module (gnu packages python-check)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages qt)
@@ -1130,3 +1132,31 @@ to mark points of failure inside your code
and to enable/disable the failure of those points.")
(home-page "https://blitiri.com.ar/p/libfiu")
(license license:public-domain)))
+
+(define-public python-fiu
+ (package
+ (name "python-fiu")
+ (version "1.2")
+ (source (package-source fiu))
+ (build-system pyproject-build-system)
+ (arguments
+ (list #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'enter-python-dir
+ (lambda _ (chdir "bindings/python")))
+ (add-before 'build 'set-env
+ (lambda* (#:key inputs #:allow-other-keys)
+ (setenv "PLIBPATH"
+ (string-append (assoc-ref inputs "fiu")
+ "/lib")))))
+ #:tests? #f)) ; tests run in fiu
+ (native-inputs (list python-setuptools python-wheel))
+ (inputs (list fiu))
+ (synopsis "Python binding for fiu (fault injection in userspace)")
+ (description "This package includes two Python modules:
+@enumerate
+@item @code{fiu} is a wrapper for @code{libfiu}, the fault injection C library.
+@item @code{fiu_ctrl} provide an easy way run a command
+with @code{libfiu} enabled, and controlling the failure points dynamically.
+@end enumerate")
+ (home-page (package-home-page fiu))
+ (license (package-license fiu))))