aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorLudovic Courtès <ludovic.courtes@inria.fr>2017-05-12 11:55:14 +0200
committerLudovic Courtès <ludo@gnu.org>2017-05-12 13:31:35 +0200
commitb9048a14b197fc8b5d1ce9fe7732329c4dd47451 (patch)
tree4e7f5035d64a03b88c93e8746c0da9f125be6d57 /gnu/packages
parent602db62c7c746f777cda62aff9e5450d041f488f (diff)
downloadpatches-b9048a14b197fc8b5d1ce9fe7732329c4dd47451.tar
patches-b9048a14b197fc8b5d1ce9fe7732329c4dd47451.tar.gz
gnu: proot: Add statically-linked variant.
* gnu/packages/linux.scm (proot-static): New variable.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/linux.scm22
1 files changed, 22 insertions, 0 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 94464d592a..3c6ea77682 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -3885,3 +3885,25 @@ generic process instrumentation engine thanks to its extension mechanism.
Technically PRoot relies on @code{ptrace}, an unprivileged system-call
available in the kernel Linux.")
(license license:gpl2+)))
+
+(define-public proot-static
+ (package
+ (inherit proot)
+ (name "proot-static")
+ (synopsis
+ "Unprivileged chroot, bind mount, and binfmt_misc (statically linked)")
+ (inputs `(("talloc" ,talloc/static)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments proot)
+ ((#:make-flags flags)
+ `(cons "LDFLAGS = -ltalloc -static -static-libgcc" ,flags))
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'strip 'remove-store-references
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out")))
+ (with-directory-excursion out
+ (remove-store-references "bin/proot")
+ #t))))))
+ ((#:allowed-references _ '("out"))
+ '("out"))))))