2014-05-27 06:53:30 +00:00
|
|
|
;;; GNU Guix --- Functional package management for GNU
|
2016-06-30 16:04:08 +00:00
|
|
|
;;; Copyright © 2014 John Darrington <jmd@gnu.org>
|
|
|
|
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
|
2014-05-27 06:53:30 +00:00
|
|
|
;;;
|
|
|
|
;;; This file is part of GNU Guix.
|
|
|
|
;;;
|
|
|
|
;;; GNU Guix is free software; you can redistribute it and/or modify it
|
|
|
|
;;; under the terms of the GNU General Public License as published by
|
|
|
|
;;; the Free Software Foundation; either version 3 of the License, or (at
|
|
|
|
;;; your option) any later version.
|
|
|
|
;;;
|
|
|
|
;;; GNU Guix is distributed in the hope that it will be useful, but
|
|
|
|
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
;;; GNU General Public License for more details.
|
|
|
|
;;;
|
|
|
|
;;; You should have received a copy of the GNU General Public License
|
|
|
|
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
(define-module (gnu packages busybox)
|
|
|
|
#:use-module (guix licenses)
|
|
|
|
#:use-module (guix packages)
|
|
|
|
#:use-module (guix download)
|
|
|
|
#:use-module (guix build-system gnu)
|
|
|
|
#:use-module (gnu packages)
|
|
|
|
#:use-module (gnu packages admin)
|
|
|
|
#:use-module (gnu packages perl)
|
|
|
|
#:use-module (gnu packages zip))
|
|
|
|
|
|
|
|
(define-public busybox
|
|
|
|
(package
|
|
|
|
(name "busybox")
|
2016-12-23 02:12:13 +00:00
|
|
|
(version "1.26.0")
|
2014-05-27 06:53:30 +00:00
|
|
|
(source (origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (string-append
|
2016-06-30 16:04:08 +00:00
|
|
|
"https://www.busybox.net/downloads/" name "-"
|
2014-05-27 06:53:30 +00:00
|
|
|
version ".tar.bz2"))
|
|
|
|
(sha256
|
|
|
|
(base32
|
2016-12-23 02:12:13 +00:00
|
|
|
"0k0g3hk58m99c2sfq97ngnixb2rv2wzyhv3z00lxaw78bqvjglis"))))
|
2014-05-27 06:53:30 +00:00
|
|
|
(build-system gnu-build-system)
|
|
|
|
(arguments
|
gnu: Adjust formatting as recommended by 'guix lint'.
* gnu/packages/aidc.scm (barcode, qrencode),
gnu/packages/bash.scm (bash, bash-completion),
gnu/packages/busybox.scm (busybox),
gnu/packages/cdrom.scm (cdparanoia),
gnu/packages/cmake.scm (cmake),
gnu/packages/conkeror.scm (conkeror),
gnu/packages/cook.scm (cook),
gnu/packages/curl.scm (curl),
gnu/packages/docbook.scm (docbook-xsl),
gnu/packages/enlightenment.scm (enlightenment),
gnu/packages/games.scm (abbaye),
gnu/packages/geeqie.scm (exiv2),
gnu/packages/gimp.scm (gegl),
gnu/packages/gl.scm (glu, freeglut, ftgl),
gnu/packages/glib.scm (glib),
gnu/packages/gnome.scm (orbit2, gconf, geocode-glib),
gnu/packages/gstreamer.scm (gstreamer, gst-plugins-base),
gnu/packages/linux.scm (util-linux),
gnu/packages/lisp.scm (gcl, ecl),
gnu/packages/maths.scm (gnuplot, hdf5),
gnu/packages/ssh.scm (dropbear),
gnu/packages/web.scm (json-c): Remove tabulations and trailing
white spaces or reformat to fit within 80 columns.
* gnu/packages/audio.scm (aubio),
gnu/packages/emacs.scm (emacs-s),
gnu/packages/engineering.scm (geda-gaf),
gnu/packages/games.scm (dosbox),
gnu/packages/gnome.scm (gusb),
gnu/packages/gtk.scm (gtk+),
gnu/packages/guile.scm (guile-wisp),
gnu/packages/hurd.scm (hurd-headers),
gnu/packages/wm.scm (i3-wm): Adjust synopsis or description.
2015-11-13 14:50:36 +00:00
|
|
|
`(#:phases
|
2016-06-30 16:09:40 +00:00
|
|
|
(modify-phases %standard-phases
|
|
|
|
(replace 'configure
|
|
|
|
(lambda _ (zero? (system* "make" "defconfig"))))
|
|
|
|
(replace 'check
|
|
|
|
(lambda _
|
2014-05-27 06:53:30 +00:00
|
|
|
(substitute* '("testsuite/du/du-s-works"
|
2016-06-30 16:09:40 +00:00
|
|
|
"testsuite/du/du-works")
|
|
|
|
(("/bin") "/etc")) ; there is no /bin but there is a /etc
|
2014-05-27 06:53:30 +00:00
|
|
|
|
|
|
|
;; There is no /usr/bin or /bin - replace it with /gnu/store
|
|
|
|
(substitute* "testsuite/cpio.tests"
|
2016-06-30 16:09:40 +00:00
|
|
|
(("/usr/bin") (%store-directory))
|
|
|
|
(("usr") (car (filter (negate string-null?)
|
|
|
|
(string-split (%store-directory) #\/)))))
|
2014-05-27 06:53:30 +00:00
|
|
|
|
|
|
|
(substitute* "testsuite/date/date-works-1"
|
2016-06-30 16:09:40 +00:00
|
|
|
(("/bin/date") (which "date")))
|
2014-05-27 06:53:30 +00:00
|
|
|
|
|
|
|
;; The pidof tests assume that pid 1 is called "init" but that is not
|
|
|
|
;; true in guix build environment
|
|
|
|
(substitute* "testsuite/pidof.tests"
|
2016-06-30 16:09:40 +00:00
|
|
|
(("-s init") "-s $(cat /proc/1/comm)"))
|
2014-05-27 06:53:30 +00:00
|
|
|
|
|
|
|
;; This test cannot possibly pass.
|
|
|
|
;; It is trying to test that "which ls" returns "/bin/ls" when PATH is not set.
|
|
|
|
;; However, this relies on /bin/ls existing. Which it does not in guix.
|
|
|
|
(delete-file "testsuite/which/which-uses-default-path")
|
|
|
|
(rmdir "testsuite/which")
|
|
|
|
|
gnu: Adjust formatting as recommended by 'guix lint'.
* gnu/packages/aidc.scm (barcode, qrencode),
gnu/packages/bash.scm (bash, bash-completion),
gnu/packages/busybox.scm (busybox),
gnu/packages/cdrom.scm (cdparanoia),
gnu/packages/cmake.scm (cmake),
gnu/packages/conkeror.scm (conkeror),
gnu/packages/cook.scm (cook),
gnu/packages/curl.scm (curl),
gnu/packages/docbook.scm (docbook-xsl),
gnu/packages/enlightenment.scm (enlightenment),
gnu/packages/games.scm (abbaye),
gnu/packages/geeqie.scm (exiv2),
gnu/packages/gimp.scm (gegl),
gnu/packages/gl.scm (glu, freeglut, ftgl),
gnu/packages/glib.scm (glib),
gnu/packages/gnome.scm (orbit2, gconf, geocode-glib),
gnu/packages/gstreamer.scm (gstreamer, gst-plugins-base),
gnu/packages/linux.scm (util-linux),
gnu/packages/lisp.scm (gcl, ecl),
gnu/packages/maths.scm (gnuplot, hdf5),
gnu/packages/ssh.scm (dropbear),
gnu/packages/web.scm (json-c): Remove tabulations and trailing
white spaces or reformat to fit within 80 columns.
* gnu/packages/audio.scm (aubio),
gnu/packages/emacs.scm (emacs-s),
gnu/packages/engineering.scm (geda-gaf),
gnu/packages/games.scm (dosbox),
gnu/packages/gnome.scm (gusb),
gnu/packages/gtk.scm (gtk+),
gnu/packages/guile.scm (guile-wisp),
gnu/packages/hurd.scm (hurd-headers),
gnu/packages/wm.scm (i3-wm): Adjust synopsis or description.
2015-11-13 14:50:36 +00:00
|
|
|
(zero? (system* "make"
|
2014-05-27 06:53:30 +00:00
|
|
|
;; "V=1"
|
|
|
|
"SKIP_KNOWN_BUGS=1"
|
|
|
|
"SKIP_INTERNET_TESTS=1"
|
2016-06-30 16:09:40 +00:00
|
|
|
"check"))))
|
|
|
|
(replace 'install
|
|
|
|
(lambda* (#:key outputs #:allow-other-keys)
|
|
|
|
(let ((out (assoc-ref outputs "out")))
|
|
|
|
(zero?
|
|
|
|
(system* "make"
|
|
|
|
(string-append "CONFIG_PREFIX=" out)
|
|
|
|
"install"))))))))
|
2014-05-27 06:53:30 +00:00
|
|
|
(native-inputs `(("perl" ,perl) ; needed to generate the man pages (pod2man)
|
|
|
|
;; The following are needed by the tests.
|
|
|
|
("inetutils" ,inetutils)
|
2016-06-30 16:04:08 +00:00
|
|
|
("which" ,(@ (gnu packages base) which))
|
2014-05-27 06:53:30 +00:00
|
|
|
("zip" ,zip)))
|
|
|
|
(synopsis "Many common UNIX utilities in a single executable")
|
|
|
|
(description "BusyBox combines tiny versions of many common UNIX utilities
|
2014-11-18 17:22:06 +00:00
|
|
|
into a single small executable. It provides a fairly complete environment for
|
|
|
|
any small or embedded system.")
|
2016-06-30 16:04:08 +00:00
|
|
|
(home-page "https://www.busybox.net")
|
2014-05-27 06:53:30 +00:00
|
|
|
;; Some files are gplv2+
|
|
|
|
(license gpl2)))
|