[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/02: gnu: proot: Add statically-linked variant.
From: |
Ludovic Courtès |
Subject: |
02/02: gnu: proot: Add statically-linked variant. |
Date: |
Fri, 12 May 2017 07:31:52 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit b9048a14b197fc8b5d1ce9fe7732329c4dd47451
Author: Ludovic Courtès <address@hidden>
Date: Fri May 12 11:55:14 2017 +0200
gnu: proot: Add statically-linked variant.
* gnu/packages/linux.scm (proot-static): New variable.
---
gnu/packages/linux.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 94464d5..3c6ea77 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"))))))