;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014 John Darrington <jmd@gnu.org>
-;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
;;;
;;; This file is part of GNU Guix.
;;;
#:use-module (guix build-system gnu)
#:use-module (gnu packages)
#:use-module (gnu packages admin)
+ #:use-module (gnu packages algebra)
#:use-module (gnu packages compression)
#:use-module (gnu packages perl))
(define-public busybox
(package
(name "busybox")
- (version "1.29.1")
+ (version "1.29.3")
(source (origin
(method url-fetch)
(uri (string-append
version ".tar.bz2"))
(sha256
(base32
- "1hqlr5b3bsyb6avadz1z4za6pyl32r1krnpcpwwqilhnx8q0f9gw"))))
+ "1dzg45vgy2w1xcd3p6h8d76ykhabbvk1h0lf8yb24ikrwlv8cr4p"))))
(build-system gnu-build-system)
(arguments
'(#:phases
#t))
(replace 'configure
(lambda _ (invoke "make" "defconfig")))
+ (add-after 'configure 'dont-install-to-usr
+ (lambda _
+ (substitute* ".config"
+ (("# CONFIG_INSTALL_NO_USR is not set")
+ "CONFIG_INSTALL_NO_USR=y"))
+ #t))
(replace 'check
(lambda _
(substitute* '("testsuite/du/du-s-works"
(home-page "https://www.busybox.net")
;; Some files are gplv2+
(license gpl2)))
+
+(define-public toybox
+ (package
+ (name "toybox")
+ (version "0.8.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://landley.net/toybox/downloads/toybox-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1mgya8zxgf30i5w3rhsb3n70kwlhifxbajh6wqdsz6rf8kx609ws"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'set-environment-variables
+ (lambda _
+ (setenv "CC" (which "gcc"))
+ (setenv "HOSTCC" (which "gcc"))
+ #t))
+ (replace 'configure
+ (lambda _ (invoke "make" "defconfig")))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (invoke "make"
+ (string-append "PREFIX=" out)
+ "install"))))
+ (add-after 'install 'remove-usr-directory
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (delete-file-recursively (string-append out "/usr"))
+ #t))))
+ #:test-target "tests"))
+ (native-inputs `(("bc" ,bc)))
+ (synopsis "Many common UNIX utilities in a single executable")
+ (description "ToyBox combines tiny versions of many common UNIX utilities
+into a single small executable. It provides a fairly complete environment for
+any small or embedded system.")
+ (home-page "https://landley.net/toybox/")
+ (license bsd-2)))