| 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org> |
| 3 | ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr> |
| 4 | ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org> |
| 5 | ;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Mark H Weaver <mhw@netris.org> |
| 6 | ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch> |
| 7 | ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com> |
| 8 | ;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il> |
| 9 | ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org> |
| 10 | ;;; Copyright © 2016, 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr> |
| 11 | ;;; Copyright © 2016, 2017 Alex Kost <alezost@gmail.com> |
| 12 | ;;; Copyright © 2016 Raymond Nicholson <rain1@openmailbox.org> |
| 13 | ;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org> |
| 14 | ;;; Copyright © 2016, 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr> |
| 15 | ;;; Copyright © 2016, 2018, 2019 Ricardo Wurmus <rekado@elephly.net> |
| 16 | ;;; Copyright © 2016 David Craven <david@craven.ch> |
| 17 | ;;; Copyright © 2016 John Darrington <jmd@gnu.org> |
| 18 | ;;; Copyright © 2016, 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com> |
| 19 | ;;; Copyright © 2016, 2018 Rene Saavedra <pacoon@protonmail.com> |
| 20 | ;;; Copyright © 2016 Carlos Sánchez de La Lama <csanchezdll@gmail.com> |
| 21 | ;;; Copyright © 2016, 2017 ng0 <ng0@n0.is> |
| 22 | ;;; Copyright © 2017, 2018 Leo Famulari <leo@famulari.name> |
| 23 | ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.com> |
| 24 | ;;; Copyright © 2017 Gábor Boskovits <boskovits@gmail.com> |
| 25 | ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com> |
| 26 | ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org> |
| 27 | ;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com> |
| 28 | ;;; Copyright © 2017 nee <nee-git@hidamari.blue> |
| 29 | ;;; Copyright © 2017 Dave Love <fx@gnu.org> |
| 30 | ;;; Copyright © 2018 Pierre-Antoine Rouby <pierre-antoine.rouby@inria.fr> |
| 31 | ;;; Copyright © 2018 Brendan Tildesley <mail@brendan.scot> |
| 32 | ;;; Copyright © 2018 Manuel Graf <graf@init.at> |
| 33 | ;;; Copyright © 2018 Pierre Langlois <pierre.langlois@gmx.com> |
| 34 | ;;; Copyright © 2018 Vasile Dumitrascu <va511e@yahoo.com> |
| 35 | ;;; Copyright © 2019 Tim Gesthuizen <tim.gesthuizen@yahoo.de> |
| 36 | ;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com> |
| 37 | ;;; Copyright © 2019 Stefan Stefanović <stefanx2ovic@gmail.com> |
| 38 | ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com> |
| 39 | ;;; |
| 40 | ;;; This file is part of GNU Guix. |
| 41 | ;;; |
| 42 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
| 43 | ;;; under the terms of the GNU General Public License as published by |
| 44 | ;;; the Free Software Foundation; either version 3 of the License, or (at |
| 45 | ;;; your option) any later version. |
| 46 | ;;; |
| 47 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
| 48 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
| 49 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 50 | ;;; GNU General Public License for more details. |
| 51 | ;;; |
| 52 | ;;; You should have received a copy of the GNU General Public License |
| 53 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
| 54 | |
| 55 | (define-module (gnu packages linux) |
| 56 | #:use-module (gnu packages) |
| 57 | #:use-module (gnu packages acl) |
| 58 | #:use-module (gnu packages admin) |
| 59 | #:use-module (gnu packages algebra) |
| 60 | #:use-module (gnu packages attr) |
| 61 | #:use-module (gnu packages audio) |
| 62 | #:use-module (gnu packages autotools) |
| 63 | #:use-module (gnu packages backup) |
| 64 | #:use-module (gnu packages base) |
| 65 | #:use-module (gnu packages bash) |
| 66 | #:use-module (gnu packages bison) |
| 67 | #:use-module (gnu packages calendar) |
| 68 | #:use-module (gnu packages check) |
| 69 | #:use-module (gnu packages crypto) |
| 70 | #:use-module (gnu packages cryptsetup) |
| 71 | #:use-module (gnu packages compression) |
| 72 | #:use-module (gnu packages dbm) |
| 73 | #:use-module (gnu packages datastructures) |
| 74 | #:use-module (gnu packages docbook) |
| 75 | #:use-module (gnu packages documentation) |
| 76 | #:use-module (gnu packages elf) |
| 77 | #:use-module (gnu packages flex) |
| 78 | #:use-module (gnu packages file) |
| 79 | #:use-module (gnu packages freedesktop) |
| 80 | #:use-module (gnu packages gcc) |
| 81 | #:use-module (gnu packages gettext) |
| 82 | #:use-module (gnu packages glib) |
| 83 | #:use-module (gnu packages golang) |
| 84 | #:use-module (gnu packages gperf) |
| 85 | #:use-module (gnu packages gtk) |
| 86 | #:use-module (gnu packages libunwind) |
| 87 | #:use-module (gnu packages libusb) |
| 88 | #:use-module (gnu packages man) |
| 89 | #:use-module (gnu packages maths) |
| 90 | #:use-module (gnu packages multiprecision) |
| 91 | #:use-module (gnu packages ncurses) |
| 92 | #:use-module (gnu packages netpbm) |
| 93 | #:use-module (gnu packages networking) |
| 94 | #:use-module (gnu packages ninja) |
| 95 | #:use-module (gnu packages nss) |
| 96 | #:use-module (gnu packages perl) |
| 97 | #:use-module (gnu packages pciutils) |
| 98 | #:use-module (gnu packages pkg-config) |
| 99 | #:use-module (gnu packages popt) |
| 100 | #:use-module (gnu packages pulseaudio) |
| 101 | #:use-module (gnu packages python) |
| 102 | #:use-module (gnu packages readline) |
| 103 | #:use-module (gnu packages rrdtool) |
| 104 | #:use-module (gnu packages samba) |
| 105 | #:use-module (gnu packages serialization) |
| 106 | #:use-module (gnu packages slang) |
| 107 | #:use-module (gnu packages texinfo) |
| 108 | #:use-module (gnu packages tls) |
| 109 | #:use-module (gnu packages valgrind) |
| 110 | #:use-module (gnu packages video) |
| 111 | #:use-module (gnu packages web) |
| 112 | #:use-module (gnu packages xiph) |
| 113 | #:use-module (gnu packages xml) |
| 114 | #:use-module (gnu packages xdisorg) |
| 115 | #:use-module (gnu packages xorg) |
| 116 | #:use-module (gnu packages groff) |
| 117 | #:use-module (gnu packages selinux) |
| 118 | #:use-module (gnu packages swig) |
| 119 | #:use-module (guix build-system cmake) |
| 120 | #:use-module (guix build-system gnu) |
| 121 | #:use-module (guix build-system go) |
| 122 | #:use-module (guix build-system python) |
| 123 | #:use-module (guix build-system trivial) |
| 124 | #:use-module (guix build-system linux-module) |
| 125 | #:use-module (guix download) |
| 126 | #:use-module (guix git-download) |
| 127 | #:use-module ((guix licenses) #:prefix license:) |
| 128 | #:use-module (guix packages) |
| 129 | #:use-module (guix gexp) |
| 130 | #:use-module (guix store) |
| 131 | #:use-module (guix monads) |
| 132 | #:use-module (guix utils) |
| 133 | #:use-module (srfi srfi-1) |
| 134 | #:use-module (srfi srfi-2) |
| 135 | #:use-module (srfi srfi-26) |
| 136 | #:use-module (ice-9 match)) |
| 137 | |
| 138 | (define-public (system->linux-architecture arch) |
| 139 | "Return the Linux architecture name for ARCH, a Guix system name such as |
| 140 | \"x86_64-linux\" or a target triplet such as \"arm-linux-gnueabihf\"." |
| 141 | (let ((arch (car (string-split arch #\-)))) |
| 142 | (cond ((string=? arch "i686") "i386") |
| 143 | ((string-prefix? "mips" arch) "mips") |
| 144 | ((string-prefix? "arm" arch) "arm") |
| 145 | ((string-prefix? "aarch64" arch) "arm64") |
| 146 | ((string-prefix? "alpha" arch) "alpha") |
| 147 | ((string-prefix? "powerpc" arch) "powerpc") ;including "powerpc64le" |
| 148 | ((string-prefix? "s390" arch) "s390") |
| 149 | ((string-prefix? "riscv" arch) "riscv") |
| 150 | (else arch)))) |
| 151 | |
| 152 | (define-public (system->defconfig system) |
| 153 | "Some systems (notably powerpc-linux) require a special target for kernel |
| 154 | defconfig. Return the appropriate make target if applicable, otherwise return |
| 155 | \"defconfig\"." |
| 156 | (cond ((string-prefix? "powerpc-" system) "pmac32_defconfig") |
| 157 | ((string-prefix? "powerpc64le-" system) "ppc64_defconfig") |
| 158 | (else "defconfig"))) |
| 159 | |
| 160 | \f |
| 161 | ;;; |
| 162 | ;;; Kernel source code deblobbing. |
| 163 | ;;; |
| 164 | |
| 165 | (define (linux-libre-deblob-scripts version |
| 166 | deblob-hash |
| 167 | deblob-check-hash) |
| 168 | (list (version-major+minor version) |
| 169 | (origin |
| 170 | (method url-fetch) |
| 171 | (uri (string-append "https://linux-libre.fsfla.org" |
| 172 | "/pub/linux-libre/releases/" version "-gnu/" |
| 173 | "deblob-" (version-major+minor version))) |
| 174 | (sha256 deblob-hash)) |
| 175 | (origin |
| 176 | (method url-fetch) |
| 177 | (uri (string-append "https://linux-libre.fsfla.org" |
| 178 | "/pub/linux-libre/releases/" version "-gnu/" |
| 179 | "deblob-check")) |
| 180 | (sha256 deblob-check-hash)))) |
| 181 | |
| 182 | (define deblob-scripts-5.2 |
| 183 | (linux-libre-deblob-scripts |
| 184 | "5.2.10" |
| 185 | (base32 "076fwxlm6jq6z4vg1xq3kr474zz7qk71r90sf9dnfia3rw2pb4fa") |
| 186 | (base32 "0d3pp1bqchqc7vnxr1a56km5r0hzjiiipzz2xc3wgjwfi51k9kxc"))) |
| 187 | |
| 188 | (define deblob-scripts-4.19 |
| 189 | (linux-libre-deblob-scripts |
| 190 | "4.19.68" |
| 191 | (base32 "02zs405awaxydbapka4nz8h6lmnc0dahgczqsrs5s2bmzjyyqkcy") |
| 192 | (base32 "1fyacg28aym6virxyn7wk99qil2fjbks3iwm7p3hxy51pccn34za"))) |
| 193 | |
| 194 | (define deblob-scripts-4.14 |
| 195 | (linux-libre-deblob-scripts |
| 196 | "4.14.140" |
| 197 | (base32 "091jk9jkn9jf39bxpc7395bhcb7p96nkg3a8047380ki06lnfxh6") |
| 198 | (base32 "0x9nd3hnyrm753cbgdqmy92mbnyw86w64g4hvyibnkpq5n7s3z9n"))) |
| 199 | |
| 200 | (define deblob-scripts-4.9 |
| 201 | (linux-libre-deblob-scripts |
| 202 | "4.9.190" |
| 203 | (base32 "1wvldzlv7q2xdbadas87dh593nxr4a8p5n0f8zpm72lja6w18hmg") |
| 204 | (base32 "0is8gn4qdd7h5l6lacvhqdch26lmrbgxfm8ab7fx8n85ha7y358w"))) |
| 205 | |
| 206 | (define deblob-scripts-4.4 |
| 207 | (linux-libre-deblob-scripts |
| 208 | "4.4.190" |
| 209 | (base32 "0x2j1i88am54ih2mk7gyl79g25l9zz4r08xhl482l3fvjj2irwbw") |
| 210 | (base32 "1x40lbiaizksy8z38ax7wpqr9ldgq7qvkxbb0ca98vd1axpklb10"))) |
| 211 | |
| 212 | (define* (computed-origin-method gexp-promise hash-algo hash |
| 213 | #:optional (name "source") |
| 214 | #:key (system (%current-system)) |
| 215 | (guile (default-guile))) |
| 216 | "Return a derivation that executes the G-expression that results |
| 217 | from forcing GEXP-PROMISE." |
| 218 | (mlet %store-monad ((guile (package->derivation guile system))) |
| 219 | (gexp->derivation (or name "computed-origin") |
| 220 | (force gexp-promise) |
| 221 | #:graft? #f ;nothing to graft |
| 222 | #:system system |
| 223 | #:guile-for-build guile))) |
| 224 | |
| 225 | (define (make-linux-libre-source version |
| 226 | upstream-source |
| 227 | deblob-scripts) |
| 228 | "Return a 'computed' origin that generates a Linux-libre tarball from the |
| 229 | corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS." |
| 230 | (match deblob-scripts |
| 231 | ((deblob-version (? origin? deblob) (? origin? deblob-check)) |
| 232 | (unless (string=? deblob-version (version-major+minor version)) |
| 233 | ;; The deblob script cannot be expected to work properly on a |
| 234 | ;; different version (major+minor) of Linux, even if no errors |
| 235 | ;; are signaled during execution. |
| 236 | (error "deblob major+minor version mismatch")) |
| 237 | (origin |
| 238 | (method computed-origin-method) |
| 239 | (file-name (string-append "linux-libre-" version "-guix.tar.xz")) |
| 240 | (sha256 #f) |
| 241 | (uri |
| 242 | (delay |
| 243 | (with-imported-modules '((guix build utils)) |
| 244 | #~(begin |
| 245 | (use-modules (guix build utils) |
| 246 | (srfi srfi-1) |
| 247 | (ice-9 match) |
| 248 | (ice-9 ftw)) |
| 249 | (let ((dir (string-append "linux-" #$version))) |
| 250 | |
| 251 | (mkdir "/tmp/bin") |
| 252 | (set-path-environment-variable |
| 253 | "PATH" '("bin") |
| 254 | (list "/tmp" |
| 255 | #+(canonical-package bash) |
| 256 | #+(canonical-package coreutils) |
| 257 | #+(canonical-package diffutils) |
| 258 | #+(canonical-package findutils) |
| 259 | #+(canonical-package patch) |
| 260 | #+(canonical-package xz) |
| 261 | #+(canonical-package sed) |
| 262 | #+(canonical-package grep) |
| 263 | #+(canonical-package bzip2) |
| 264 | #+(canonical-package gzip) |
| 265 | #+(canonical-package tar) |
| 266 | ;; The comments in the 'deblob-check' script |
| 267 | ;; claim that it supports Python 2 and 3, but |
| 268 | ;; in fact it fails when run in Python 3 as |
| 269 | ;; of version 5.1.3. |
| 270 | #+python-2)) |
| 271 | |
| 272 | (with-directory-excursion "/tmp/bin" |
| 273 | |
| 274 | (copy-file #+deblob "deblob") |
| 275 | (chmod "deblob" #o755) |
| 276 | (substitute* "deblob" |
| 277 | (("/bin/sh") (which "sh"))) |
| 278 | |
| 279 | (copy-file #+deblob-check "deblob-check") |
| 280 | (chmod "deblob-check" #o755) |
| 281 | (substitute* "deblob-check" |
| 282 | (("/bin/sh") (which "sh")) |
| 283 | (("/bin/sed") (which "sed")) |
| 284 | (("/usr/bin/python") (which "python")))) |
| 285 | |
| 286 | (if (file-is-directory? #+upstream-source) |
| 287 | (begin |
| 288 | (format #t "Copying upstream linux source...~%") |
| 289 | (force-output) |
| 290 | (invoke "cp" "--archive" #+upstream-source dir) |
| 291 | (invoke "chmod" "--recursive" "u+w" dir)) |
| 292 | (begin |
| 293 | (format #t "Unpacking upstream linux tarball...~%") |
| 294 | (force-output) |
| 295 | (invoke "tar" "xf" #$upstream-source) |
| 296 | (match (scandir "." |
| 297 | (lambda (name) |
| 298 | (and (not (member name '("." ".."))) |
| 299 | (file-is-directory? name)))) |
| 300 | ((unpacked-dir) |
| 301 | (unless (string=? dir unpacked-dir) |
| 302 | (rename-file unpacked-dir dir))) |
| 303 | (dirs |
| 304 | (error "multiple directories found" dirs))))) |
| 305 | |
| 306 | (with-directory-excursion dir |
| 307 | (setenv "PYTHON" (which "python")) |
| 308 | (format #t "Running deblob script...~%") |
| 309 | (force-output) |
| 310 | (invoke "/tmp/bin/deblob")) |
| 311 | |
| 312 | (format #t "~%Packing new Linux-libre tarball...~%") |
| 313 | (force-output) |
| 314 | (invoke "tar" "cvfa" #$output |
| 315 | ;; Avoid non-determinism in the archive. |
| 316 | "--mtime=@0" |
| 317 | "--owner=root:0" |
| 318 | "--group=root:0" |
| 319 | "--sort=name" |
| 320 | "--hard-dereference" |
| 321 | dir)))))))))) |
| 322 | |
| 323 | \f |
| 324 | ;;; |
| 325 | ;;; Kernel sources. |
| 326 | ;;; |
| 327 | |
| 328 | (define (linux-libre-urls version) |
| 329 | "Return a list of URLs for Linux-Libre VERSION." |
| 330 | (list (string-append |
| 331 | "https://linux-libre.fsfla.org/pub/linux-libre/releases/" |
| 332 | version "-gnu/linux-libre-" version "-gnu.tar.xz") |
| 333 | |
| 334 | ;; XXX: Work around <http://bugs.gnu.org/14851>. |
| 335 | (string-append |
| 336 | "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-" |
| 337 | version "-gnu.tar.xz") |
| 338 | |
| 339 | ;; Maybe this URL will become valid eventually. |
| 340 | (string-append |
| 341 | "mirror://gnu/linux-libre/" version "-gnu/linux-libre-" |
| 342 | version "-gnu.tar.xz"))) |
| 343 | |
| 344 | (define (%upstream-linux-source version hash) |
| 345 | (origin |
| 346 | (method url-fetch) |
| 347 | (uri (string-append "mirror://kernel.org" |
| 348 | "/linux/kernel/v" (version-major version) ".x/" |
| 349 | "linux-" version ".tar.xz")) |
| 350 | (sha256 hash))) |
| 351 | |
| 352 | (define-public linux-libre-5.2-version "5.2.15") |
| 353 | (define-public linux-libre-5.2-pristine-source |
| 354 | (let ((version linux-libre-5.2-version) |
| 355 | (hash (base32 "0jhc70r2rygm91qifjagg1jgbpjwyyq6m8g1n5iv81l1v84i0mpb"))) |
| 356 | (make-linux-libre-source version |
| 357 | (%upstream-linux-source version hash) |
| 358 | deblob-scripts-5.2))) |
| 359 | |
| 360 | (define-public linux-libre-4.19-version "4.19.71") |
| 361 | (define-public linux-libre-4.19-pristine-source |
| 362 | (let ((version linux-libre-4.19-version) |
| 363 | (hash (base32 "1bjwkb7k82l646ryyy0jbwsnygm2qsxgcwli8bdrj844skzynlqz"))) |
| 364 | (make-linux-libre-source version |
| 365 | (%upstream-linux-source version hash) |
| 366 | deblob-scripts-4.19))) |
| 367 | |
| 368 | (define-public linux-libre-4.14-version "4.14.142") |
| 369 | (define-public linux-libre-4.14-pristine-source |
| 370 | (let ((version linux-libre-4.14-version) |
| 371 | (hash (base32 "1wwhnm1n1b6yzsd2zzzf9i3n4hlvgnph70p67cwahw0ik4ssayz6"))) |
| 372 | (make-linux-libre-source version |
| 373 | (%upstream-linux-source version hash) |
| 374 | deblob-scripts-4.14))) |
| 375 | |
| 376 | (define-public linux-libre-4.9-version "4.9.191") |
| 377 | (define-public linux-libre-4.9-pristine-source |
| 378 | (let ((version linux-libre-4.9-version) |
| 379 | (hash (base32 "1g5p736p8zx5rmxaj56yw93jp768npl868jsn8973dny0rsbim6y"))) |
| 380 | (make-linux-libre-source version |
| 381 | (%upstream-linux-source version hash) |
| 382 | deblob-scripts-4.9))) |
| 383 | |
| 384 | (define-public linux-libre-4.4-version "4.4.191") |
| 385 | (define-public linux-libre-4.4-pristine-source |
| 386 | (let ((version linux-libre-4.4-version) |
| 387 | (hash (base32 "0x3lnq4xyj5v6r1cz4jizm4vdspws1nb806f5qczwi3yil5nm6bh"))) |
| 388 | (make-linux-libre-source version |
| 389 | (%upstream-linux-source version hash) |
| 390 | deblob-scripts-4.4))) |
| 391 | |
| 392 | (define %boot-logo-patch |
| 393 | ;; Linux-Libre boot logo featuring Freedo and a gnu. |
| 394 | (origin |
| 395 | (method url-fetch) |
| 396 | (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/" |
| 397 | "lemote/gnewsense/branches/3.16/100gnu+freedo.patch")) |
| 398 | (sha256 |
| 399 | (base32 |
| 400 | "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06")))) |
| 401 | |
| 402 | (define %linux-libre-arm-export-__sync_icache_dcache-patch |
| 403 | (origin |
| 404 | (method url-fetch) |
| 405 | (uri (string-append |
| 406 | "https://salsa.debian.org/kernel-team/linux" |
| 407 | "/raw/34a7d9011fcfcfa38b68282fd2b1a8797e6834f0" |
| 408 | "/debian/patches/bugfix/arm/" |
| 409 | "arm-mm-export-__sync_icache_dcache-for-xen-privcmd.patch")) |
| 410 | (file-name "linux-libre-arm-export-__sync_icache_dcache.patch") |
| 411 | (sha256 |
| 412 | (base32 "1ifnfhpakzffn4b8n7x7w5cps9mzjxlkcfz9zqak2vaw8nzvl39f")))) |
| 413 | |
| 414 | (define (source-with-patches source patches) |
| 415 | (origin |
| 416 | (inherit source) |
| 417 | (patches (append (origin-patches source) |
| 418 | patches)))) |
| 419 | |
| 420 | (define-public linux-libre-5.2-source |
| 421 | (source-with-patches linux-libre-5.2-pristine-source |
| 422 | (list %boot-logo-patch |
| 423 | %linux-libre-arm-export-__sync_icache_dcache-patch))) |
| 424 | |
| 425 | (define-public linux-libre-4.19-source |
| 426 | (source-with-patches linux-libre-4.19-pristine-source |
| 427 | (list %boot-logo-patch |
| 428 | %linux-libre-arm-export-__sync_icache_dcache-patch))) |
| 429 | |
| 430 | (define-public linux-libre-4.14-source |
| 431 | (source-with-patches linux-libre-4.14-pristine-source |
| 432 | (list %boot-logo-patch))) |
| 433 | |
| 434 | (define-public linux-libre-4.9-source |
| 435 | (source-with-patches linux-libre-4.9-pristine-source |
| 436 | (list %boot-logo-patch))) |
| 437 | |
| 438 | (define-public linux-libre-4.4-source |
| 439 | (source-with-patches linux-libre-4.4-pristine-source |
| 440 | (list %boot-logo-patch))) |
| 441 | |
| 442 | \f |
| 443 | ;;; |
| 444 | ;;; Kernel headers. |
| 445 | ;;; |
| 446 | |
| 447 | (define (make-linux-libre-headers version hash-string) |
| 448 | (make-linux-libre-headers* version |
| 449 | (origin |
| 450 | (method url-fetch) |
| 451 | (uri (linux-libre-urls version)) |
| 452 | (sha256 (base32 hash-string))))) |
| 453 | |
| 454 | (define (make-linux-libre-headers* version source) |
| 455 | (package |
| 456 | (name "linux-libre-headers") |
| 457 | (version version) |
| 458 | (source source) |
| 459 | (build-system gnu-build-system) |
| 460 | (native-inputs `(("perl" ,perl) |
| 461 | ,@(if (version>=? version "4.16") |
| 462 | `(("flex" ,flex) |
| 463 | ("bison" ,bison)) |
| 464 | '()))) |
| 465 | (arguments |
| 466 | `(#:modules ((guix build gnu-build-system) |
| 467 | (guix build utils) |
| 468 | (srfi srfi-1)) |
| 469 | #:phases |
| 470 | (modify-phases %standard-phases |
| 471 | (delete 'configure) |
| 472 | (replace 'build |
| 473 | (lambda _ |
| 474 | (let ((arch ,(system->linux-architecture |
| 475 | (or (%current-target-system) |
| 476 | (%current-system)))) |
| 477 | (defconfig ,(system->defconfig |
| 478 | (or (%current-target-system) |
| 479 | (%current-system))))) |
| 480 | (setenv "ARCH" arch) |
| 481 | (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")) |
| 482 | (invoke "make" defconfig) |
| 483 | (invoke "make" "mrproper" "headers_check")))) |
| 484 | (replace 'install |
| 485 | (lambda* (#:key outputs #:allow-other-keys) |
| 486 | (let ((out (assoc-ref outputs "out"))) |
| 487 | (invoke "make" |
| 488 | (string-append "INSTALL_HDR_PATH=" out) |
| 489 | "headers_install") |
| 490 | |
| 491 | (mkdir (string-append out "/include/config")) |
| 492 | (call-with-output-file |
| 493 | (string-append out |
| 494 | "/include/config/kernel.release") |
| 495 | (lambda (p) |
| 496 | (format p "~a-default~%" ,version))) |
| 497 | |
| 498 | ;; Remove the '.install' and '..install.cmd' files; the |
| 499 | ;; latter contains store paths, which pulls in bootstrap |
| 500 | ;; binaries in the build environment, and prevents bit |
| 501 | ;; reproducibility for the bootstrap binaries. |
| 502 | (for-each delete-file (find-files out "\\.install")) |
| 503 | |
| 504 | #t)))) |
| 505 | #:allowed-references () |
| 506 | #:tests? #f)) |
| 507 | (home-page "https://www.gnu.org/software/linux-libre/") |
| 508 | (synopsis "GNU Linux-Libre kernel headers") |
| 509 | (description "Headers of the Linux-Libre kernel.") |
| 510 | (license license:gpl2))) |
| 511 | |
| 512 | (define-public linux-libre-headers-5.2 |
| 513 | (make-linux-libre-headers* linux-libre-5.2-version |
| 514 | linux-libre-5.2-source)) |
| 515 | |
| 516 | (define-public linux-libre-headers-4.19 |
| 517 | (make-linux-libre-headers* linux-libre-4.19-version |
| 518 | linux-libre-4.19-source)) |
| 519 | |
| 520 | (define-public linux-libre-headers-4.14 |
| 521 | (make-linux-libre-headers* linux-libre-4.14-version |
| 522 | linux-libre-4.14-source)) |
| 523 | |
| 524 | (define-public linux-libre-headers-4.9 |
| 525 | (make-linux-libre-headers* linux-libre-4.9-version |
| 526 | linux-libre-4.9-source)) |
| 527 | |
| 528 | (define-public linux-libre-headers-4.4 |
| 529 | (make-linux-libre-headers* linux-libre-4.4-version |
| 530 | linux-libre-4.4-source)) |
| 531 | |
| 532 | ;; The following package is used in the early bootstrap, and thus must be kept |
| 533 | ;; stable and with minimal build requirements. |
| 534 | (define-public linux-libre-headers-4.19.56 |
| 535 | (make-linux-libre-headers "4.19.56" |
| 536 | "1zqiic55viy065lhnkmhn33sz3bbbr2ykbm5f92yzd8lpc9zl7yx")) |
| 537 | |
| 538 | (define-public linux-libre-headers linux-libre-headers-4.19.56) |
| 539 | |
| 540 | \f |
| 541 | ;;; |
| 542 | ;;; Kernel configurations. |
| 543 | ;;; |
| 544 | |
| 545 | (define* (kernel-config arch #:key variant) |
| 546 | "Return the absolute file name of the Linux-Libre build configuration file |
| 547 | for ARCH and optionally VARIANT, or #f if there is no such configuration." |
| 548 | (let* ((name (string-append (if variant (string-append variant "-") "") |
| 549 | (if (string=? "i386" arch) "i686" arch) ".conf")) |
| 550 | (file (string-append "linux-libre/" name))) |
| 551 | (search-auxiliary-file file))) |
| 552 | |
| 553 | ;; FIXME: merge into kernel-config |
| 554 | (define* (kernel-config-veyron arch #:key variant) |
| 555 | "Return the absolute file name of the Linux-Libre build configuration file |
| 556 | for ARCH and optionally VARIANT, or #f if there is no such configuration." |
| 557 | (let* ((name (string-append (if variant (string-append variant "-") "") |
| 558 | (if (string=? "i386" arch) "i686" arch) "-veyron.conf")) |
| 559 | (file (string-append "linux-libre/" name))) |
| 560 | (search-auxiliary-file file))) |
| 561 | |
| 562 | (define %default-extra-linux-options |
| 563 | `(;; Some very mild hardening. |
| 564 | ("CONFIG_SECURITY_DMESG_RESTRICT" . #t) |
| 565 | ;; Modules required for initrd: |
| 566 | ("CONFIG_NET_9P" . m) |
| 567 | ("CONFIG_NET_9P_VIRTIO" . m) |
| 568 | ("CONFIG_VIRTIO_BLK" . m) |
| 569 | ("CONFIG_VIRTIO_NET" . m) |
| 570 | ("CONFIG_VIRTIO_PCI" . m) |
| 571 | ("CONFIG_VIRTIO_BALLOON" . m) |
| 572 | ("CONFIG_VIRTIO_MMIO" . m) |
| 573 | ("CONFIG_FUSE_FS" . m) |
| 574 | ("CONFIG_CIFS" . m) |
| 575 | ("CONFIG_9P_FS" . m))) |
| 576 | |
| 577 | (define (config->string options) |
| 578 | (string-join (map (match-lambda |
| 579 | ((option . 'm) |
| 580 | (string-append option "=m")) |
| 581 | ((option . #t) |
| 582 | (string-append option "=y")) |
| 583 | ((option . #f) |
| 584 | (string-append option "=n"))) |
| 585 | options) |
| 586 | "\n")) |
| 587 | |
| 588 | \f |
| 589 | ;;; |
| 590 | ;;; Kernel package utilities. |
| 591 | ;;; |
| 592 | |
| 593 | (define* (make-linux-libre version hash-string supported-systems |
| 594 | #:key |
| 595 | ;; A function that takes an arch and a variant. |
| 596 | ;; See kernel-config for an example. |
| 597 | (extra-version #f) |
| 598 | (configuration-file #f) |
| 599 | (defconfig "defconfig") |
| 600 | (extra-options %default-extra-linux-options) |
| 601 | (patches (list %boot-logo-patch))) |
| 602 | (make-linux-libre* version |
| 603 | (origin |
| 604 | (method url-fetch) |
| 605 | (uri (linux-libre-urls version)) |
| 606 | (sha256 (base32 hash-string)) |
| 607 | (patches patches)) |
| 608 | supported-systems |
| 609 | #:extra-version extra-version |
| 610 | #:configuration-file configuration-file |
| 611 | #:defconfig defconfig |
| 612 | #:extra-options extra-options)) |
| 613 | |
| 614 | (define* (make-linux-libre* version source supported-systems |
| 615 | #:key |
| 616 | ;; A function that takes an arch and a variant. |
| 617 | ;; See kernel-config for an example. |
| 618 | (extra-version #f) |
| 619 | (configuration-file #f) |
| 620 | (defconfig "defconfig") |
| 621 | (extra-options %default-extra-linux-options)) |
| 622 | (package |
| 623 | (name (if extra-version |
| 624 | (string-append "linux-libre-" extra-version) |
| 625 | "linux-libre")) |
| 626 | (version version) |
| 627 | (source source) |
| 628 | (supported-systems supported-systems) |
| 629 | (build-system gnu-build-system) |
| 630 | (native-inputs |
| 631 | `(("perl" ,perl) |
| 632 | ("bc" ,bc) |
| 633 | ("openssl" ,openssl) |
| 634 | ("kmod" ,kmod) |
| 635 | ("elfutils" ,elfutils) ; Needed to enable CONFIG_STACK_VALIDATION |
| 636 | ("flex" ,flex) |
| 637 | ("bison" ,bison) |
| 638 | |
| 639 | ;; These are needed to compile the GCC plugins. |
| 640 | ("gmp" ,gmp) |
| 641 | ("mpfr" ,mpfr) |
| 642 | ("mpc" ,mpc) |
| 643 | |
| 644 | ,@(match (and configuration-file |
| 645 | (configuration-file |
| 646 | (system->linux-architecture |
| 647 | (or (%current-target-system) (%current-system))) |
| 648 | #:variant (version-major+minor version))) |
| 649 | (#f ;no config for this platform |
| 650 | '()) |
| 651 | ((? string? config) |
| 652 | `(("kconfig" ,config)))))) |
| 653 | (arguments |
| 654 | `(#:modules ((guix build gnu-build-system) |
| 655 | (guix build utils) |
| 656 | (srfi srfi-1) |
| 657 | (ice-9 match)) |
| 658 | #:phases |
| 659 | (modify-phases %standard-phases |
| 660 | (add-after 'unpack 'patch-/bin/pwd |
| 661 | (lambda _ |
| 662 | (substitute* (find-files "." "^Makefile(\\.include)?$") |
| 663 | (("/bin/pwd") "pwd")) |
| 664 | #t)) |
| 665 | (replace 'configure |
| 666 | (lambda* (#:key inputs native-inputs target #:allow-other-keys) |
| 667 | ;; Unset CROSS_CPATH to make sure that cross-libc is not |
| 668 | ;; found. Otherwise, some of its header would conflict with the |
| 669 | ;; one from linux (stdint.h and linux/types.h) |
| 670 | ,@(if (%current-target-system) |
| 671 | '((unsetenv "CROSS_CPATH")) |
| 672 | '()) |
| 673 | ;; Avoid introducing timestamps |
| 674 | (setenv "KCONFIG_NOTIMESTAMP" "1") |
| 675 | (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH")) |
| 676 | |
| 677 | ;; Set ARCH and CROSS_COMPILE |
| 678 | (let ((arch ,(system->linux-architecture |
| 679 | (or (%current-target-system) |
| 680 | (%current-system))))) |
| 681 | (setenv "ARCH" arch) |
| 682 | (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")) |
| 683 | |
| 684 | (when target |
| 685 | (setenv "CROSS_COMPILE" (string-append target "-")) |
| 686 | (format #t "`CROSS_COMPILE' set to `~a'~%" |
| 687 | (getenv "CROSS_COMPILE")))) |
| 688 | |
| 689 | (setenv "EXTRA_VERSION" ,extra-version) |
| 690 | |
| 691 | (let ((build (assoc-ref %standard-phases 'build)) |
| 692 | (config (assoc-ref (or native-inputs inputs) "kconfig"))) |
| 693 | |
| 694 | ;; Use a custom kernel configuration file or a default |
| 695 | ;; configuration file. |
| 696 | (if config |
| 697 | (begin |
| 698 | (copy-file config ".config") |
| 699 | (chmod ".config" #o666)) |
| 700 | (invoke "make" ,defconfig)) |
| 701 | |
| 702 | ;; Appending works even when the option wasn't in the |
| 703 | ;; file. The last one prevails if duplicated. |
| 704 | (let ((port (open-file ".config" "a")) |
| 705 | (extra-configuration ,(config->string extra-options))) |
| 706 | (display extra-configuration port) |
| 707 | (close-port port)) |
| 708 | |
| 709 | (invoke "make" "oldconfig")))) |
| 710 | (replace 'install |
| 711 | (lambda* (#:key inputs native-inputs outputs #:allow-other-keys) |
| 712 | (let* ((out (assoc-ref outputs "out")) |
| 713 | (moddir (string-append out "/lib/modules")) |
| 714 | (dtbdir (string-append out "/lib/dtbs")) |
| 715 | (kmod (assoc-ref (or native-inputs inputs) "kmod"))) |
| 716 | ;; Install kernel image, kernel configuration and link map. |
| 717 | (for-each (lambda (file) (install-file file out)) |
| 718 | (find-files "." "^(\\.config|bzImage|zImage|Image|vmlinuz|System\\.map|Module\\.symvers)$")) |
| 719 | ;; Install device tree files |
| 720 | (unless (null? (find-files "." "\\.dtb$")) |
| 721 | (mkdir-p dtbdir) |
| 722 | (invoke "make" (string-append "INSTALL_DTBS_PATH=" dtbdir) |
| 723 | "dtbs_install")) |
| 724 | ;; Install kernel modules |
| 725 | (mkdir-p moddir) |
| 726 | (invoke "make" |
| 727 | (string-append "DEPMOD=" kmod "/bin/depmod") |
| 728 | (string-append "MODULE_DIR=" moddir) |
| 729 | (string-append "INSTALL_PATH=" out) |
| 730 | (string-append "INSTALL_MOD_PATH=" out) |
| 731 | "INSTALL_MOD_STRIP=1" |
| 732 | "modules_install"))))) |
| 733 | #:tests? #f)) |
| 734 | (home-page "https://www.gnu.org/software/linux-libre/") |
| 735 | (synopsis "100% free redistribution of a cleaned Linux kernel") |
| 736 | (description |
| 737 | "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel. |
| 738 | It has been modified to remove all non-free binary blobs.") |
| 739 | (license license:gpl2))) |
| 740 | |
| 741 | \f |
| 742 | ;;; |
| 743 | ;;; Generic kernel packages. |
| 744 | ;;; |
| 745 | |
| 746 | (define-public linux-libre-5.2 |
| 747 | (make-linux-libre* linux-libre-5.2-version |
| 748 | linux-libre-5.2-source |
| 749 | '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux") |
| 750 | #:configuration-file kernel-config)) |
| 751 | |
| 752 | (define-public linux-libre-version linux-libre-5.2-version) |
| 753 | (define-public linux-libre-pristine-source linux-libre-5.2-pristine-source) |
| 754 | (define-public linux-libre-source linux-libre-5.2-source) |
| 755 | (define-public linux-libre linux-libre-5.2) |
| 756 | |
| 757 | (define-public linux-libre-4.19 |
| 758 | (make-linux-libre* linux-libre-4.19-version |
| 759 | linux-libre-4.19-source |
| 760 | '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux") |
| 761 | #:configuration-file kernel-config)) |
| 762 | |
| 763 | (define-public linux-libre-4.14 |
| 764 | (make-linux-libre* linux-libre-4.14-version |
| 765 | linux-libre-4.14-source |
| 766 | '("x86_64-linux" "i686-linux" "armhf-linux") |
| 767 | #:configuration-file kernel-config)) |
| 768 | |
| 769 | (define-public linux-libre-4.9 |
| 770 | (make-linux-libre* linux-libre-4.9-version |
| 771 | linux-libre-4.9-source |
| 772 | '("x86_64-linux" "i686-linux") |
| 773 | #:configuration-file kernel-config)) |
| 774 | |
| 775 | (define-public linux-libre-4.4 |
| 776 | (make-linux-libre* linux-libre-4.4-version |
| 777 | linux-libre-4.4-source |
| 778 | '("x86_64-linux" "i686-linux") |
| 779 | #:configuration-file kernel-config |
| 780 | #:extra-options |
| 781 | (append |
| 782 | `(;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html |
| 783 | ;; This option was removed upstream in version 4.7. |
| 784 | ("CONFIG_DEVPTS_MULTIPLE_INSTANCES" . #t)) |
| 785 | %default-extra-linux-options))) |
| 786 | |
| 787 | \f |
| 788 | ;;; |
| 789 | ;;; Specialized kernel variants. |
| 790 | ;;; |
| 791 | |
| 792 | (define-public linux-libre-arm-veyron |
| 793 | (make-linux-libre* linux-libre-version |
| 794 | linux-libre-source |
| 795 | '("armhf-linux") |
| 796 | #:configuration-file kernel-config-veyron |
| 797 | #:extra-version "arm-veyron")) |
| 798 | |
| 799 | (define-public linux-libre-arm-generic |
| 800 | (make-linux-libre* linux-libre-version |
| 801 | linux-libre-source |
| 802 | '("armhf-linux") |
| 803 | #:defconfig "multi_v7_defconfig" |
| 804 | #:extra-version "arm-generic")) |
| 805 | |
| 806 | (define-public linux-libre-arm-generic-4.19 |
| 807 | (make-linux-libre* linux-libre-4.19-version |
| 808 | linux-libre-4.19-source |
| 809 | '("armhf-linux") |
| 810 | #:defconfig "multi_v7_defconfig" |
| 811 | #:extra-version "arm-generic")) |
| 812 | |
| 813 | (define-public linux-libre-arm-generic-4.14 |
| 814 | (make-linux-libre* linux-libre-4.14-version |
| 815 | linux-libre-4.14-source |
| 816 | '("armhf-linux") |
| 817 | #:defconfig "multi_v7_defconfig" |
| 818 | #:extra-version "arm-generic")) |
| 819 | |
| 820 | (define-public linux-libre-arm-omap2plus |
| 821 | (make-linux-libre* linux-libre-version |
| 822 | linux-libre-source |
| 823 | '("armhf-linux") |
| 824 | #:defconfig "omap2plus_defconfig" |
| 825 | #:extra-version "arm-omap2plus")) |
| 826 | |
| 827 | (define-public linux-libre-arm-omap2plus-4.19 |
| 828 | (make-linux-libre* linux-libre-4.19-version |
| 829 | linux-libre-4.19-source |
| 830 | '("armhf-linux") |
| 831 | #:defconfig "omap2plus_defconfig" |
| 832 | #:extra-version "arm-omap2plus")) |
| 833 | |
| 834 | (define-public linux-libre-arm-omap2plus-4.14 |
| 835 | (make-linux-libre* linux-libre-4.14-version |
| 836 | linux-libre-4.14-source |
| 837 | '("armhf-linux") |
| 838 | #:defconfig "omap2plus_defconfig" |
| 839 | #:extra-version "arm-omap2plus")) |
| 840 | |
| 841 | \f |
| 842 | ;;; |
| 843 | ;;; Linux kernel modules. |
| 844 | ;;; |
| 845 | |
| 846 | (define-public acpi-call-linux-module |
| 847 | (package |
| 848 | (name "acpi-call-linux-module") |
| 849 | (version "3.17") |
| 850 | (source |
| 851 | (origin |
| 852 | (method git-fetch) |
| 853 | (uri (git-reference |
| 854 | (url "https://github.com/teleshoes/acpi_call.git") |
| 855 | (commit version))) |
| 856 | (file-name (git-file-name name version)) |
| 857 | (sha256 |
| 858 | (base32 "04mbv4lasm3vv1j4ndxhnz4hvp5wg8f5fc9q6qxv0nhvwjynmsl3")))) |
| 859 | (build-system linux-module-build-system) |
| 860 | (arguments |
| 861 | `(#:tests? #f ; no tests |
| 862 | #:phases |
| 863 | (modify-phases %standard-phases |
| 864 | (add-after 'unpack 'fix-for-linux-4.12 |
| 865 | (lambda _ |
| 866 | (substitute* "acpi_call.c" |
| 867 | (("asm/uaccess\\.h") |
| 868 | "linux/uaccess.h")) |
| 869 | #t)) |
| 870 | (add-after 'install 'install-documentation |
| 871 | (lambda* (#:key outputs #:allow-other-keys) |
| 872 | (let* ((out (assoc-ref outputs "out")) |
| 873 | (doc (string-append out "/share/doc/" ,name "-" ,version))) |
| 874 | (for-each (lambda (file) |
| 875 | (let ((target (string-append doc "/" file))) |
| 876 | (mkdir-p (dirname target)) |
| 877 | (copy-recursively file target))) |
| 878 | (list "README.md" "examples")) |
| 879 | #t)))))) |
| 880 | (home-page "https://github.com/teleshoes/acpi_call") |
| 881 | (synopsis "Linux kernel module to perform ACPI method calls") |
| 882 | (description |
| 883 | "This simple Linux kernel module allows calls from user space to any |
| 884 | @acronym{ACPI, Advanced Configuration and Power Interface} method provided by |
| 885 | your computer's firmware, by writing to @file{/proc/acpi/call}. You can pass |
| 886 | any number of parameters of types @code{ACPI_INTEGER}, @code{ACPI_STRING}, |
| 887 | and @code{ACPI_BUFFER}. |
| 888 | |
| 889 | It grants direct and undocumented access to your hardware that may cause damage |
| 890 | and should be used with caution, especially on untested models.") |
| 891 | (license license:gpl3+))) ; see README.md (no licence headers) |
| 892 | |
| 893 | (define-public vhba-module |
| 894 | (package |
| 895 | (name "vhba-module") |
| 896 | (version "20190831") |
| 897 | (source (origin |
| 898 | (method url-fetch) |
| 899 | (uri (string-append |
| 900 | "http://downloads.sourceforge.net/cdemu/vhba-module/vhba-module-" |
| 901 | version ".tar.bz2")) |
| 902 | (sha256 |
| 903 | (base32 |
| 904 | "1ybbk6l06n0y11n5wnfmvdz0baizmq55l458ywimghdyz0n7g0ws")))) |
| 905 | (build-system linux-module-build-system) |
| 906 | (arguments |
| 907 | ;; TODO: No tests? |
| 908 | `(#:tests? #f)) |
| 909 | (home-page "https://cdemu.sourceforge.io/") |
| 910 | (synopsis "Kernel module that emulates SCSI devices") |
| 911 | (description "VHBA module provides a Virtual (SCSI) HBA, which is the link |
| 912 | between the CDemu userspace daemon and linux kernel.") |
| 913 | (license license:gpl2+))) |
| 914 | |
| 915 | \f |
| 916 | ;;; |
| 917 | ;;; Pluggable authentication modules (PAM). |
| 918 | ;;; |
| 919 | |
| 920 | (define-public linux-pam |
| 921 | (package |
| 922 | (name "linux-pam") |
| 923 | (version "1.3.1") |
| 924 | (source |
| 925 | (origin |
| 926 | (method url-fetch) |
| 927 | (uri (string-append |
| 928 | "https://github.com/linux-pam/linux-pam/releases/download/v" |
| 929 | version "/Linux-PAM-" version ".tar.xz")) |
| 930 | (sha256 |
| 931 | (base32 |
| 932 | "1nyh9kdi3knhxcbv5v4snya0g3gff0m671lnvqcbygw3rm77mx7g")) |
| 933 | (patches (search-patches "linux-pam-no-setfsuid.patch")))) |
| 934 | |
| 935 | (build-system gnu-build-system) |
| 936 | (native-inputs |
| 937 | `(("flex" ,flex) |
| 938 | |
| 939 | ;; TODO: optional dependencies |
| 940 | ;; ("libxcrypt" ,libxcrypt) |
| 941 | ;; ("cracklib" ,cracklib) |
| 942 | )) |
| 943 | (arguments |
| 944 | `(;; Most users, such as `shadow', expect the headers to be under |
| 945 | ;; `security'. |
| 946 | #:configure-flags (list (string-append "--includedir=" |
| 947 | (assoc-ref %outputs "out") |
| 948 | "/include/security") |
| 949 | |
| 950 | ;; XXX: <rpc/rpc.h> is missing from glibc when |
| 951 | ;; cross-compiling, so we have to disable NIS |
| 952 | ;; support altogether. |
| 953 | ,@(if (%current-target-system) |
| 954 | '("--disable-nis") |
| 955 | '())) |
| 956 | |
| 957 | ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d |
| 958 | ;; isn't available. |
| 959 | #:tests? #f)) |
| 960 | (home-page "http://www.linux-pam.org/") |
| 961 | (synopsis "Pluggable authentication modules for Linux") |
| 962 | (description |
| 963 | "A *Free* project to implement OSF's RFC 86.0. |
| 964 | Pluggable authentication modules are small shared object files that can |
| 965 | be used through the PAM API to perform tasks, like authenticating a user |
| 966 | at login. Local and dynamic reconfiguration are its key features.") |
| 967 | (license license:bsd-3))) |
| 968 | |
| 969 | (define-public linux-pam-1.2 |
| 970 | (package |
| 971 | (inherit linux-pam) |
| 972 | (version "1.2.1") |
| 973 | (source |
| 974 | (origin |
| 975 | (method url-fetch) |
| 976 | (uri (string-append |
| 977 | "http://www.linux-pam.org/library/" |
| 978 | "Linux-PAM-" version ".tar.bz2")) |
| 979 | (sha256 |
| 980 | (base32 |
| 981 | "1n9lnf9gjs72kbj1g354v1xhi2j27aqaah15vykh7cnkq08i4arl")) |
| 982 | (patches (search-patches "linux-pam-no-setfsuid.patch")))))) |
| 983 | |
| 984 | |
| 985 | ;;; |
| 986 | ;;; Miscellaneous. |
| 987 | ;;; |
| 988 | |
| 989 | (define-public psmisc |
| 990 | (package |
| 991 | (name "psmisc") |
| 992 | (version "23.2") |
| 993 | (source |
| 994 | (origin |
| 995 | (method url-fetch) |
| 996 | (uri (string-append "mirror://sourceforge/psmisc/psmisc devel/psmisc-" |
| 997 | version ".tar.xz")) |
| 998 | (sha256 |
| 999 | (base32 |
| 1000 | "0s1kjhrik0wzqbm7hv4gkhywhjrwhp9ajw0ad05fwharikk6ah49")))) |
| 1001 | (build-system gnu-build-system) |
| 1002 | (inputs `(("ncurses" ,ncurses))) |
| 1003 | (home-page "https://gitlab.com/psmisc/psmisc") |
| 1004 | (synopsis |
| 1005 | "Small utilities that use the proc file system") |
| 1006 | (description |
| 1007 | "This PSmisc package is a set of some small useful utilities that |
| 1008 | use the proc file system. We're not about changing the world, but |
| 1009 | providing the system administrator with some help in common tasks.") |
| 1010 | (license license:gpl2+))) |
| 1011 | |
| 1012 | (define-public util-linux |
| 1013 | (package |
| 1014 | (name "util-linux") |
| 1015 | (version "2.34") |
| 1016 | (source (origin |
| 1017 | (method url-fetch) |
| 1018 | (uri (string-append "mirror://kernel.org/linux/utils/" |
| 1019 | name "/v" (version-major+minor version) "/" |
| 1020 | name "-" version ".tar.xz")) |
| 1021 | (sha256 |
| 1022 | (base32 |
| 1023 | "1db2kydkwjmvgd1glkcba3adhidxw0f1x735dcjdpdjjf869sgvl")) |
| 1024 | (patches (search-patches "util-linux-tests.patch")) |
| 1025 | (modules '((guix build utils))) |
| 1026 | (snippet |
| 1027 | ;; We take 'nologin' from Shadow, the 'logger' program from |
| 1028 | ;; GNU Inetutils and 'kill' from GNU Coreutils. |
| 1029 | '(begin |
| 1030 | (substitute* "configure" |
| 1031 | (("build_nologin=yes") "build_nologin=no") |
| 1032 | (("build_logger=yes") "build_logger=no") |
| 1033 | (("build_kill=yes") "build_kill=no")) |
| 1034 | #t)))) |
| 1035 | (build-system gnu-build-system) |
| 1036 | (outputs '("out" |
| 1037 | "static")) ; >2 MiB of static .a libraries |
| 1038 | (arguments |
| 1039 | `(#:configure-flags (list "--disable-use-tty-group" |
| 1040 | "--enable-fs-paths-default=/run/current-system/profile/sbin" |
| 1041 | ;; Don't try to chown root:root mount and umount |
| 1042 | "--disable-makeinstall-chown" |
| 1043 | ;; Install completions where our |
| 1044 | ;; bash-completion package expects them. |
| 1045 | (string-append "--with-bashcompletiondir=" |
| 1046 | (assoc-ref %outputs "out") |
| 1047 | "/etc/bash_completion.d")) |
| 1048 | #:phases (modify-phases %standard-phases |
| 1049 | (add-before |
| 1050 | 'build 'set-umount-file-name |
| 1051 | (lambda* (#:key outputs #:allow-other-keys) |
| 1052 | ;; Tell 'eject' the right file name of 'umount'. |
| 1053 | (let ((out (assoc-ref outputs "out"))) |
| 1054 | (substitute* "sys-utils/eject.c" |
| 1055 | (("\"/bin/umount\"") |
| 1056 | (string-append "\"" out "/bin/umount\""))) |
| 1057 | #t))) |
| 1058 | (add-before |
| 1059 | 'check 'pre-check |
| 1060 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 1061 | (let ((out (assoc-ref outputs "out")) |
| 1062 | (net (assoc-ref inputs "net-base"))) |
| 1063 | ;; Change the test to refer to the right file. |
| 1064 | (substitute* "tests/ts/misc/mcookie" |
| 1065 | (("/etc/services") |
| 1066 | (string-append net "/etc/services"))) |
| 1067 | #t))) |
| 1068 | (add-after |
| 1069 | 'install 'move-static-libraries |
| 1070 | (lambda* (#:key outputs #:allow-other-keys) |
| 1071 | (let ((out (assoc-ref outputs "out")) |
| 1072 | (static (assoc-ref outputs "static"))) |
| 1073 | (mkdir-p (string-append static "/lib")) |
| 1074 | (with-directory-excursion out |
| 1075 | (for-each (lambda (file) |
| 1076 | (rename-file file |
| 1077 | (string-append static "/" |
| 1078 | file))) |
| 1079 | (find-files "lib" "\\.a$")) |
| 1080 | |
| 1081 | ;; Remove references to the static library from the '.la' |
| 1082 | ;; files so that Libtool does the right thing when both |
| 1083 | ;; the shared and static library is available. |
| 1084 | (substitute* (find-files "lib" "\\.la$") |
| 1085 | (("old_library=.*") "old_library=''\n"))) |
| 1086 | |
| 1087 | #t)))))) |
| 1088 | (inputs `(("zlib" ,zlib) |
| 1089 | ("ncurses" ,ncurses) |
| 1090 | |
| 1091 | ;; XXX: This is so that the 'pre-check' phase can find it. |
| 1092 | ,@(if (%current-target-system) |
| 1093 | `(("net-base" ,net-base)) |
| 1094 | '()))) |
| 1095 | (native-inputs |
| 1096 | `(("perl" ,perl) |
| 1097 | ("net-base" ,net-base))) ;for tests |
| 1098 | (home-page "https://www.kernel.org/pub/linux/utils/util-linux/") |
| 1099 | (synopsis "Collection of utilities for the Linux kernel") |
| 1100 | (description "Util-linux is a diverse collection of Linux kernel |
| 1101 | utilities. It provides dmesg and includes tools for working with file systems, |
| 1102 | block devices, UUIDs, TTYs, and many other tools.") |
| 1103 | |
| 1104 | ;; Note that util-linux doesn't use the same license for all the |
| 1105 | ;; code. GPLv2+ is the default license for a code without an |
| 1106 | ;; explicitly defined license. |
| 1107 | (license (list license:gpl3+ license:gpl2+ license:gpl2 license:lgpl2.0+ |
| 1108 | license:bsd-4 license:public-domain)))) |
| 1109 | |
| 1110 | (define-public ddate |
| 1111 | (package |
| 1112 | (name "ddate") |
| 1113 | (version "0.2.2") |
| 1114 | (source (origin |
| 1115 | (method url-fetch) |
| 1116 | (uri (string-append "https://github.com/bo0ts/ddate/archive/v" |
| 1117 | version ".tar.gz")) |
| 1118 | (file-name (string-append name "-" version ".tar.gz")) |
| 1119 | (sha256 |
| 1120 | (base32 "1bbqqq8mswj4bp9083gxjaky5ysfznax4cynsqwmy125z053yg6m")))) |
| 1121 | (build-system cmake-build-system) |
| 1122 | (arguments '(#:tests? #f)) |
| 1123 | (home-page "https://github.com/bo0ts/ddate") |
| 1124 | (synopsis "PERPETUAL DATE CONVERTER FROM GREGORIAN TO POEE CALENDAR") |
| 1125 | (description |
| 1126 | "ddate displays the Discordian date and holidays of a given date. |
| 1127 | The Discordian calendar was made popular by the \"Illuminatus!\" trilogy |
| 1128 | by Robert Shea and Robert Anton Wilson.") |
| 1129 | (license license:public-domain))) |
| 1130 | |
| 1131 | (define-public procps |
| 1132 | (package |
| 1133 | (name "procps") |
| 1134 | (version "3.3.15") |
| 1135 | (source (origin |
| 1136 | (method url-fetch) |
| 1137 | (uri (string-append "mirror://sourceforge/procps-ng/Production/" |
| 1138 | "procps-ng-" version ".tar.xz")) |
| 1139 | (sha256 |
| 1140 | (base32 |
| 1141 | "0r84kwa5fl0sjdashcn4vh7hgfm7ahdcysig3mcjvpmkzi7p9g8h")))) |
| 1142 | (build-system gnu-build-system) |
| 1143 | (arguments |
| 1144 | '(#:modules ((guix build utils) |
| 1145 | (guix build gnu-build-system) |
| 1146 | (srfi srfi-1) |
| 1147 | (srfi srfi-26)) |
| 1148 | #:phases |
| 1149 | (modify-phases %standard-phases |
| 1150 | (add-after |
| 1151 | 'install 'post-install |
| 1152 | ;; Remove commands and man pages redudant with |
| 1153 | ;; Coreutils. |
| 1154 | (lambda* (#:key outputs #:allow-other-keys) |
| 1155 | (let* ((out (assoc-ref outputs "out")) |
| 1156 | (dup (append-map (cut find-files out <>) |
| 1157 | '("^kill" "^uptime")))) |
| 1158 | (for-each delete-file dup) |
| 1159 | #t)))))) |
| 1160 | (inputs `(("ncurses" ,ncurses))) |
| 1161 | (home-page "https://gitlab.com/procps-ng/procps/") |
| 1162 | (synopsis "Utilities that give information about processes") |
| 1163 | (description |
| 1164 | "Procps is the package that has a bunch of small useful utilities |
| 1165 | that give information about processes using the Linux /proc file system. |
| 1166 | The package includes the programs ps, top, vmstat, w, kill, free, |
| 1167 | slabtop, and skill.") |
| 1168 | (license license:gpl2))) |
| 1169 | |
| 1170 | (define-public usbutils |
| 1171 | (package |
| 1172 | (name "usbutils") |
| 1173 | (version "012") |
| 1174 | (source |
| 1175 | (origin |
| 1176 | (method url-fetch) |
| 1177 | (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/" |
| 1178 | "usbutils-" version ".tar.xz")) |
| 1179 | (sha256 |
| 1180 | (base32 "0iiy0q7fzikavmdsjsb0sl9kp3gfh701qwyjjccvqh0qz4jlcqw8")))) |
| 1181 | (build-system gnu-build-system) |
| 1182 | (outputs (list "out" "python")) |
| 1183 | (arguments |
| 1184 | `(#:phases |
| 1185 | (modify-phases %standard-phases |
| 1186 | (add-before 'bootstrap 'patch-bootstrap-scripts |
| 1187 | (lambda _ |
| 1188 | (substitute* "usbhid-dump/bootstrap" |
| 1189 | (("/bin/bash") (which "bash"))) |
| 1190 | |
| 1191 | ;; Don't let autogen.sh run configure with bogus options & CFLAGS. |
| 1192 | (substitute* "autogen.sh" |
| 1193 | (("^\\./configure.*") "")) |
| 1194 | #t)) |
| 1195 | (add-after 'install 'separate-python-output |
| 1196 | ;; Separating one Python script shaves more than 106 MiB from :out. |
| 1197 | (lambda* (#:key outputs #:allow-other-keys) |
| 1198 | (let ((out (assoc-ref outputs "out")) |
| 1199 | (out:python (assoc-ref outputs "python"))) |
| 1200 | (for-each (lambda (file) |
| 1201 | (let ((old (string-append out "/" file)) |
| 1202 | (new (string-append out:python "/" file))) |
| 1203 | (mkdir-p (dirname new)) |
| 1204 | (rename-file old new))) |
| 1205 | (list "bin/lsusb.py")) |
| 1206 | #t)))))) |
| 1207 | (inputs |
| 1208 | `(("eudev" ,eudev) |
| 1209 | ("libusb" ,libusb) |
| 1210 | ("python" ,python))) |
| 1211 | (native-inputs |
| 1212 | `(("autoconf" ,autoconf) |
| 1213 | ("automake" ,automake) |
| 1214 | ("libtool" ,libtool) |
| 1215 | ("pkg-config" ,pkg-config))) |
| 1216 | (home-page "http://www.linux-usb.org/") |
| 1217 | (synopsis |
| 1218 | "Tools for working with USB devices, such as lsusb") |
| 1219 | (description |
| 1220 | "Tools for working with USB devices, such as lsusb.") |
| 1221 | (license license:gpl2+))) |
| 1222 | |
| 1223 | (define-public e2fsprogs |
| 1224 | (package |
| 1225 | (name "e2fsprogs") |
| 1226 | (version "1.45.2") |
| 1227 | (source (origin |
| 1228 | (method url-fetch) |
| 1229 | (uri (string-append |
| 1230 | "mirror://kernel.org/linux/kernel/people/tytso/" |
| 1231 | name "/v" version "/" |
| 1232 | name "-" version ".tar.xz")) |
| 1233 | (sha256 |
| 1234 | (base32 |
| 1235 | "02g0cm72sgz709s9pkg4mvj56m7bgs7rwnyc2cp7cvg3j6pcjlj9")))) |
| 1236 | (build-system gnu-build-system) |
| 1237 | (inputs `(("util-linux" ,util-linux))) |
| 1238 | (native-inputs `(("pkg-config" ,pkg-config) |
| 1239 | ("texinfo" ,texinfo) ;for the libext2fs Info manual |
| 1240 | |
| 1241 | ;; For tests. |
| 1242 | ("perl" ,perl) |
| 1243 | ("procps" ,procps))) |
| 1244 | (arguments |
| 1245 | '(;; util-linux is the preferred source for some of the libraries and |
| 1246 | ;; commands, so disable them (see, e.g., |
| 1247 | ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b33633>.) |
| 1248 | #:configure-flags (list "--disable-libblkid" |
| 1249 | "--disable-libuuid" "--disable-uuidd" |
| 1250 | "--disable-fsck" |
| 1251 | |
| 1252 | ;; Use symlinks instead of hard links for |
| 1253 | ;; 'fsck.extN' etc. This makes the resulting nar |
| 1254 | ;; smaller and is preserved across copies. |
| 1255 | "--enable-symlink-install" |
| 1256 | |
| 1257 | (string-append "LDFLAGS=-Wl,-rpath=" |
| 1258 | (assoc-ref %outputs "out") |
| 1259 | "/lib") |
| 1260 | |
| 1261 | ;; Install libext2fs et al. |
| 1262 | "--enable-elf-shlibs") |
| 1263 | |
| 1264 | #:phases |
| 1265 | (modify-phases %standard-phases |
| 1266 | (add-before 'configure 'patch-shells |
| 1267 | (lambda _ |
| 1268 | (substitute* "configure" |
| 1269 | (("/bin/sh (.*)parse-types.sh" _ dir) |
| 1270 | (string-append (which "sh") " " dir |
| 1271 | "parse-types.sh"))) |
| 1272 | (substitute* "MCONFIG.in" |
| 1273 | (("INSTALL_SYMLINK = /bin/sh") |
| 1274 | "INSTALL_SYMLINK = sh")) |
| 1275 | (substitute* (find-files "." "^Makefile.in$") |
| 1276 | (("#!/bin/sh") |
| 1277 | (string-append "#!" (which "sh")))) |
| 1278 | #t)) |
| 1279 | (add-after 'install 'install-libs |
| 1280 | (lambda* (#:key outputs #:allow-other-keys) |
| 1281 | (let* ((out (assoc-ref outputs "out")) |
| 1282 | (lib (string-append out "/lib"))) |
| 1283 | (invoke "make" "install-libs") |
| 1284 | |
| 1285 | ;; Make the .a writable so that 'strip' works. |
| 1286 | ;; Failing to do that, due to debug symbols, we |
| 1287 | ;; retain a reference to the final |
| 1288 | ;; linux-libre-headers, which refer to the |
| 1289 | ;; bootstrap binaries. |
| 1290 | (let ((archives (find-files lib "\\.a$"))) |
| 1291 | (for-each (lambda (file) |
| 1292 | (chmod file #o666)) |
| 1293 | archives)) |
| 1294 | #t)))))) |
| 1295 | (home-page "http://e2fsprogs.sourceforge.net/") |
| 1296 | (synopsis "Creating and checking ext2/ext3/ext4 file systems") |
| 1297 | (description |
| 1298 | "This package provides tools for manipulating ext2/ext3/ext4 file systems.") |
| 1299 | (license (list license:gpl2 ;programs |
| 1300 | license:lgpl2.0 ;libext2fs |
| 1301 | license:x11)))) ;libuuid |
| 1302 | |
| 1303 | (define e2fsprogs/static |
| 1304 | (static-package |
| 1305 | (package (inherit e2fsprogs) |
| 1306 | (arguments |
| 1307 | ;; Do not build shared libraries. |
| 1308 | (substitute-keyword-arguments (package-arguments e2fsprogs) |
| 1309 | ((#:configure-flags _) |
| 1310 | '(list "--disable-blkid")) |
| 1311 | ((#:make-flags _) |
| 1312 | '(list))))))) |
| 1313 | |
| 1314 | (define-public e2fsck/static |
| 1315 | (package |
| 1316 | (name "e2fsck-static") |
| 1317 | (version (package-version e2fsprogs)) |
| 1318 | (build-system trivial-build-system) |
| 1319 | (source #f) |
| 1320 | (inputs |
| 1321 | `(("e2fsprogs" ,e2fsprogs/static))) |
| 1322 | (arguments |
| 1323 | `(#:modules ((guix build utils)) |
| 1324 | #:builder |
| 1325 | (begin |
| 1326 | (use-modules (guix build utils) |
| 1327 | (ice-9 ftw) |
| 1328 | (srfi srfi-26)) |
| 1329 | |
| 1330 | (let ((e2fsck (string-append (assoc-ref %build-inputs "e2fsprogs") |
| 1331 | "/sbin/e2fsck")) |
| 1332 | (bin (string-append (assoc-ref %outputs "out") "/sbin"))) |
| 1333 | (mkdir-p bin) |
| 1334 | (with-directory-excursion bin |
| 1335 | (copy-file e2fsck "e2fsck") |
| 1336 | (remove-store-references "e2fsck") |
| 1337 | (chmod "e2fsck" #o555)) |
| 1338 | #t)))) |
| 1339 | (home-page (package-home-page e2fsprogs)) |
| 1340 | (synopsis "Statically-linked e2fsck command from e2fsprogs") |
| 1341 | (description "This package provides statically-linked e2fsck command taken |
| 1342 | from the e2fsprogs package. It is meant to be used in initrds.") |
| 1343 | (license (package-license e2fsprogs)))) |
| 1344 | |
| 1345 | (define-public extundelete |
| 1346 | (package |
| 1347 | (name "extundelete") |
| 1348 | (version "0.2.4") |
| 1349 | (source |
| 1350 | (origin |
| 1351 | (method url-fetch) |
| 1352 | (uri (string-append "mirror://sourceforge/extundelete/" |
| 1353 | "extundelete/" version "/extundelete-" |
| 1354 | version ".tar.bz2")) |
| 1355 | (sha256 |
| 1356 | (base32 |
| 1357 | "1x0r7ylxlp9lbj3d7sqf6j2a222dwy2nfpff05jd6mkh4ihxvyd1")) |
| 1358 | (patches (search-patches "extundelete-e2fsprogs-1.44.patch")))) |
| 1359 | (build-system gnu-build-system) |
| 1360 | (inputs `(("e2fsprogs" ,e2fsprogs))) |
| 1361 | (home-page "http://extundelete.sourceforge.net/") |
| 1362 | (synopsis "Recover deleted files from ext2/3/4 partitions") |
| 1363 | (description |
| 1364 | "Extundelete is a set of tools that can recover deleted files from an |
| 1365 | ext3 or ext4 partition.") |
| 1366 | (license license:gpl2))) |
| 1367 | |
| 1368 | (define-public zerofree |
| 1369 | (package |
| 1370 | (name "zerofree") |
| 1371 | (version "1.1.1") |
| 1372 | (home-page "https://frippery.org/uml/") |
| 1373 | (source (origin |
| 1374 | (method url-fetch) |
| 1375 | (uri (string-append home-page name "-" version |
| 1376 | ".tgz")) |
| 1377 | (sha256 |
| 1378 | (base32 |
| 1379 | "0rrqfa5z103ws89vi8kfvbks1cfs74ix6n1wb6vs582vnmhwhswm")))) |
| 1380 | (build-system gnu-build-system) |
| 1381 | (arguments |
| 1382 | '(#:phases |
| 1383 | (modify-phases %standard-phases |
| 1384 | (delete 'configure) ; no configure script |
| 1385 | (replace 'install |
| 1386 | ;; The Makefile lacks an ‘install’ target. |
| 1387 | (lambda* (#:key outputs #:allow-other-keys) |
| 1388 | (let* ((out (assoc-ref outputs "out")) |
| 1389 | (bin (string-append out "/bin"))) |
| 1390 | (chmod "zerofree" #o555) |
| 1391 | (install-file "zerofree" bin) |
| 1392 | #t)))) |
| 1393 | #:tests? #f)) ; no tests |
| 1394 | (inputs `(("libext2fs" ,e2fsprogs))) |
| 1395 | (synopsis "Zero non-allocated regions in ext2/ext3/ext4 file systems") |
| 1396 | (description |
| 1397 | "Zerofree finds the unallocated blocks with non-zero value content in an |
| 1398 | ext2, ext3, or ext4 file system and fills them with zeroes (or another value). |
| 1399 | This is a simple way to make disk images more compressible. |
| 1400 | Zerofree requires the file system to be unmounted or mounted read-only.") |
| 1401 | (license license:gpl2))) |
| 1402 | |
| 1403 | (define-public strace |
| 1404 | (package |
| 1405 | (name "strace") |
| 1406 | (version "5.2") |
| 1407 | (home-page "https://strace.io") |
| 1408 | (source (origin |
| 1409 | (method url-fetch) |
| 1410 | (uri (string-append home-page "/files/" version |
| 1411 | "/strace-" version ".tar.xz")) |
| 1412 | ;; XXX Remove the 'regenerate-tests' phase below when |
| 1413 | ;; "strace-ipc-tests.patch" is no longer applied. |
| 1414 | (patches (search-patches "strace-ipc-tests.patch")) |
| 1415 | (sha256 |
| 1416 | (base32 |
| 1417 | "1li49i75wrdw91hchyyd8spnzfcmxcfyfb5g9zbaza89aq4bq4ym")))) |
| 1418 | (build-system gnu-build-system) |
| 1419 | (arguments |
| 1420 | '(#:phases |
| 1421 | (modify-phases %standard-phases |
| 1422 | (add-after 'unpack 'patch-/bin/sh |
| 1423 | (lambda _ |
| 1424 | (substitute* "strace.c" |
| 1425 | (("/bin/sh") (which "sh"))) |
| 1426 | #t)) |
| 1427 | (add-before 'configure 'regenerate-tests |
| 1428 | ;; XXX Remove this phase when "strace-ipc-tests.patch" is no longer |
| 1429 | ;; applied in the 'source' field above. This phase is needed to |
| 1430 | ;; regenerate many other files from tests/gen_tests.in, which is |
| 1431 | ;; modified by the aforementioned patch. |
| 1432 | (lambda _ |
| 1433 | (invoke "tests/gen_tests.sh")))) |
| 1434 | ;; Don't fail if the architecture doesn't support different personalities. |
| 1435 | #:configure-flags '("--enable-mpers=check") |
| 1436 | ;; See <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32459>. |
| 1437 | #:parallel-tests? #f)) ; undeterministic failures |
| 1438 | (native-inputs `(("perl" ,perl))) |
| 1439 | (synopsis "System call tracer for Linux") |
| 1440 | (description |
| 1441 | "strace is a system call tracer, i.e. a debugging tool which prints out a |
| 1442 | trace of all the system calls made by a another process/program.") |
| 1443 | (license license:lgpl2.1+))) |
| 1444 | |
| 1445 | (define-public ltrace |
| 1446 | (package |
| 1447 | (name "ltrace") |
| 1448 | (version "0.7.3") |
| 1449 | (source (origin |
| 1450 | (method url-fetch) |
| 1451 | (uri (string-append "http://www.ltrace.org/ltrace_" version |
| 1452 | ".orig.tar.bz2")) |
| 1453 | (sha256 |
| 1454 | (base32 |
| 1455 | "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf")))) |
| 1456 | (build-system gnu-build-system) |
| 1457 | (inputs `(("libelf" ,libelf))) |
| 1458 | (arguments |
| 1459 | ;; Compilation uses -Werror by default, but it fails. |
| 1460 | '(#:configure-flags '("--disable-werror"))) |
| 1461 | (home-page "https://www.ltrace.org/") |
| 1462 | (synopsis "Library call tracer for Linux") |
| 1463 | (description |
| 1464 | "ltrace intercepts and records dynamic library calls which are called by |
| 1465 | an executed process and the signals received by that process. It can also |
| 1466 | intercept and print the system calls executed by the program.") |
| 1467 | (license license:gpl2+))) |
| 1468 | |
| 1469 | (define-public alsa-lib |
| 1470 | (package |
| 1471 | (name "alsa-lib") |
| 1472 | (version "1.1.9") |
| 1473 | (source (origin |
| 1474 | (method url-fetch) |
| 1475 | (uri (string-append |
| 1476 | "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-" |
| 1477 | version ".tar.bz2")) |
| 1478 | (sha256 |
| 1479 | (base32 |
| 1480 | "0jwr9g4yxg9gj6xx0sb2r6wrdl8amrjd19hilkrq4rirynp770s8")))) |
| 1481 | (build-system gnu-build-system) |
| 1482 | (home-page "https://www.alsa-project.org/") |
| 1483 | (synopsis "The Advanced Linux Sound Architecture libraries") |
| 1484 | (description |
| 1485 | "The Advanced Linux Sound Architecture (ALSA) provides audio and |
| 1486 | MIDI functionality to the Linux-based operating system.") |
| 1487 | (license license:lgpl2.1+))) |
| 1488 | |
| 1489 | (define-public alsa-utils |
| 1490 | (package |
| 1491 | (name "alsa-utils") |
| 1492 | (version "1.1.9") |
| 1493 | (source (origin |
| 1494 | (method url-fetch) |
| 1495 | (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/" |
| 1496 | name "-" version ".tar.bz2")) |
| 1497 | (sha256 |
| 1498 | (base32 |
| 1499 | "0fi11b7r8hg1bdjw74s8sqx8rc4qb310jaj9lsia9labvfyjrpsx")))) |
| 1500 | (build-system gnu-build-system) |
| 1501 | (arguments |
| 1502 | ;; XXX: Disable man page creation until we have DocBook. |
| 1503 | '(#:configure-flags (list "--disable-xmlto" |
| 1504 | |
| 1505 | ;; The udev rule is responsible for restoring |
| 1506 | ;; the volume. |
| 1507 | (string-append "--with-udev-rules-dir=" |
| 1508 | (assoc-ref %outputs "out") |
| 1509 | "/lib/udev/rules.d")) |
| 1510 | #:phases |
| 1511 | (modify-phases %standard-phases |
| 1512 | (add-before 'check 'disable-broken-test |
| 1513 | (lambda _ |
| 1514 | ;; XXX: The 1.1.8 release tarball is missing a header that's |
| 1515 | ;; required for this test to work. Fixed in 1.1.9. |
| 1516 | (substitute* "axfer/test/Makefile" |
| 1517 | ((".*container-test.*") "")) |
| 1518 | #t)) |
| 1519 | (add-before |
| 1520 | 'install 'pre-install |
| 1521 | (lambda _ |
| 1522 | ;; Don't try to mkdir /var/lib/alsa. |
| 1523 | (substitute* "Makefile" |
| 1524 | (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*") |
| 1525 | "true\n")) |
| 1526 | #t))))) |
| 1527 | (inputs |
| 1528 | `(("libsamplerate" ,libsamplerate) |
| 1529 | ("ncurses" ,ncurses) |
| 1530 | ("alsa-lib" ,alsa-lib) |
| 1531 | ("xmlto" ,xmlto) |
| 1532 | ("gettext" ,gettext-minimal))) |
| 1533 | (home-page "http://www.alsa-project.org/") |
| 1534 | (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)") |
| 1535 | (description |
| 1536 | "The Advanced Linux Sound Architecture (ALSA) provides audio and |
| 1537 | MIDI functionality to the Linux-based operating system.") |
| 1538 | |
| 1539 | ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are |
| 1540 | ;; GPLv2-only. |
| 1541 | (license license:gpl2))) |
| 1542 | |
| 1543 | (define-public alsa-plugins |
| 1544 | (package |
| 1545 | (name "alsa-plugins") |
| 1546 | (version "1.1.9") |
| 1547 | (source (origin |
| 1548 | (method url-fetch) |
| 1549 | (uri (string-append "ftp://ftp.alsa-project.org/pub/plugins/" |
| 1550 | name "-" version ".tar.bz2")) |
| 1551 | (sha256 |
| 1552 | (base32 |
| 1553 | "01zrg0h2jw9dlj9233vjsn916yf4f2s667yry6xsn8d57lq745qn")))) |
| 1554 | (build-system gnu-build-system) |
| 1555 | ;; TODO: Split libavcodec and speex if possible. It looks like they can not |
| 1556 | ;; be split, there are references to both in files. |
| 1557 | ;; TODO: Remove OSS related plugins, they add support to run native |
| 1558 | ;; ALSA applications on OSS however we do not offer OSS and OSS is |
| 1559 | ;; obsolete. |
| 1560 | (outputs '("out" "pulseaudio" "jack")) |
| 1561 | (arguments |
| 1562 | `(#:configure-flags '(;; Do not install a "local" configuration targeted |
| 1563 | ;; for /etc/alsa. On Guix System plugins are loaded from |
| 1564 | ;; the ALSA service, and other distributions likely |
| 1565 | ;; won't use these files. |
| 1566 | "--with-alsalconfdir=/tmp/noop") |
| 1567 | #:phases |
| 1568 | (modify-phases %standard-phases |
| 1569 | (add-after 'install 'split |
| 1570 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 1571 | ;; Distribute the binaries to the various outputs. |
| 1572 | (let* ((out (assoc-ref outputs "out")) |
| 1573 | (jack (assoc-ref outputs "jack")) |
| 1574 | (jacklib (string-append jack "/lib/alsa-lib")) |
| 1575 | (pua (assoc-ref outputs "pulseaudio")) |
| 1576 | (pualib (string-append pua "/lib/alsa-lib"))) |
| 1577 | ;; For jack. |
| 1578 | (mkdir-p jacklib) |
| 1579 | (for-each (lambda (file) |
| 1580 | (rename-file file (string-append jacklib "/" (basename file)))) |
| 1581 | (find-files out ".*jack\\.(la|so)")) |
| 1582 | ;; For pulseaudio. |
| 1583 | (mkdir-p pualib) |
| 1584 | (for-each (lambda (file) |
| 1585 | (rename-file file (string-append pualib "/" (basename file)))) |
| 1586 | (find-files out ".*pulse\\.(la|so)")) |
| 1587 | #t)))))) |
| 1588 | (inputs |
| 1589 | `(("alsa-lib" ,alsa-lib) |
| 1590 | ("jack" ,jack-1) |
| 1591 | ("speex" ,speex) ; libspeexdsp resampling plugin |
| 1592 | ("libsamplerate" ,libsamplerate) ; libsamplerate resampling plugin |
| 1593 | ("ffmpeg" ,ffmpeg) ; libavcodec resampling plugin, a52 plugin |
| 1594 | ("pulseaudio" ,pulseaudio))) ; PulseAudio plugin |
| 1595 | (native-inputs |
| 1596 | `(("pkg-config" ,pkg-config))) |
| 1597 | (home-page "http://www.alsa-project.org/") |
| 1598 | (synopsis "Plugins for the Advanced Linux Sound Architecture (ALSA)") |
| 1599 | (description |
| 1600 | "The Advanced Linux Sound Architecture (ALSA) provides audio and |
| 1601 | MIDI functionality to the Linux-based operating system. This package enhances ALSA |
| 1602 | by providing additional plugins which include: upmixing, downmixing, jackd and |
| 1603 | pulseaudio support for native alsa applications, format conversion (s16 to a52), and |
| 1604 | external rate conversion.") |
| 1605 | (license (list license:gpl2+ |
| 1606 | ;; `rate/rate_samplerate.c': LGPL v2.1 or later. |
| 1607 | license:lgpl2.1+)))) |
| 1608 | |
| 1609 | (define-public iptables |
| 1610 | (package |
| 1611 | (name "iptables") |
| 1612 | (version "1.6.2") |
| 1613 | (source (origin |
| 1614 | (method url-fetch) |
| 1615 | (uri (string-append |
| 1616 | "mirror://netfilter.org/iptables/iptables-" |
| 1617 | version ".tar.bz2")) |
| 1618 | (sha256 |
| 1619 | (base32 |
| 1620 | "0crp0lvh5m2f15pr8cw97h8yb8zjj10x95zj06j46cr68vx2vl2m")))) |
| 1621 | (build-system gnu-build-system) |
| 1622 | (native-inputs |
| 1623 | `(("pkg-config" ,pkg-config) |
| 1624 | ("flex" ,flex) |
| 1625 | ("bison" ,bison))) |
| 1626 | (inputs |
| 1627 | `(("libmnl" ,libmnl) |
| 1628 | ("libnftnl" ,libnftnl))) |
| 1629 | (arguments |
| 1630 | '(#:tests? #f ; no test suite |
| 1631 | #:configure-flags ; add $libdir to the RUNPATH of executables |
| 1632 | (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")))) |
| 1633 | (home-page "https://www.netfilter.org/projects/iptables/index.html") |
| 1634 | (synopsis "Programs to configure Linux IP packet filtering rules") |
| 1635 | (description |
| 1636 | "@command{iptables} is the user-space command line program used to |
| 1637 | configure the Linux 2.4.x and later IPv4 packet filtering ruleset |
| 1638 | (@dfn{firewall}), including @dfn{NAT} (Network Address Translation). |
| 1639 | |
| 1640 | This package also includes @command{ip6tables}, which is used to configure the |
| 1641 | IPv6 packet filter. |
| 1642 | |
| 1643 | Both commands are targeted at system administrators.") |
| 1644 | (license license:gpl2+))) |
| 1645 | |
| 1646 | (define-public ebtables |
| 1647 | (package |
| 1648 | (name "ebtables") |
| 1649 | (version "2.0.10-4") |
| 1650 | (source (origin |
| 1651 | (method url-fetch) |
| 1652 | (uri (string-append |
| 1653 | "mirror://netfilter.org/ebtables/ebtables-v" |
| 1654 | version ".tar.gz")) |
| 1655 | (sha256 |
| 1656 | (base32 |
| 1657 | "0pa5ljlk970yfyhpf3iqwfpbc30j8mgn90fapw9cfz909x47nvyw")))) |
| 1658 | (build-system gnu-build-system) |
| 1659 | (arguments |
| 1660 | '(#:tests? #f ; no test suite |
| 1661 | #:make-flags |
| 1662 | (let* ((out (assoc-ref %outputs "out")) |
| 1663 | (bin (string-append out "/sbin")) |
| 1664 | (lib (string-append out "/lib")) |
| 1665 | (man (string-append out "/share/man")) |
| 1666 | (iptables (assoc-ref %build-inputs "iptables")) |
| 1667 | (ethertypes (string-append iptables "/etc/ethertypes"))) |
| 1668 | (list (string-append "LIBDIR=" lib) |
| 1669 | (string-append "MANDIR=" man) |
| 1670 | (string-append "BINDIR=" bin) |
| 1671 | (string-append "ETHERTYPESFILE=" ethertypes) |
| 1672 | ;; With the default CFLAGS, it falis with: |
| 1673 | ;; communication.c:259:58: error: variable ‘ret’ set but not |
| 1674 | ;; used [-Werror=unused-but-set-variable] |
| 1675 | "CFLAGS=-Wall")) |
| 1676 | #:phases |
| 1677 | (modify-phases %standard-phases |
| 1678 | (replace 'configure |
| 1679 | ;; no configure script |
| 1680 | (lambda _ |
| 1681 | (substitute* "Makefile" |
| 1682 | ;; Remove user and group options from install commands, |
| 1683 | ;; otherwise it fails with: invalid user 'root'. |
| 1684 | (("-o root -g root") "") |
| 1685 | ;; Remove 'ethertypes' from the install target. |
| 1686 | (("install: .*") |
| 1687 | "install: $(MANDIR)/man8/ebtables.8 exec scripts\n")) |
| 1688 | #t))))) |
| 1689 | (inputs |
| 1690 | `(("perl" ,perl) |
| 1691 | ("iptables" ,iptables))) |
| 1692 | (synopsis "Ethernet bridge frame table administration") |
| 1693 | (home-page "http://ebtables.netfilter.org/") |
| 1694 | (description |
| 1695 | "ebtables is an application program used to set up and maintain the |
| 1696 | tables of rules (inside the Linux kernel) that inspect Ethernet frames. It is |
| 1697 | analogous to the iptables application, but less complicated, due to the fact |
| 1698 | that the Ethernet protocol is much simpler than the IP protocol.") |
| 1699 | (license license:gpl2+))) |
| 1700 | |
| 1701 | (define-public iproute |
| 1702 | (package |
| 1703 | (name "iproute2") |
| 1704 | (version "5.2.0") |
| 1705 | (source (origin |
| 1706 | (method url-fetch) |
| 1707 | (uri (string-append |
| 1708 | "mirror://kernel.org/linux/utils/net/iproute2/iproute2-" |
| 1709 | version ".tar.xz")) |
| 1710 | (sha256 |
| 1711 | (base32 |
| 1712 | "1a2dywa2kam24951byv9pl32mb9z6klh7d4vp8fwfgrm4vn5vfd5")))) |
| 1713 | (build-system gnu-build-system) |
| 1714 | (arguments |
| 1715 | `( ;; There is a test suite, but it wants network namespaces and sudo. |
| 1716 | #:tests? #f |
| 1717 | #:make-flags (let ((out (assoc-ref %outputs "out"))) |
| 1718 | (list "DESTDIR=" |
| 1719 | (string-append "BASH_COMPDIR=" out |
| 1720 | "/etc/bash_completion.d") |
| 1721 | (string-append "LIBDIR=" out "/lib") |
| 1722 | (string-append "HDRDIR=" out "/include") |
| 1723 | (string-append "SBINDIR=" out "/sbin") |
| 1724 | (string-append "CONFDIR=" out "/etc") |
| 1725 | (string-append "DOCDIR=" out "/share/doc/" |
| 1726 | ,name "-" ,version) |
| 1727 | (string-append "MANDIR=" out "/share/man"))) |
| 1728 | #:phases (modify-phases %standard-phases |
| 1729 | (add-before 'install 'pre-install |
| 1730 | (lambda _ |
| 1731 | ;; Don't attempt to create /var/lib/arpd. |
| 1732 | (substitute* "Makefile" |
| 1733 | (("^.*ARPDDIR.*$") "")) |
| 1734 | #t))))) |
| 1735 | (inputs |
| 1736 | `(("db4" ,bdb) |
| 1737 | ("iptables" ,iptables))) |
| 1738 | (native-inputs |
| 1739 | `(("bison" ,bison) |
| 1740 | ("flex" ,flex) |
| 1741 | ("pkg-config" ,pkg-config))) |
| 1742 | ;; For tests. |
| 1743 | ;; ("libmnl" ,libmnl) |
| 1744 | ;; ("util-linux" ,util-linux) |
| 1745 | (home-page |
| 1746 | "https://wiki.linuxfoundation.org/networking/iproute2") |
| 1747 | (synopsis |
| 1748 | "Utilities for controlling TCP/IP networking and traffic in Linux") |
| 1749 | (description |
| 1750 | "Iproute2 is a collection of utilities for controlling TCP/IP networking |
| 1751 | and traffic with the Linux kernel. The most important of these are |
| 1752 | @command{ip}, which configures IPv4 and IPv6, and @command{tc} for traffic |
| 1753 | control. |
| 1754 | |
| 1755 | Most network configuration manuals still refer to ifconfig and route as the |
| 1756 | primary network configuration tools, but ifconfig is known to behave |
| 1757 | inadequately in modern network environments, and both should be deprecated.") |
| 1758 | (license license:gpl2+))) |
| 1759 | |
| 1760 | (define-public net-tools |
| 1761 | ;; XXX: This package is basically unmaintained, but it provides a few |
| 1762 | ;; commands not yet provided by Inetutils, such as 'route', so we have to |
| 1763 | ;; live with it. |
| 1764 | (let ((commit "479bb4a7e11a4084e2935c0a576388f92469225b") |
| 1765 | (revision "0")) |
| 1766 | (package |
| 1767 | (name "net-tools") |
| 1768 | (version (string-append "1.60-" revision "." (string-take commit 7))) |
| 1769 | (source (origin |
| 1770 | (method url-fetch) |
| 1771 | (uri (string-append "https://sourceforge.net/code-snapshots/git/" |
| 1772 | "n/ne/net-tools/code.git/net-tools-code-" |
| 1773 | commit ".zip")) |
| 1774 | (file-name (string-append name "-" version ".zip")) |
| 1775 | (sha256 |
| 1776 | (base32 |
| 1777 | "0hz9fda9d78spp774b6rr5xaxav7cm4h0qcpxf70rvdbrf6qx7vy")))) |
| 1778 | (home-page "http://net-tools.sourceforge.net/") |
| 1779 | (build-system gnu-build-system) |
| 1780 | (arguments |
| 1781 | '(#:modules ((guix build gnu-build-system) |
| 1782 | (guix build utils) |
| 1783 | (srfi srfi-1) |
| 1784 | (srfi srfi-26)) |
| 1785 | #:phases |
| 1786 | (modify-phases %standard-phases |
| 1787 | (replace 'configure |
| 1788 | (lambda* (#:key outputs #:allow-other-keys) |
| 1789 | (let ((out (assoc-ref outputs "out"))) |
| 1790 | (mkdir-p (string-append out "/bin")) |
| 1791 | (mkdir-p (string-append out "/sbin")) |
| 1792 | |
| 1793 | ;; Pretend we have everything... |
| 1794 | (system "yes | make config") |
| 1795 | |
| 1796 | ;; ... except for the things we don't have. |
| 1797 | ;; HAVE_AFDECnet requires libdnet, which we don't have. |
| 1798 | ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers |
| 1799 | ;; that have been removed. |
| 1800 | ;; XXX SELINUX and AFBLUETOOTH are removed for now, but we should |
| 1801 | ;; think about adding them later. |
| 1802 | (substitute* '("config.make" "config.h") |
| 1803 | (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR|SELINUX|AFBLUETOOTH)[ =]1.*$") |
| 1804 | "")) |
| 1805 | #t))) |
| 1806 | (add-after 'install 'remove-redundant-commands |
| 1807 | (lambda* (#:key outputs #:allow-other-keys) |
| 1808 | ;; Remove commands and man pages redundant with Inetutils. |
| 1809 | (let* ((out (assoc-ref outputs "out")) |
| 1810 | (dup (append-map (cut find-files out <>) |
| 1811 | '("^hostname" |
| 1812 | "^(yp|nis|dns)?domainname")))) |
| 1813 | (for-each delete-file dup) |
| 1814 | #t)))) |
| 1815 | ;; Binaries that depend on libnet-tools.a don't declare that |
| 1816 | ;; dependency, making it parallel-unsafe. |
| 1817 | #:parallel-build? #f |
| 1818 | |
| 1819 | #:tests? #f ; no test suite |
| 1820 | #:make-flags (let ((out (assoc-ref %outputs "out"))) |
| 1821 | (list "CC=gcc" |
| 1822 | (string-append "BASEDIR=" out) |
| 1823 | (string-append "INSTALLNLSDIR=" out "/share/locale") |
| 1824 | (string-append "mandir=/share/man"))))) |
| 1825 | (native-inputs `(("gettext" ,gettext-minimal) |
| 1826 | ("unzip" ,unzip))) |
| 1827 | (synopsis "Tools for controlling the network subsystem in Linux") |
| 1828 | (description |
| 1829 | "This package includes the important tools for controlling the network |
| 1830 | subsystem of the Linux kernel. This includes arp, ifconfig, netstat, rarp and |
| 1831 | route. Additionally, this package contains utilities relating to particular |
| 1832 | network hardware types (plipconfig, slattach) and advanced aspects of IP |
| 1833 | configuration (iptunnel, ipmaddr).") |
| 1834 | (license license:gpl2+)))) |
| 1835 | |
| 1836 | (define-public libcap |
| 1837 | (package |
| 1838 | (name "libcap") |
| 1839 | (version "2.27") |
| 1840 | (source (origin |
| 1841 | (method url-fetch) |
| 1842 | (uri (string-append |
| 1843 | "mirror://kernel.org/linux/libs/security/linux-privs/" |
| 1844 | "libcap2/libcap-" version ".tar.xz")) |
| 1845 | (sha256 |
| 1846 | (base32 |
| 1847 | "0sj8kidl7qgf2qwxcbw1vadnlb30y4zvjzxswsmfdghq04npkhfs")))) |
| 1848 | (build-system gnu-build-system) |
| 1849 | (arguments '(#:phases |
| 1850 | (modify-phases %standard-phases |
| 1851 | (replace 'configure |
| 1852 | ;; Add $libdir to the RUNPATH of executables. |
| 1853 | (lambda _ |
| 1854 | (substitute* "Make.Rules" |
| 1855 | (("LDFLAGS := #-g") |
| 1856 | (string-append "LDFLAGS := -Wl,-rpath=" |
| 1857 | %output "/lib"))) |
| 1858 | #t))) |
| 1859 | #:tests? #f ; no 'check' target |
| 1860 | #:make-flags (list "lib=lib" |
| 1861 | (string-append "prefix=" |
| 1862 | (assoc-ref %outputs "out")) |
| 1863 | "RAISE_SETFCAP=no"))) |
| 1864 | (native-inputs `(("perl" ,perl))) |
| 1865 | (inputs `(("attr" ,attr))) |
| 1866 | (home-page "https://sites.google.com/site/fullycapable/") |
| 1867 | (synopsis "Library for working with POSIX capabilities") |
| 1868 | (description |
| 1869 | "Libcap2 provides a programming interface to POSIX capabilities on |
| 1870 | Linux-based operating systems.") |
| 1871 | |
| 1872 | ;; License is BSD-3 or GPLv2, at the user's choice. |
| 1873 | (license license:gpl2))) |
| 1874 | |
| 1875 | (define-public bridge-utils |
| 1876 | (package |
| 1877 | (name "bridge-utils") |
| 1878 | (version "1.6") |
| 1879 | (source |
| 1880 | (origin |
| 1881 | (method url-fetch) |
| 1882 | (uri (string-append "mirror://kernel.org/linux/utils/net/bridge-utils/" |
| 1883 | "bridge-utils-" version ".tar.xz")) |
| 1884 | (sha256 |
| 1885 | (base32 "1j16kr44csyr4yqxly26l1yw2bh4nkiasgwvask2i2gvsnsyyryc")))) |
| 1886 | (build-system gnu-build-system) |
| 1887 | |
| 1888 | ;; The tarball lacks all the generated files. |
| 1889 | (native-inputs `(("autoconf" ,autoconf) |
| 1890 | ("automake" ,automake))) |
| 1891 | (arguments |
| 1892 | '(#:phases |
| 1893 | (modify-phases %standard-phases |
| 1894 | (add-before 'bootstrap 'patch-stuff |
| 1895 | (lambda _ |
| 1896 | ;; Fix "field ‘ip6’ has incomplete type" errors. |
| 1897 | (substitute* "libbridge/libbridge.h" |
| 1898 | (("#include <linux/if_bridge.h>") |
| 1899 | "#include <linux/in6.h>\n#include <linux/if_bridge.h>")) |
| 1900 | |
| 1901 | ;; Ensure that the entire build fails if one of the |
| 1902 | ;; sub-Makefiles fails. |
| 1903 | (substitute* "Makefile.in" |
| 1904 | (("\\$\\(MAKE\\) \\$\\(MFLAGS\\) -C \\$\\$x ;") |
| 1905 | "$(MAKE) $(MFLAGS) -C $$x || exit 1;")) |
| 1906 | |
| 1907 | #t))) |
| 1908 | #:tests? #f)) ; no 'check' target |
| 1909 | |
| 1910 | (home-page |
| 1911 | "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge") |
| 1912 | (synopsis "Manipulate Ethernet bridges") |
| 1913 | (description |
| 1914 | "Utilities for Linux's Ethernet bridging facilities. A bridge is a way |
| 1915 | to connect two Ethernet segments together in a protocol independent way. |
| 1916 | Packets are forwarded based on Ethernet address, rather than IP address (like |
| 1917 | a router). Since forwarding is done at Layer 2, all protocols can go |
| 1918 | transparently through a bridge.") |
| 1919 | (license license:gpl2+))) |
| 1920 | |
| 1921 | (define-public libnl |
| 1922 | (package |
| 1923 | (name "libnl") |
| 1924 | (version "3.5.0") |
| 1925 | (source (origin |
| 1926 | (method url-fetch) |
| 1927 | (uri (string-append |
| 1928 | "https://github.com/thom311/libnl/releases/download/" |
| 1929 | "libnl" (string-join (string-split version #\.) "_") |
| 1930 | "/libnl-" version ".tar.gz")) |
| 1931 | (sha256 |
| 1932 | (base32 |
| 1933 | "1yh5bqmkivd78x378x34gzb28lvykn6b9k3hgvvpdnj5jpn3689m")))) |
| 1934 | (build-system gnu-build-system) |
| 1935 | (native-inputs |
| 1936 | `(("bison" ,bison) |
| 1937 | ("flex" ,flex) |
| 1938 | ("pkg-config" ,pkg-config) |
| 1939 | ("swig" ,swig) |
| 1940 | ("libnl3-doc" |
| 1941 | ,(origin |
| 1942 | (method url-fetch) |
| 1943 | (uri (string-append |
| 1944 | "https://github.com/thom311/libnl/releases/download/libnl" |
| 1945 | (string-join (string-split version #\.) "_") |
| 1946 | "/libnl-doc-" version ".tar.gz")) |
| 1947 | (sha256 |
| 1948 | (base32 "19p5y8q3cm5wqvamqc4s5syxnnkvzxy3gw8ivxk6fv9ybn8jm35h")))))) |
| 1949 | (inputs |
| 1950 | `(("python-2" ,python-2) |
| 1951 | ("python-3" ,python-3))) |
| 1952 | (outputs '("out" "doc" "python2" "python3")) |
| 1953 | (arguments |
| 1954 | `(#:modules ((guix build gnu-build-system) |
| 1955 | (guix build utils) |
| 1956 | (srfi srfi-1)) |
| 1957 | #:phases |
| 1958 | (modify-phases %standard-phases |
| 1959 | (add-after 'install 'install-python |
| 1960 | (lambda* (#:key outputs #:allow-other-keys) |
| 1961 | (define (python-inst python) |
| 1962 | (invoke python "setup.py" "build") |
| 1963 | (invoke python "setup.py" "install" |
| 1964 | (string-append "--prefix=" |
| 1965 | (assoc-ref %outputs python))) |
| 1966 | (invoke python "setup.py" "clean")) |
| 1967 | (setenv "LDFLAGS" (format #f "-Wl,-rpath=~a/lib" |
| 1968 | (assoc-ref %outputs "out"))) |
| 1969 | (with-directory-excursion "./python" |
| 1970 | (for-each python-inst '("python2" "python3"))) |
| 1971 | #t)) |
| 1972 | (add-after 'install 'install-doc |
| 1973 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 1974 | (let ((dest (string-append (assoc-ref outputs "doc") |
| 1975 | "/share/doc/libnl"))) |
| 1976 | (mkdir-p dest) |
| 1977 | (invoke "tar" "xf" (assoc-ref inputs "libnl3-doc") |
| 1978 | "--strip-components=1" "-C" dest))))))) |
| 1979 | (home-page "https://www.infradead.org/~tgr/libnl/") |
| 1980 | (synopsis "NetLink protocol library suite") |
| 1981 | (description |
| 1982 | "The libnl suite is a collection of libraries providing APIs to netlink |
| 1983 | protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarily |
| 1984 | between the kernel and user space processes. It was designed to be a more |
| 1985 | flexible successor to ioctl to provide mainly networking related kernel |
| 1986 | configuration and monitoring interfaces.") |
| 1987 | |
| 1988 | ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like |
| 1989 | ;; 'nl-addr-add.c'), so the result is GPLv2-only. |
| 1990 | (license license:gpl2))) |
| 1991 | |
| 1992 | (define-public iw |
| 1993 | (package |
| 1994 | (name "iw") |
| 1995 | (version "4.14") |
| 1996 | (source (origin |
| 1997 | (method url-fetch) |
| 1998 | (uri (string-append |
| 1999 | "mirror://kernel.org/software/network/iw/iw-" |
| 2000 | version ".tar.xz")) |
| 2001 | (sha256 |
| 2002 | (base32 |
| 2003 | "12ddd6vh6vs97135bnlyr0szv7hvpbnmfh48584frzab0z0725ph")))) |
| 2004 | (build-system gnu-build-system) |
| 2005 | (native-inputs `(("pkg-config" ,pkg-config))) |
| 2006 | (inputs `(("libnl" ,libnl))) |
| 2007 | (arguments |
| 2008 | `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")) |
| 2009 | "CC=gcc") |
| 2010 | #:phases (modify-phases %standard-phases (delete 'configure)))) |
| 2011 | (home-page "https://wireless.wiki.kernel.org/") |
| 2012 | (synopsis "Tool for configuring wireless devices") |
| 2013 | (description |
| 2014 | "iw is a new nl80211 based CLI configuration utility for wireless |
| 2015 | devices. It replaces @code{iwconfig}, which is deprecated.") |
| 2016 | (license license:isc))) |
| 2017 | |
| 2018 | (define-public powertop |
| 2019 | (package |
| 2020 | (name "powertop") |
| 2021 | (version "2.10") |
| 2022 | (source |
| 2023 | (origin |
| 2024 | (method url-fetch) |
| 2025 | (uri (string-append "https://01.org/sites/default/files/downloads/" |
| 2026 | "powertop-v" version ".tar.gz")) |
| 2027 | (sha256 |
| 2028 | (base32 "0xaazqccyd42v2q532dxx40nqhb9sfsa6cyx8641rl57mfg4bdyk")))) |
| 2029 | (build-system gnu-build-system) |
| 2030 | (arguments |
| 2031 | '(#:phases |
| 2032 | (modify-phases %standard-phases |
| 2033 | ;; TODO: Patch some hardcoded "wlan0" in calibrate/calibrate.cpp to |
| 2034 | ;; allow calibrating the network interface in Guix System. |
| 2035 | (add-after 'unpack 'patch-absolute-file-names |
| 2036 | (lambda* (#:key inputs #:allow-other-keys) |
| 2037 | (let ((kmod (assoc-ref inputs "kmod"))) |
| 2038 | (substitute* (find-files "src" "\\.cpp$") |
| 2039 | ;; Give the right 'modprobe' file name so that essential |
| 2040 | ;; modules such as msr.ko can be loaded. |
| 2041 | (("/sbin/modprobe") (string-append kmod "/bin/modprobe")) |
| 2042 | ;; These programs are only needed to calibrate, so using |
| 2043 | ;; relative file names avoids adding extra inputs. When they |
| 2044 | ;; are missing powertop gracefully handles it. |
| 2045 | (("/usr/bin/hcitool") "hcitool") |
| 2046 | (("/usr/bin/xset") "xset") |
| 2047 | (("/usr/sbin/hciconfig") "hciconfig")) |
| 2048 | #t)))))) |
| 2049 | (inputs |
| 2050 | `(("kmod" ,kmod) |
| 2051 | ("libnl" ,libnl) |
| 2052 | ("ncurses" ,ncurses) |
| 2053 | ("pciutils" ,pciutils) |
| 2054 | ("zlib" ,zlib))) |
| 2055 | (native-inputs |
| 2056 | `(("pkg-config" ,pkg-config))) |
| 2057 | (home-page "https://01.org/powertop/") |
| 2058 | (synopsis "Analyze power consumption on Intel-based laptops") |
| 2059 | (description |
| 2060 | "PowerTOP is a Linux tool to diagnose issues with power consumption and |
| 2061 | power management. In addition to being a diagnostic tool, PowerTOP also has |
| 2062 | an interactive mode where the user can experiment various power management |
| 2063 | settings for cases where the operating system has not enabled these |
| 2064 | settings.") |
| 2065 | (license license:gpl2))) |
| 2066 | |
| 2067 | (define-public aumix |
| 2068 | (package |
| 2069 | (name "aumix") |
| 2070 | (version "2.9.1") |
| 2071 | (source (origin |
| 2072 | (method url-fetch) |
| 2073 | (uri (string-append |
| 2074 | "http://www.jpj.net/~trevor/aumix/releases/aumix-" |
| 2075 | version ".tar.bz2")) |
| 2076 | (sha256 |
| 2077 | (base32 |
| 2078 | "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj")))) |
| 2079 | (build-system gnu-build-system) |
| 2080 | (inputs `(("ncurses" ,ncurses))) |
| 2081 | (home-page "http://www.jpj.net/~trevor/aumix.html") |
| 2082 | (synopsis "Audio mixer for X and the console") |
| 2083 | (description |
| 2084 | "Aumix adjusts an audio mixer from X, the console, a terminal, |
| 2085 | the command line or a script.") |
| 2086 | (license license:gpl2+))) |
| 2087 | |
| 2088 | (define-public iotop |
| 2089 | (package |
| 2090 | (name "iotop") |
| 2091 | (version "0.6") |
| 2092 | (source |
| 2093 | (origin |
| 2094 | (method url-fetch) |
| 2095 | (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-" |
| 2096 | version ".tar.gz")) |
| 2097 | (sha256 (base32 |
| 2098 | "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s")))) |
| 2099 | (build-system python-build-system) |
| 2100 | (arguments |
| 2101 | ;; The setup.py script expects python-2. |
| 2102 | `(#:python ,python-2 |
| 2103 | ;; There are currently no checks in the package. |
| 2104 | #:tests? #f)) |
| 2105 | (native-inputs `(("python" ,python-2))) |
| 2106 | (home-page "http://guichaz.free.fr/iotop/") |
| 2107 | (synopsis |
| 2108 | "Displays the IO activity of running processes") |
| 2109 | (description |
| 2110 | "Iotop is a Python program with a top like user interface to show the |
| 2111 | processes currently causing I/O.") |
| 2112 | (license license:gpl2+))) |
| 2113 | |
| 2114 | (define-public fuse |
| 2115 | (package |
| 2116 | (name "fuse") |
| 2117 | (version "2.9.8") |
| 2118 | (source (origin |
| 2119 | (method url-fetch) |
| 2120 | (uri (string-append "https://github.com/libfuse/libfuse/releases/" |
| 2121 | "download/fuse-" version |
| 2122 | "/fuse-" version ".tar.gz")) |
| 2123 | (sha256 |
| 2124 | (base32 |
| 2125 | "1qxg1r1mgysfq6qakmvid2njph3lr00w0swvydsfl9ymilfzi12y")) |
| 2126 | (patches (search-patches "fuse-overlapping-headers.patch")))) |
| 2127 | (build-system gnu-build-system) |
| 2128 | (inputs `(("util-linux" ,util-linux))) |
| 2129 | (arguments |
| 2130 | '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH=" |
| 2131 | (assoc-ref %outputs "out") |
| 2132 | "/sbin") |
| 2133 | (string-append "INIT_D_PATH=" |
| 2134 | (assoc-ref %outputs "out") |
| 2135 | "/etc/init.d") |
| 2136 | |
| 2137 | ;; The rule makes /dev/fuse 666. |
| 2138 | (string-append "UDEV_RULES_PATH=" |
| 2139 | (assoc-ref %outputs "out") |
| 2140 | "/lib/udev/rules.d")) |
| 2141 | #:phases |
| 2142 | (modify-phases %standard-phases |
| 2143 | (add-before 'build 'set-file-names |
| 2144 | (lambda* (#:key inputs #:allow-other-keys) |
| 2145 | ;; libfuse calls out to mount(8) and umount(8). Make sure |
| 2146 | ;; it refers to the right ones. |
| 2147 | (substitute* '("lib/mount_util.c" "util/mount_util.c") |
| 2148 | (("/bin/(u?)mount" _ maybe-u) |
| 2149 | (string-append (assoc-ref inputs "util-linux") |
| 2150 | "/bin/" maybe-u "mount"))) |
| 2151 | (substitute* '("util/mount.fuse.c") |
| 2152 | (("/bin/sh") |
| 2153 | (which "sh"))) |
| 2154 | |
| 2155 | ;; This hack leads libfuse to search for 'fusermount' in |
| 2156 | ;; $PATH, where it may find a setuid-root binary, instead of |
| 2157 | ;; trying solely $out/sbin/fusermount and failing because |
| 2158 | ;; it's not setuid. |
| 2159 | (substitute* "lib/Makefile" |
| 2160 | (("-DFUSERMOUNT_DIR=[[:graph:]]+") |
| 2161 | "-DFUSERMOUNT_DIR=\\\"/var/empty\\\"")) |
| 2162 | #t))))) |
| 2163 | (home-page "https://github.com/libfuse/libfuse") |
| 2164 | (synopsis "Support file systems implemented in user space") |
| 2165 | (description |
| 2166 | "As a consequence of its monolithic design, file system code for Linux |
| 2167 | normally goes into the kernel itself---which is not only a robustness issue, |
| 2168 | but also an impediment to system extensibility. FUSE, for \"file systems in |
| 2169 | user space\", is a kernel module and user-space library that tries to address |
| 2170 | part of this problem by allowing users to run file system implementations as |
| 2171 | user-space processes.") |
| 2172 | (license (list license:lgpl2.1 ;library |
| 2173 | license:gpl2+)))) ;command-line utilities |
| 2174 | |
| 2175 | (define-public unionfs-fuse |
| 2176 | (package |
| 2177 | (name "unionfs-fuse") |
| 2178 | (version "2.0") |
| 2179 | (source (origin |
| 2180 | (method url-fetch) |
| 2181 | (uri (string-append |
| 2182 | "https://github.com/rpodgorny/unionfs-fuse/archive/v" |
| 2183 | version ".tar.gz")) |
| 2184 | (file-name (string-append name "-" version ".tar.gz")) |
| 2185 | (sha256 |
| 2186 | (base32 |
| 2187 | "0hsn8l1iblvx27bpd4dvnvnbh9ri3sv2f9xzpsnfz3379kb7skgj")))) |
| 2188 | (build-system cmake-build-system) |
| 2189 | (native-inputs |
| 2190 | `(("python" ,python))) |
| 2191 | (inputs `(("fuse" ,fuse))) |
| 2192 | (arguments |
| 2193 | ;; The tests were never actually run ("collected 0 items"), but in recent |
| 2194 | ;; versions of pytest that causes an error. |
| 2195 | '(#:tests? #f)) |
| 2196 | (home-page "https://github.com/rpodgorny/unionfs-fuse") |
| 2197 | (synopsis "User-space union file system") |
| 2198 | (description |
| 2199 | "UnionFS-FUSE is a flexible union file system implementation in user |
| 2200 | space, using the FUSE library. Mounting a union file system allows you to |
| 2201 | \"aggregate\" the contents of several directories into a single mount point. |
| 2202 | UnionFS-FUSE additionally supports copy-on-write.") |
| 2203 | (license license:bsd-3))) |
| 2204 | |
| 2205 | (define fuse-static |
| 2206 | (package (inherit fuse) |
| 2207 | (name "fuse-static") |
| 2208 | (source (origin (inherit (package-source fuse)) |
| 2209 | (modules '((guix build utils))) |
| 2210 | (snippet |
| 2211 | '(begin |
| 2212 | ;; Normally libfuse invokes mount(8) so that /etc/mtab is |
| 2213 | ;; updated. Change calls to 'mtab_needs_update' to 0 so |
| 2214 | ;; that it doesn't do that, allowing us to remove the |
| 2215 | ;; dependency on util-linux (something that is useful in |
| 2216 | ;; initrds.) |
| 2217 | (substitute* '("lib/mount_util.c" |
| 2218 | "util/mount_util.c") |
| 2219 | (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)") |
| 2220 | "0") |
| 2221 | (("/bin/") |
| 2222 | "")) |
| 2223 | #t)))))) |
| 2224 | |
| 2225 | (define-public unionfs-fuse/static |
| 2226 | (package (inherit unionfs-fuse) |
| 2227 | (synopsis "User-space union file system (statically linked)") |
| 2228 | (name (string-append (package-name unionfs-fuse) "-static")) |
| 2229 | (source (origin (inherit (package-source unionfs-fuse)) |
| 2230 | (modules '((guix build utils))) |
| 2231 | (snippet |
| 2232 | '(begin |
| 2233 | ;; Add -ldl to the libraries, because libfuse.a needs that. |
| 2234 | (substitute* "src/CMakeLists.txt" |
| 2235 | (("target_link_libraries(.*)\\)" _ libs) |
| 2236 | (string-append "target_link_libraries" |
| 2237 | libs " dl)"))) |
| 2238 | #t)))) |
| 2239 | (arguments |
| 2240 | '(#:tests? #f |
| 2241 | #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static") |
| 2242 | #:phases |
| 2243 | (modify-phases %standard-phases |
| 2244 | (add-after 'install 'post-install |
| 2245 | (lambda* (#:key outputs #:allow-other-keys) |
| 2246 | (let* ((out (assoc-ref outputs "out")) |
| 2247 | (exe (string-append out "/bin/unionfs"))) |
| 2248 | ;; By default, 'unionfs' keeps references to |
| 2249 | ;; $glibc/share/locale and similar stuff. Remove them. |
| 2250 | (remove-store-references exe) |
| 2251 | |
| 2252 | ;; 'unionfsctl' has references to glibc as well. Since |
| 2253 | ;; we don't need it, remove it. |
| 2254 | (delete-file (string-append out "/bin/unionfsctl")) |
| 2255 | #t)))))) |
| 2256 | (inputs `(("fuse" ,fuse-static))))) |
| 2257 | |
| 2258 | (define-public sshfs |
| 2259 | (package |
| 2260 | (name "sshfs") |
| 2261 | (version "2.10") |
| 2262 | (source (origin |
| 2263 | (method url-fetch) |
| 2264 | (uri (string-append "https://github.com/libfuse/sshfs/releases/" |
| 2265 | "download/sshfs-" version "/sshfs-" version |
| 2266 | ".tar.gz")) |
| 2267 | (sha256 |
| 2268 | (base32 |
| 2269 | "00fir2iykdx11g8nv5gijg0zjrp2g3ldypnv0yi6lq3h5pg5v13h")))) |
| 2270 | (build-system gnu-build-system) |
| 2271 | (inputs |
| 2272 | `(("fuse" ,fuse) |
| 2273 | ("glib" ,glib))) |
| 2274 | (native-inputs |
| 2275 | `(("pkg-config" ,pkg-config))) |
| 2276 | (home-page "https://github.com/libfuse/sshfs") |
| 2277 | (synopsis "Mount remote file systems over SSH") |
| 2278 | (description |
| 2279 | "This is a file system client based on the SSH File Transfer Protocol. |
| 2280 | Since most SSH servers already support this protocol it is very easy to set |
| 2281 | up: on the server side there's nothing to do; on the client side mounting the |
| 2282 | file system is as easy as logging into the server with an SSH client.") |
| 2283 | (license license:gpl2+))) |
| 2284 | |
| 2285 | (define-public sshfs-fuse |
| 2286 | (package (inherit sshfs) |
| 2287 | (name "sshfs-fuse") |
| 2288 | (properties `((superseded . ,sshfs))))) |
| 2289 | |
| 2290 | (define-public archivemount |
| 2291 | (package |
| 2292 | (name "archivemount") |
| 2293 | (version "0.8.12") |
| 2294 | (source |
| 2295 | (origin |
| 2296 | (method url-fetch) |
| 2297 | (uri (string-append "https://www.cybernoia.de/software/archivemount/" |
| 2298 | "archivemount-" version ".tar.gz")) |
| 2299 | (sha256 |
| 2300 | (base32 "12fb8fcmd1zwvfgzx4pay47md5cr2kgxcgq82cm6skmq75alfzi4")))) |
| 2301 | (build-system gnu-build-system) |
| 2302 | (inputs `(("fuse" ,fuse) |
| 2303 | ("libarchive" ,libarchive))) |
| 2304 | (native-inputs `(("pkg-config" ,pkg-config))) |
| 2305 | (home-page "https://www.cybernoia.de/software/archivemount.html") |
| 2306 | (synopsis "Tool for mounting archive files with FUSE") |
| 2307 | (description "archivemount is a FUSE-based file system for Unix variants, |
| 2308 | including Linux. Its purpose is to mount archives (i.e. tar, tar.gz, etc.) to a |
| 2309 | mount point where it can be read from or written to as with any other file |
| 2310 | system. This makes accessing the contents of the archive, which may be |
| 2311 | compressed, transparent to other programs, without decompressing them.") |
| 2312 | (license license:lgpl2.0+))) |
| 2313 | |
| 2314 | (define-public numactl |
| 2315 | (package |
| 2316 | (name "numactl") |
| 2317 | (version "2.0.13") |
| 2318 | (source (origin |
| 2319 | (method url-fetch) |
| 2320 | (uri (string-append |
| 2321 | "https://github.com/numactl/numactl/releases/download/v" |
| 2322 | version "/numactl-" version ".tar.gz")) |
| 2323 | (sha256 |
| 2324 | (base32 |
| 2325 | "16lcypvcmx1ydkpi2s82kqhg13kak7qhpbnj8hd9bdbyhr5ja7lr")))) |
| 2326 | (build-system gnu-build-system) |
| 2327 | (arguments |
| 2328 | '(;; There's a 'test' target, but it requires NUMA support in the kernel |
| 2329 | ;; to run, which we can't assume to have. |
| 2330 | #:tests? #f)) |
| 2331 | |
| 2332 | ;; NUMA is apparently not supported on armhf, see |
| 2333 | ;; http://www.spinics.net/lists/linux-numa/msg01157.html |
| 2334 | (supported-systems (delete "armhf-linux" %supported-systems)) |
| 2335 | (home-page "https://github.com/numactl/numactl") |
| 2336 | (synopsis "Tools for non-uniform memory access (NUMA) machines") |
| 2337 | (description |
| 2338 | "NUMA stands for Non-Uniform Memory Access, in other words a system whose |
| 2339 | memory is not all in one place. The @command{numactl} program allows you to |
| 2340 | run your application program on specific CPUs and memory nodes. It does this |
| 2341 | by supplying a NUMA memory policy to the operating system before running your |
| 2342 | program. |
| 2343 | |
| 2344 | The package contains other commands, such as @command{numastat}, |
| 2345 | @command{memhog}, and @command{numademo} which provides a quick overview of |
| 2346 | NUMA performance on your system.") |
| 2347 | (license (list license:gpl2 ;programs |
| 2348 | license:lgpl2.1)))) ;library |
| 2349 | |
| 2350 | (define-public kbd-neo |
| 2351 | (package |
| 2352 | (name "kbd-neo") |
| 2353 | (version "2486") |
| 2354 | (source |
| 2355 | (origin |
| 2356 | (method url-fetch) |
| 2357 | (uri (string-append "https://svn.neo-layout.org/!svn/bc/" |
| 2358 | version "/linux/console/neo.map")) |
| 2359 | (file-name (string-append name "-" version ".map")) |
| 2360 | (sha256 |
| 2361 | (base32 |
| 2362 | "19mfrd31vzpsjiwc7pshxm0b0sz5dd17xrz6k079cy4im1vf0r4g")))) |
| 2363 | (build-system trivial-build-system) |
| 2364 | (arguments |
| 2365 | `(#:modules ((guix build utils)) |
| 2366 | #:builder (begin |
| 2367 | (use-modules (guix build utils)) |
| 2368 | (let ((out (string-append %output "/share/keymaps")) |
| 2369 | (source (assoc-ref %build-inputs "source"))) |
| 2370 | (mkdir-p out) |
| 2371 | (copy-file source (string-append out "/neo.map")) |
| 2372 | #t)))) |
| 2373 | (home-page "https://neo-layout.org") |
| 2374 | (synopsis "Neo2 console layout") |
| 2375 | (description |
| 2376 | "Kbd-neo provides the Neo2 keyboard layout for use with |
| 2377 | @command{loadkeys(1)} from @code{kbd(4)}.") |
| 2378 | ;; The file is located in an svn directory, the entire content of |
| 2379 | ;; the directory is licensed as GPL3. |
| 2380 | (license license:gpl3+))) |
| 2381 | |
| 2382 | (define-public kbd |
| 2383 | (package |
| 2384 | (name "kbd") |
| 2385 | (version "2.0.4") |
| 2386 | (source (origin |
| 2387 | (method url-fetch) |
| 2388 | (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-" |
| 2389 | version ".tar.xz")) |
| 2390 | (sha256 |
| 2391 | (base32 |
| 2392 | "124swm93dm4ca0pifgkrand3r9gvj3019d4zkfxsj9djpvv0mnaz")) |
| 2393 | (modules '((guix build utils))) |
| 2394 | (snippet |
| 2395 | '(begin |
| 2396 | (substitute* "tests/Makefile.in" |
| 2397 | ;; The '%: %.in' rule incorrectly uses @VERSION@. |
| 2398 | (("@VERSION@") |
| 2399 | "[@]VERSION[@]")) |
| 2400 | (substitute* '("src/unicode_start" "src/unicode_stop") |
| 2401 | ;; Assume the Coreutils are in $PATH. |
| 2402 | (("/usr/bin/tty") |
| 2403 | "tty")) |
| 2404 | #t)))) |
| 2405 | (build-system gnu-build-system) |
| 2406 | (arguments |
| 2407 | '(#:phases |
| 2408 | (modify-phases %standard-phases |
| 2409 | (add-before 'build 'pre-build |
| 2410 | (lambda* (#:key inputs #:allow-other-keys) |
| 2411 | (let ((gzip (assoc-ref %build-inputs "gzip")) |
| 2412 | (bzip2 (assoc-ref %build-inputs "bzip2"))) |
| 2413 | (substitute* "src/libkeymap/findfile.c" |
| 2414 | (("gzip") |
| 2415 | (string-append gzip "/bin/gzip")) |
| 2416 | (("bzip2") |
| 2417 | (string-append bzip2 "/bin/bzip2"))) |
| 2418 | #t))) |
| 2419 | (add-after 'install 'post-install |
| 2420 | (lambda* (#:key outputs #:allow-other-keys) |
| 2421 | ;; Make sure these programs find their comrades. |
| 2422 | (let* ((out (assoc-ref outputs "out")) |
| 2423 | (bin (string-append out "/bin"))) |
| 2424 | (for-each (lambda (prog) |
| 2425 | (wrap-program (string-append bin "/" prog) |
| 2426 | `("PATH" ":" prefix (,bin)))) |
| 2427 | '("unicode_start" "unicode_stop")) |
| 2428 | #t)))))) |
| 2429 | (inputs `(("check" ,check) |
| 2430 | ("gzip" ,gzip) |
| 2431 | ("bzip2" ,bzip2) |
| 2432 | ("pam" ,linux-pam))) |
| 2433 | (native-search-paths |
| 2434 | (list (search-path-specification |
| 2435 | (variable "LOADKEYS_KEYMAP_PATH") |
| 2436 | ;; Append ‘/**’ to recursively search all directories. One can then |
| 2437 | ;; run (for example) ‘loadkeys en-latin9’ instead of having to find |
| 2438 | ;; and type ‘i386/colemak/en-latin9’ on a mislabelled keyboard. |
| 2439 | (files (list "share/keymaps/**"))))) |
| 2440 | (native-inputs `(("pkg-config" ,pkg-config))) |
| 2441 | (home-page "http://kbd-project.org/") |
| 2442 | (synopsis "Linux keyboard utilities and keyboard maps") |
| 2443 | (description |
| 2444 | "This package contains keytable files and keyboard utilities compatible |
| 2445 | for systems using the Linux kernel. This includes commands such as |
| 2446 | @code{loadkeys}, @code{setfont}, @code{kbdinfo}, and @code{chvt}.") |
| 2447 | (license license:gpl2+))) |
| 2448 | |
| 2449 | (define-public loadkeys-static |
| 2450 | (package |
| 2451 | (inherit kbd) |
| 2452 | (name "loadkeys-static") |
| 2453 | (arguments |
| 2454 | (substitute-keyword-arguments (package-arguments kbd) |
| 2455 | ((#:configure-flags flags ''()) |
| 2456 | `(append '("LDFLAGS=-static" "--disable-shared" "--disable-nls" |
| 2457 | "--disable-vlock" ;so we don't need libpam |
| 2458 | "--disable-libkeymap") |
| 2459 | ,flags)) |
| 2460 | ((#:make-flags flags ''()) |
| 2461 | `(cons "LDFLAGS=-all-static" ,flags)) |
| 2462 | ((#:phases phases '%standard-phases) |
| 2463 | `(modify-phases ,phases |
| 2464 | (replace 'install |
| 2465 | (lambda* (#:key outputs #:allow-other-keys) |
| 2466 | (let ((out (assoc-ref outputs "out"))) |
| 2467 | ;; The binary keeps references to gzip, among other things, |
| 2468 | ;; which we don't need in the initrd, so strip references. |
| 2469 | (remove-store-references "src/loadkeys") |
| 2470 | |
| 2471 | (install-file "src/loadkeys" |
| 2472 | (string-append out "/bin")) |
| 2473 | #t))) |
| 2474 | (delete 'post-install))) |
| 2475 | ((#:strip-flags _ '()) |
| 2476 | ''("--strip-all")) |
| 2477 | ((#:allowed-references _ '()) |
| 2478 | '()))) |
| 2479 | |
| 2480 | (synopsis "Statically-linked @command{loadkeys} program") |
| 2481 | |
| 2482 | ;; This package is meant to be used internally in the initrd so don't |
| 2483 | ;; expose it. |
| 2484 | (properties '((hidden? . #t))))) |
| 2485 | |
| 2486 | (define-public inotify-tools |
| 2487 | (package |
| 2488 | (name "inotify-tools") |
| 2489 | (version "3.20.1") |
| 2490 | (source (origin |
| 2491 | (method git-fetch) |
| 2492 | (uri (git-reference |
| 2493 | (url "https://github.com/rvoicilas/inotify-tools.git") |
| 2494 | (commit version))) |
| 2495 | (file-name (git-file-name name version)) |
| 2496 | (sha256 |
| 2497 | (base32 |
| 2498 | "14dci1i4mhsd5sa33k8h3ayphk19kizynh5ql9ryibdpmcanfiyq")))) |
| 2499 | (build-system gnu-build-system) |
| 2500 | (native-inputs |
| 2501 | `(("autoconf" ,autoconf) |
| 2502 | ("automake" ,automake) |
| 2503 | ("libtool" ,libtool))) |
| 2504 | (home-page "https://github.com/rvoicilas/inotify-tools/wiki") |
| 2505 | (synopsis "Monitor file accesses") |
| 2506 | (description |
| 2507 | "The inotify-tools packages provides a C library and command-line tools |
| 2508 | to use Linux' inotify mechanism, which allows file accesses to be monitored.") |
| 2509 | (license license:gpl2+))) |
| 2510 | |
| 2511 | (define-public kmod |
| 2512 | (package |
| 2513 | (name "kmod") |
| 2514 | (version "26") |
| 2515 | (source (origin |
| 2516 | (method url-fetch) |
| 2517 | (uri |
| 2518 | (string-append "mirror://kernel.org/linux/utils/kernel/kmod/" |
| 2519 | "kmod-" version ".tar.xz")) |
| 2520 | (sha256 |
| 2521 | (base32 |
| 2522 | "17dvrls70nr3b3x1wm8pwbqy4r8a5c20m0dhys8mjhsnpg425fsp")) |
| 2523 | (patches (search-patches "kmod-module-directory.patch")))) |
| 2524 | (build-system gnu-build-system) |
| 2525 | (native-inputs |
| 2526 | `(("pkg-config" ,pkg-config))) |
| 2527 | (inputs |
| 2528 | `(("xz" ,xz) |
| 2529 | ("zlib" ,zlib))) |
| 2530 | (arguments |
| 2531 | `(#:tests? #f ; FIXME: Investigate test failures |
| 2532 | #:configure-flags '("--with-xz" "--with-zlib") |
| 2533 | #:phases |
| 2534 | (modify-phases %standard-phases |
| 2535 | (add-after 'install 'install-modprobe&co |
| 2536 | (lambda* (#:key outputs #:allow-other-keys) |
| 2537 | (let* ((out (assoc-ref outputs "out")) |
| 2538 | (bin (string-append out "/bin"))) |
| 2539 | (for-each (lambda (tool) |
| 2540 | (symlink "kmod" |
| 2541 | (string-append bin "/" tool))) |
| 2542 | '("insmod" "rmmod" "lsmod" "modprobe" |
| 2543 | "modinfo" "depmod")) |
| 2544 | #t)))))) |
| 2545 | (home-page "https://www.kernel.org/") |
| 2546 | (synopsis "Kernel module tools") |
| 2547 | (description "Kmod is a set of tools to handle common tasks with Linux |
| 2548 | kernel modules like insert, remove, list, check properties, resolve |
| 2549 | dependencies and aliases. |
| 2550 | |
| 2551 | These tools are designed on top of libkmod, a library that is shipped with |
| 2552 | kmod. The aim is to be compatible with tools, configurations and indices |
| 2553 | from the module-init-tools project.") |
| 2554 | (license license:gpl2+))) ; library under lgpl2.1+ |
| 2555 | |
| 2556 | (define-public eudev |
| 2557 | ;; The post-systemd fork, maintained by Gentoo. |
| 2558 | (package |
| 2559 | (name "eudev") |
| 2560 | (version "3.2.8") |
| 2561 | (source (origin |
| 2562 | (method git-fetch) |
| 2563 | (uri (git-reference (url "https://github.com/gentoo/eudev") |
| 2564 | (commit (string-append "v" version)))) |
| 2565 | (file-name (git-file-name name version)) |
| 2566 | (sha256 |
| 2567 | (base32 |
| 2568 | "1g95yzzx4qxm5qhhylbi930lrq4gsbz207n72018nkvswj6gmpjw")) |
| 2569 | (patches (search-patches "eudev-rules-directory.patch")))) |
| 2570 | (build-system gnu-build-system) |
| 2571 | (arguments |
| 2572 | '(#:phases |
| 2573 | (modify-phases %standard-phases |
| 2574 | (add-after 'unpack 'make-source-writable |
| 2575 | (lambda _ |
| 2576 | ;; XXX: Git checkouts are read-only, but this package needs to |
| 2577 | ;; modify some of its files. |
| 2578 | (for-each make-file-writable (find-files ".")) |
| 2579 | #t)) |
| 2580 | (add-before 'bootstrap 'patch-file-names |
| 2581 | (lambda* (#:key inputs #:allow-other-keys) |
| 2582 | (substitute* "man/make.sh" |
| 2583 | (("/usr/bin/xsltproc") |
| 2584 | (string-append (assoc-ref inputs "xsltproc") |
| 2585 | "/bin/xsltproc"))) |
| 2586 | #t)) |
| 2587 | (add-after 'install 'build-hwdb |
| 2588 | (lambda* (#:key outputs #:allow-other-keys) |
| 2589 | ;; Build OUT/etc/udev/hwdb.bin. This allows 'lsusb' and |
| 2590 | ;; similar tools to display product names. |
| 2591 | (let ((out (assoc-ref outputs "out"))) |
| 2592 | (invoke (string-append out "/bin/udevadm") |
| 2593 | "hwdb" "--update"))))) |
| 2594 | #:configure-flags (list "--enable-manpages"))) |
| 2595 | (native-inputs |
| 2596 | `(("autoconf" ,autoconf) |
| 2597 | ("automake" ,automake) |
| 2598 | ("gperf" ,gperf) |
| 2599 | ("libtool" ,libtool) |
| 2600 | ("pkg-config" ,pkg-config) |
| 2601 | ;; For tests. |
| 2602 | ("perl" ,perl) |
| 2603 | ("python" ,python-wrapper) |
| 2604 | ;; For documentation. |
| 2605 | ("docbook-xml" ,docbook-xml-4.2) |
| 2606 | ("docbook-xsl" ,docbook-xsl) |
| 2607 | ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES |
| 2608 | ("xsltproc" ,libxslt))) |
| 2609 | (inputs |
| 2610 | ;; When linked against libblkid, eudev can populate /dev/disk/by-label |
| 2611 | ;; and similar; it also installs the '60-persistent-storage.rules' file, |
| 2612 | ;; which contains the rules to do that. |
| 2613 | `(("util-linux" ,util-linux) ;for blkid |
| 2614 | ("kmod" ,kmod))) |
| 2615 | (home-page "https://wiki.gentoo.org/wiki/Project:Eudev") |
| 2616 | (synopsis "Userspace device management") |
| 2617 | (description "Udev is a daemon which dynamically creates and removes |
| 2618 | device nodes from /dev/, handles hotplug events and loads drivers at boot |
| 2619 | time.") |
| 2620 | (license license:gpl2+))) |
| 2621 | |
| 2622 | (define-public eudev-with-hwdb |
| 2623 | (deprecated-package "eudev-with-hwdb" eudev)) |
| 2624 | |
| 2625 | (define-public lvm2 |
| 2626 | (package |
| 2627 | (name "lvm2") |
| 2628 | (version "2.02.177") |
| 2629 | (source (origin |
| 2630 | (method url-fetch) |
| 2631 | (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2." |
| 2632 | version ".tgz")) |
| 2633 | (sha256 |
| 2634 | (base32 |
| 2635 | "1wl0isn0yz5wvglwylnlqkppafwmvhliq5bd92vjqp5ir4za49a0")) |
| 2636 | (modules '((guix build utils))) |
| 2637 | (snippet |
| 2638 | '(begin |
| 2639 | (use-modules (guix build utils)) |
| 2640 | |
| 2641 | ;; Honor sysconfdir. |
| 2642 | (substitute* "make.tmpl.in" |
| 2643 | (("confdir = .*$") |
| 2644 | "confdir = @sysconfdir@\n") |
| 2645 | (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@") |
| 2646 | "DEFAULT_SYS_DIR = @sysconfdir@")) |
| 2647 | #t)) |
| 2648 | (patches (search-patches "lvm2-static-link.patch")))) |
| 2649 | (build-system gnu-build-system) |
| 2650 | (native-inputs |
| 2651 | `(("pkg-config" ,pkg-config) |
| 2652 | ("procps" ,procps))) ;tests use 'pgrep' |
| 2653 | (inputs |
| 2654 | `(("udev" ,eudev))) |
| 2655 | (arguments |
| 2656 | '(#:phases |
| 2657 | (modify-phases %standard-phases |
| 2658 | (add-after 'configure 'set-makefile-shell |
| 2659 | (lambda _ |
| 2660 | ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as |
| 2661 | ;; expected. |
| 2662 | (setenv "SHELL" (which "sh")) |
| 2663 | |
| 2664 | ;; Replace /bin/sh with the right file name. |
| 2665 | (patch-makefile-SHELL "make.tmpl") |
| 2666 | #t))) |
| 2667 | |
| 2668 | #:configure-flags (list (string-append "--sysconfdir=" |
| 2669 | (assoc-ref %outputs "out") |
| 2670 | "/etc/lvm") |
| 2671 | "--enable-udev_sync" |
| 2672 | "--enable-udev_rules" |
| 2673 | "--enable-pkgconfig" |
| 2674 | "--enable-cmdlib" |
| 2675 | "--enable-dmeventd" ; Requires '--enable-cmdlib'. |
| 2676 | |
| 2677 | ;; Make sure programs such as 'dmsetup' can |
| 2678 | ;; find libdevmapper.so. |
| 2679 | (string-append "LDFLAGS=-Wl,-rpath=" |
| 2680 | (assoc-ref %outputs "out") |
| 2681 | "/lib,-rpath=" |
| 2682 | (assoc-ref %outputs "out") |
| 2683 | "/lib/device-mapper") |
| 2684 | ;; TODO: Patch make.tmpl.in to take LDFLAGS |
| 2685 | ;; into account so that we don't need to also |
| 2686 | ;; set CLDFLAGS. |
| 2687 | (string-append "CLDFLAGS=-Wl,-rpath=" |
| 2688 | (assoc-ref %outputs "out") |
| 2689 | "/lib,-rpath=" |
| 2690 | (assoc-ref %outputs "out") |
| 2691 | "/lib/device-mapper")) |
| 2692 | |
| 2693 | ;; The tests use 'mknod', which requires root access. |
| 2694 | #:tests? #f)) |
| 2695 | (home-page "https://sourceware.org/lvm2/") |
| 2696 | (synopsis "Logical volume management for Linux") |
| 2697 | (description |
| 2698 | "LVM2 is the logical volume management tool set for Linux-based systems. |
| 2699 | This package includes the user-space libraries and tools, including the device |
| 2700 | mapper. Kernel components are part of Linux-libre.") |
| 2701 | |
| 2702 | ;; Libraries (liblvm2, libdevmapper) are LGPLv2.1. |
| 2703 | ;; Command-line tools are GPLv2. |
| 2704 | (license (list license:gpl2 license:lgpl2.1)))) |
| 2705 | |
| 2706 | (define-public lvm2-static |
| 2707 | (package |
| 2708 | (inherit lvm2) |
| 2709 | (name "lvm2-static") |
| 2710 | |
| 2711 | ;; Propagate udev because libdevmapper.a depends on libudev. |
| 2712 | (inputs (alist-delete "udev" (package-inputs lvm2))) |
| 2713 | (propagated-inputs `(("udev" ,eudev))) |
| 2714 | |
| 2715 | (arguments |
| 2716 | (substitute-keyword-arguments (package-arguments lvm2) |
| 2717 | ((#:configure-flags flags '()) |
| 2718 | ;; LVM2 doesn't use Libtool, hence the custom option. |
| 2719 | `(cons "--enable-static_link" ,flags)))) |
| 2720 | (synopsis "Logical volume management for Linux (statically linked)"))) |
| 2721 | |
| 2722 | (define-public wireless-tools |
| 2723 | (package |
| 2724 | (name "wireless-tools") |
| 2725 | (version "30.pre9") |
| 2726 | (source (origin |
| 2727 | (method url-fetch) |
| 2728 | (uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools." |
| 2729 | version ".tar.gz")) |
| 2730 | (sha256 |
| 2731 | (base32 |
| 2732 | "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb")) |
| 2733 | (snippet |
| 2734 | '(begin |
| 2735 | ;; Remove the older header files that are not free software. |
| 2736 | (for-each (lambda (n) |
| 2737 | (delete-file (format #f "wireless.~a.h" n))) |
| 2738 | '(10 11 12 13 14 15 16 17 18 19 20)) |
| 2739 | #t)))) |
| 2740 | (build-system gnu-build-system) |
| 2741 | (arguments |
| 2742 | `(#:make-flags |
| 2743 | (list (string-append "PREFIX=" %output) |
| 2744 | (string-append "INSTALL_MAN=" %output "/share/man") |
| 2745 | (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib") |
| 2746 | "BUILD_STATIC=") |
| 2747 | #:phases (modify-phases %standard-phases |
| 2748 | (delete 'configure)) |
| 2749 | #:tests? #f)) |
| 2750 | (synopsis "Tools for manipulating Linux Wireless Extensions") |
| 2751 | (description "Wireless Tools are used to manipulate the now-deprecated |
| 2752 | Linux Wireless Extensions; consider using @code{iw} instead. The Wireless |
| 2753 | Extension was an interface allowing you to set Wireless LAN specific |
| 2754 | parameters and get the specific stats. It is deprecated in favor the nl80211 |
| 2755 | interface.") |
| 2756 | (home-page "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html") |
| 2757 | ;; wireless.21.h and wireless.22.h are distributed under lgpl2.1+, the |
| 2758 | ;; other files are distributed under gpl2. |
| 2759 | (license (list license:gpl2 license:lgpl2.1+)))) |
| 2760 | |
| 2761 | (define-public crda |
| 2762 | (package |
| 2763 | (name "crda") |
| 2764 | (version "3.18") |
| 2765 | (source (origin |
| 2766 | (method url-fetch) |
| 2767 | (uri (string-append "mirror://kernel.org/software/network/crda/" |
| 2768 | "crda-" version ".tar.xz")) |
| 2769 | (sha256 |
| 2770 | (base32 |
| 2771 | "1gydiqgb08d9gbx4l6gv98zg3pljc984m50hmn3ysxcbkxkvkz23")) |
| 2772 | (patches (search-patches "crda-optional-gcrypt.patch")))) |
| 2773 | (build-system gnu-build-system) |
| 2774 | (arguments |
| 2775 | '(#:phases (modify-phases %standard-phases |
| 2776 | (delete 'configure) |
| 2777 | (add-after 'unpack 'gzip-determinism |
| 2778 | (lambda _ |
| 2779 | (substitute* "Makefile" |
| 2780 | (("gzip") "gzip --no-name")) |
| 2781 | #t)) |
| 2782 | (add-before |
| 2783 | 'build 'no-werror-no-ldconfig |
| 2784 | (lambda _ |
| 2785 | (substitute* "Makefile" |
| 2786 | (("-Werror") "") |
| 2787 | (("ldconfig") "true")) |
| 2788 | #t)) |
| 2789 | (add-before |
| 2790 | 'build 'set-regulator-db-file-name |
| 2791 | (lambda* (#:key inputs #:allow-other-keys) |
| 2792 | ;; Tell CRDA where to find our database. |
| 2793 | (let ((regdb (assoc-ref inputs "wireless-regdb"))) |
| 2794 | (substitute* "crda.c" |
| 2795 | (("\"/lib/crda/regulatory.bin\"") |
| 2796 | (string-append "\"" regdb |
| 2797 | "/lib/crda/regulatory.bin\""))) |
| 2798 | #t)))) |
| 2799 | #:test-target "verify" |
| 2800 | #:make-flags (let ((out (assoc-ref %outputs "out")) |
| 2801 | (regdb (assoc-ref %build-inputs "wireless-regdb"))) |
| 2802 | (list "CC=gcc" "V=1" |
| 2803 | |
| 2804 | ;; Disable signature-checking on 'regulatory.bin'. |
| 2805 | ;; The reason is that this simplifies maintenance |
| 2806 | ;; on our side (no need to manage a distro key |
| 2807 | ;; pair), and we can guarantee integrity of |
| 2808 | ;; 'regulatory.bin' by other means anyway, such as |
| 2809 | ;; 'guix gc --verify'. See |
| 2810 | ;; <https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb> |
| 2811 | ;; for a discssion. |
| 2812 | "USE_OPENSSL=0" |
| 2813 | |
| 2814 | (string-append "PREFIX=" out) |
| 2815 | (string-append "SBINDIR=" out "/sbin/") |
| 2816 | (string-append "UDEV_RULE_DIR=" |
| 2817 | out "/lib/udev/rules.d") |
| 2818 | (string-append "LDFLAGS=-Wl,-rpath=" |
| 2819 | out "/lib -L.") |
| 2820 | (string-append "REG_BIN=" regdb |
| 2821 | "/lib/crda/regulatory.bin"))))) |
| 2822 | (native-inputs `(("pkg-config" ,pkg-config) |
| 2823 | ("python" ,python-2) |
| 2824 | ("wireless-regdb" ,wireless-regdb))) |
| 2825 | (inputs `(("libnl" ,libnl))) |
| 2826 | (home-page |
| 2827 | "https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA") |
| 2828 | (synopsis "Central regulatory domain agent (CRDA) for WiFi") |
| 2829 | (description |
| 2830 | "The Central Regulatory Domain Agent (CRDA) acts as the udev helper for |
| 2831 | communication between the kernel Linux and user space for regulatory |
| 2832 | compliance.") |
| 2833 | (license license:copyleft-next))) |
| 2834 | |
| 2835 | (define-public wireless-regdb |
| 2836 | (package |
| 2837 | (name "wireless-regdb") |
| 2838 | (version "2019.06.03") |
| 2839 | (source (origin |
| 2840 | (method url-fetch) |
| 2841 | (uri (string-append |
| 2842 | "mirror://kernel.org/software/network/wireless-regdb/" |
| 2843 | "wireless-regdb-" version ".tar.xz")) |
| 2844 | (sha256 |
| 2845 | (base32 |
| 2846 | "1gslvh0aqdkv48jyr2ddq153mw28i7qz2ybrjj9qvkk3dgc7x4fd")) |
| 2847 | |
| 2848 | ;; We're building 'regulatory.bin' by ourselves. |
| 2849 | (snippet '(begin |
| 2850 | (delete-file "regulatory.bin") |
| 2851 | #t)))) |
| 2852 | (build-system gnu-build-system) |
| 2853 | (arguments |
| 2854 | '(#:phases |
| 2855 | (modify-phases %standard-phases |
| 2856 | (add-after 'unpack 'gzip-determinism |
| 2857 | (lambda _ |
| 2858 | (substitute* "Makefile" |
| 2859 | (("gzip") "gzip --no-name")) |
| 2860 | #t)) |
| 2861 | (add-after 'unpack 'omit-signature |
| 2862 | (lambda _ |
| 2863 | (substitute* "Makefile" |
| 2864 | ;; Signing requires a REGDB_PUBCERT and REGDB_PRIVKEY which we |
| 2865 | ;; don't provide (see below). Disable it. |
| 2866 | ((" regulatory\\.db\\.p7s") "") |
| 2867 | ;; regulatory.db is built as a dependency of regulatory.db.p7s, |
| 2868 | ;; but ‘make install’ depends only on the latter while installing |
| 2869 | ;; both (and failing). Depend on it explicitly. |
| 2870 | (("^install: " all) (string-append all "regulatory.db "))) |
| 2871 | #t)) |
| 2872 | (delete 'configure)) ; no configure script |
| 2873 | |
| 2874 | ;; The 'all' target of the makefile depends on $(REGDB_CHANGED), which |
| 2875 | ;; is computed and can be equal to 'maintainer-clean'; when that |
| 2876 | ;; happens, we can end up deleting the 'regulatory.bin' file that we |
| 2877 | ;; just built. Thus, build things sequentially. |
| 2878 | #:parallel-build? #f |
| 2879 | |
| 2880 | #:tests? #f ; no tests |
| 2881 | #:make-flags |
| 2882 | (let ((out (assoc-ref %outputs "out"))) |
| 2883 | (list (string-append "PREFIX=" out) |
| 2884 | (string-append "FIRMWARE_PATH=$(PREFIX)/lib/firmware") |
| 2885 | |
| 2886 | ;; Leave this empty so that db2bin.py doesn't try to sign |
| 2887 | ;; ‘regulatory.bin’. This allows us to avoid managing a key |
| 2888 | ;; pair for the whole distribution. |
| 2889 | (string-append "REGDB_PRIVKEY=") |
| 2890 | ;; Don't generate a public key for the same reason. These are |
| 2891 | ;; used as Makefile targets and can't be the empty string. |
| 2892 | (string-append "REGDB_PUBCERT=/dev/null") |
| 2893 | (string-append "REGDB_PUBKEY=/dev/null"))))) |
| 2894 | (native-inputs |
| 2895 | `(("python" ,python-wrapper))) |
| 2896 | (home-page |
| 2897 | "https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb") |
| 2898 | (synopsis "Wireless regulatory database") |
| 2899 | (description |
| 2900 | "This package contains the wireless regulatory database Central |
| 2901 | Regulatory Database Agent (CRDA) daemon. The database contains information on |
| 2902 | country-specific regulations for the wireless spectrum.") |
| 2903 | (license license:isc))) |
| 2904 | |
| 2905 | (define-public lm-sensors |
| 2906 | (package |
| 2907 | (name "lm-sensors") |
| 2908 | (version "3.5.0") |
| 2909 | (source |
| 2910 | (origin |
| 2911 | (method git-fetch) |
| 2912 | (uri (git-reference |
| 2913 | (url "https://github.com/groeck/lm-sensors.git") |
| 2914 | (commit (string-append "V" (string-join |
| 2915 | (string-split version #\.) "-"))))) |
| 2916 | (file-name (git-file-name name version)) |
| 2917 | (sha256 |
| 2918 | (base32 "1mdrnb9r01z1xfdm6dpkywvf9yy9a4yzb59paih9sijwmigv19fj")) |
| 2919 | (patches (search-patches "lm-sensors-hwmon-attrs.patch")))) |
| 2920 | (build-system gnu-build-system) |
| 2921 | (inputs `(("rrdtool" ,rrdtool) |
| 2922 | ("perl" ,perl) |
| 2923 | ("kmod" ,kmod) |
| 2924 | ("gnuplot" ,gnuplot))) |
| 2925 | (native-inputs `(("pkg-config" ,pkg-config) |
| 2926 | ("flex" ,flex) |
| 2927 | ("bison" ,bison) |
| 2928 | ("which" ,which))) |
| 2929 | (outputs '("lib" ;avoid perl in closure |
| 2930 | "out")) |
| 2931 | (arguments |
| 2932 | `(#:tests? #f ; no 'check' target |
| 2933 | #:make-flags (list (string-append "PREFIX=" %output) |
| 2934 | (string-append "ETCDIR=" (assoc-ref %outputs "lib") "/etc") |
| 2935 | (string-append "INCLUDEDIR=" |
| 2936 | (assoc-ref %outputs "lib") "/include") |
| 2937 | (string-append "MANDIR=" %output "/share/man") |
| 2938 | (string-append "LIBDIR=" (assoc-ref %outputs "lib") "/lib")) |
| 2939 | #:phases |
| 2940 | (modify-phases %standard-phases |
| 2941 | (delete 'configure) |
| 2942 | (add-before 'build 'patch-exec-paths |
| 2943 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 2944 | (substitute* "prog/detect/sensors-detect" |
| 2945 | (("`uname") |
| 2946 | (string-append "`" (assoc-ref inputs "coreutils") |
| 2947 | "/bin/uname")) |
| 2948 | (("(`|\")modprobe" all open-quote) |
| 2949 | (string-append open-quote |
| 2950 | (assoc-ref inputs "kmod") |
| 2951 | "/bin/modprobe"))) |
| 2952 | (substitute* '("prog/pwm/pwmconfig" |
| 2953 | "prog/pwm/fancontrol") |
| 2954 | (("gnuplot") |
| 2955 | (string-append (assoc-ref inputs "gnuplot") |
| 2956 | "/bin/gnuplot")) |
| 2957 | (("cat ") |
| 2958 | (string-append (assoc-ref inputs "coreutils") |
| 2959 | "/bin/cat ")) |
| 2960 | (("egrep ") |
| 2961 | (string-append (assoc-ref inputs "grep") |
| 2962 | "/bin/egrep ")) |
| 2963 | (("sed -e") |
| 2964 | (string-append (assoc-ref inputs "sed") |
| 2965 | "/bin/sed -e")) |
| 2966 | (("cut -d") |
| 2967 | (string-append (assoc-ref inputs "coreutils") |
| 2968 | "/bin/cut -d")) |
| 2969 | (("sleep ") |
| 2970 | (string-append (assoc-ref inputs "coreutils") |
| 2971 | "/bin/sleep ")) |
| 2972 | (("readlink -f") |
| 2973 | (string-append (assoc-ref inputs "coreutils") |
| 2974 | "/bin/readlink -f"))) |
| 2975 | #t))))) |
| 2976 | (home-page "https://hwmon.wiki.kernel.org/lm_sensors") |
| 2977 | (synopsis "Utilities to read temperature/voltage/fan sensors") |
| 2978 | (description |
| 2979 | "Lm-sensors is a hardware health monitoring package for Linux. It allows |
| 2980 | you to access information from temperature, voltage, and fan speed sensors. |
| 2981 | It works with most newer systems.") |
| 2982 | (license license:gpl2+))) |
| 2983 | |
| 2984 | (define-public iucode-tool |
| 2985 | (package |
| 2986 | (name "iucode-tool") |
| 2987 | (version "2.3.1") |
| 2988 | (source (origin |
| 2989 | (method url-fetch) |
| 2990 | (uri (string-append "https://gitlab.com/iucode-tool/releases" |
| 2991 | "/raw/latest/iucode-tool_" version ".tar.xz")) |
| 2992 | (sha256 |
| 2993 | (base32 |
| 2994 | "159gvf6ljgg3g4vlhyy6pyr0wz11rcyhp985vc4az58d9px8xf0j")))) |
| 2995 | (build-system gnu-build-system) |
| 2996 | (home-page "https://gitlab.com/iucode-tool/iucode-tool/wikis/home") |
| 2997 | (synopsis "Manipulate Intel microcode bundles") |
| 2998 | (description |
| 2999 | "@command{iucode_tool} is a utility to work with microcode packages for |
| 3000 | Intel processors. It can convert between formats, extract specific versions, |
| 3001 | create a firmware image suitable for the Linux kernel, and more.") |
| 3002 | ;; cpuid.h is available for i686, x86_64, and ia64. |
| 3003 | (supported-systems '("i686-linux" "x86_64-linux")) |
| 3004 | (license license:gpl2+))) |
| 3005 | |
| 3006 | (define-public i2c-tools |
| 3007 | (package |
| 3008 | (name "i2c-tools") |
| 3009 | (version "3.1.1") |
| 3010 | (source (origin |
| 3011 | (method url-fetch) |
| 3012 | (uri (string-append |
| 3013 | "http://jdelvare.nerim.net/mirror/i2c-tools/i2c-tools-" |
| 3014 | version ".tar.bz2")) |
| 3015 | (sha256 |
| 3016 | (base32 |
| 3017 | "000pvg995qy1b15ks59gd0klri55hb33kqpg5czy84hw1pbdgm0l")))) |
| 3018 | (build-system gnu-build-system) |
| 3019 | (arguments |
| 3020 | `(#:tests? #f ; no 'check' target |
| 3021 | #:make-flags (list (string-append "prefix=" %output) |
| 3022 | "CC=gcc") |
| 3023 | ;; no configure script |
| 3024 | #:phases (modify-phases %standard-phases (delete 'configure)))) |
| 3025 | (inputs |
| 3026 | `(("perl" ,perl))) |
| 3027 | (home-page "http://jdelvare.nerim.net/devel.html#i2ctools") |
| 3028 | (synopsis "I2C tools for Linux") |
| 3029 | (description |
| 3030 | "The i2c-tools package contains a heterogeneous set of I2C tools for |
| 3031 | Linux: a bus probing tool, a chip dumper, register-level SMBus access helpers, |
| 3032 | EEPROM decoding scripts, EEPROM programming tools, and a python module for |
| 3033 | SMBus access.") |
| 3034 | (license license:gpl2+))) |
| 3035 | |
| 3036 | (define-public xsensors |
| 3037 | (package |
| 3038 | (name "xsensors") |
| 3039 | (version "0.70") |
| 3040 | (source (origin |
| 3041 | (method url-fetch) |
| 3042 | (uri (string-append |
| 3043 | "http://www.linuxhardware.org/xsensors/xsensors-" |
| 3044 | version ".tar.gz")) |
| 3045 | (sha256 |
| 3046 | (base32 |
| 3047 | "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh")))) |
| 3048 | (build-system gnu-build-system) |
| 3049 | (inputs `(("lm-sensors" ,lm-sensors "lib") |
| 3050 | ("gtk" ,gtk+-2))) |
| 3051 | (native-inputs `(("pkg-config" ,pkg-config))) |
| 3052 | (arguments |
| 3053 | `(#:phases |
| 3054 | (modify-phases %standard-phases |
| 3055 | (add-before 'configure 'enable-deprecated |
| 3056 | (lambda _ |
| 3057 | (substitute* "src/Makefile.in" |
| 3058 | (("-DGDK_DISABLE_DEPRECATED") "") |
| 3059 | (("-DGTK_DISABLE_DEPRECATED") "")) |
| 3060 | #t)) |
| 3061 | (add-before 'configure 'remove-Werror |
| 3062 | (lambda _ |
| 3063 | (substitute* '("configure" "src/Makefile.in") |
| 3064 | (("-Werror") "")) |
| 3065 | #t))))) |
| 3066 | (home-page "http://www.linuxhardware.org/xsensors/") |
| 3067 | (synopsis "Hardware health information viewer") |
| 3068 | (description |
| 3069 | "Xsensors reads data from the libsensors library regarding hardware |
| 3070 | health such as temperature, voltage and fan speed and displays the information |
| 3071 | in a digital read-out.") |
| 3072 | (license license:gpl2+))) |
| 3073 | |
| 3074 | (define-public perf |
| 3075 | (package |
| 3076 | (name "perf") |
| 3077 | (version (package-version linux-libre)) |
| 3078 | (source (package-source linux-libre)) |
| 3079 | (build-system gnu-build-system) |
| 3080 | (arguments |
| 3081 | '(#:phases |
| 3082 | (modify-phases %standard-phases |
| 3083 | (replace 'configure |
| 3084 | (lambda* (#:key inputs #:allow-other-keys) |
| 3085 | ;; Don't build with '-Werror', really. |
| 3086 | (substitute* "tools/lib/bpf/Makefile" |
| 3087 | (("-Werror") "")) |
| 3088 | |
| 3089 | (setenv "SHELL_PATH" (which "bash")) |
| 3090 | (chdir "tools/perf") |
| 3091 | #t))) |
| 3092 | #:make-flags (list (string-append "prefix=" |
| 3093 | (assoc-ref %outputs "out")) |
| 3094 | "WERROR=0" |
| 3095 | |
| 3096 | ;; By default, 'config/Makefile' uses lib64 on |
| 3097 | ;; x86_64. Work around that. |
| 3098 | "lib=lib") |
| 3099 | #:tests? #f)) ;no tests |
| 3100 | (native-inputs |
| 3101 | `(("pkg-config" ,pkg-config) |
| 3102 | ("bison" ,bison) |
| 3103 | ("flex" ,flex) |
| 3104 | |
| 3105 | ;; There are build scripts written in these languages. |
| 3106 | ("perl" ,perl) |
| 3107 | ("python" ,python-2))) |
| 3108 | (inputs |
| 3109 | `(("slang" ,slang) ;for the interactive TUI |
| 3110 | ;; ("newt" ,newt) |
| 3111 | ("python" ,python-2) ;'perf' links against libpython |
| 3112 | ("elfutils" ,elfutils) |
| 3113 | ("libiberty" ,libiberty) ;used alongside BDF for symbol demangling |
| 3114 | ("libunwind" ,libunwind) ;better stack walking |
| 3115 | ("numactl" ,numactl) ;for 'perf bench numa mem' |
| 3116 | |
| 3117 | ;; Documentation. |
| 3118 | ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES |
| 3119 | ("docbook-xsl" ,docbook-xsl) |
| 3120 | ("xmlto" ,xmlto) |
| 3121 | ("asciidoc" ,asciidoc))) |
| 3122 | (home-page "https://perf.wiki.kernel.org/") |
| 3123 | (synopsis "Linux profiling with performance counters") |
| 3124 | (description |
| 3125 | "perf is a tool suite for profiling using hardware performance counters, |
| 3126 | with support in the Linux kernel. perf can instrument CPU performance |
| 3127 | counters, tracepoints, kprobes, and uprobes (dynamic tracing). It is capable |
| 3128 | of lightweight profiling. This package contains the user-land tools and in |
| 3129 | particular the @code{perf} command.") |
| 3130 | (license (package-license linux-libre)))) |
| 3131 | |
| 3132 | (define-public pflask |
| 3133 | (package |
| 3134 | (name "pflask") |
| 3135 | (version "0.2") |
| 3136 | (source (origin |
| 3137 | (method url-fetch) |
| 3138 | (uri (string-append "https://github.com/ghedo/pflask/archive/v" |
| 3139 | version ".tar.gz")) |
| 3140 | (file-name (string-append name "-" version ".tar.gz")) |
| 3141 | (sha256 |
| 3142 | (base32 |
| 3143 | "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys")))) |
| 3144 | (build-system cmake-build-system) |
| 3145 | (arguments |
| 3146 | '(#:tests? #f)) ; no tests |
| 3147 | (home-page "https://ghedo.github.io/pflask/") |
| 3148 | (synopsis "Simple tool for creating Linux namespace containers") |
| 3149 | (description "pflask is a simple tool for creating Linux namespace |
| 3150 | containers. It can be used for running a command or even booting an OS inside |
| 3151 | an isolated container, created with the help of Linux namespaces. It is |
| 3152 | similar in functionality to chroot, although pflask provides better isolation |
| 3153 | thanks to the use of namespaces.") |
| 3154 | (license license:bsd-2))) |
| 3155 | |
| 3156 | (define-public singularity |
| 3157 | (package |
| 3158 | (name "singularity") |
| 3159 | (version "2.6.1") |
| 3160 | (source (origin |
| 3161 | (method url-fetch) |
| 3162 | (uri (string-append "https://github.com/singularityware/singularity/" |
| 3163 | "releases/download/" version |
| 3164 | "/singularity-" version ".tar.gz")) |
| 3165 | (sha256 |
| 3166 | (base32 |
| 3167 | "1whx0hqqi1326scgdxxxa1d94vn95mnq0drid6s8wdp84ni4d3gk")) |
| 3168 | (modules '((guix build utils))) |
| 3169 | (snippet |
| 3170 | '(begin |
| 3171 | ;; Do not create directories in /var. |
| 3172 | (substitute* "Makefile.in" |
| 3173 | (("\\$\\(MAKE\\) .*install-data-hook") "")) |
| 3174 | |
| 3175 | ;; The original source overrides PATH so that it points to |
| 3176 | ;; /bin, /usr/local/bin, etc., which obviously doesn't work |
| 3177 | ;; on Guix System. Leave PATH unchanged so we refer to the |
| 3178 | ;; installed Coreutils, grep, etc. |
| 3179 | (substitute* "bin/singularity.in" |
| 3180 | (("^PATH=.*" all) |
| 3181 | (string-append "#" all "\n"))) |
| 3182 | |
| 3183 | (substitute* (find-files "libexec/cli" "\\.exec$") |
| 3184 | (("\\$SINGULARITY_libexecdir/singularity/bin/([a-z]+)-suid" |
| 3185 | _ program) |
| 3186 | (string-append "/run/setuid-programs/singularity-" |
| 3187 | program "-helper"))) |
| 3188 | #t)))) |
| 3189 | (build-system gnu-build-system) |
| 3190 | (arguments |
| 3191 | `(#:configure-flags '("--localstatedir=/var") |
| 3192 | #:phases |
| 3193 | (modify-phases %standard-phases |
| 3194 | (add-after 'unpack 'patch-reference-to-squashfs-tools |
| 3195 | (lambda _ |
| 3196 | (substitute* "libexec/cli/build.exec" |
| 3197 | (("if ! singularity_which mksquashfs") "if 0") |
| 3198 | (("if ! mksquashfs") |
| 3199 | (string-append "if ! " (which "mksquashfs")))) |
| 3200 | #t))))) |
| 3201 | (inputs |
| 3202 | `(("libarchive" ,libarchive) |
| 3203 | ("python" ,python-wrapper) |
| 3204 | ("zlib" ,zlib) |
| 3205 | ("squashfs-tools" ,squashfs-tools))) |
| 3206 | (home-page "https://singularity.lbl.gov/") |
| 3207 | (synopsis "Container platform") |
| 3208 | (description "Singularity is a container platform supporting a number of |
| 3209 | container image formats. It can build SquashFS container images or import |
| 3210 | existing Docker images. Singularity requires kernel support for container |
| 3211 | isolation or root privileges.") |
| 3212 | (license license:bsd-3))) |
| 3213 | |
| 3214 | (define-public hdparm |
| 3215 | (package |
| 3216 | (name "hdparm") |
| 3217 | (version "9.58") |
| 3218 | (source (origin |
| 3219 | (method url-fetch) |
| 3220 | (uri (string-append "mirror://sourceforge/hdparm/hdparm/" |
| 3221 | "hdparm-" version ".tar.gz")) |
| 3222 | (sha256 |
| 3223 | (base32 |
| 3224 | "03z1qm8zbgpxagk3994lvp24yqsshjibkwg05v9p3q1w7y48xrws")))) |
| 3225 | (build-system gnu-build-system) |
| 3226 | (arguments |
| 3227 | `(#:make-flags (let ((out (assoc-ref %outputs "out"))) |
| 3228 | (list (string-append "binprefix=" out) |
| 3229 | (string-append "manprefix=" out) |
| 3230 | "CC=gcc")) |
| 3231 | #:phases |
| 3232 | (modify-phases %standard-phases |
| 3233 | (delete 'configure)) ; no configure script |
| 3234 | #:tests? #f)) ; no test suite |
| 3235 | (home-page "https://sourceforge.net/projects/hdparm/") |
| 3236 | (synopsis "View and tune ATA disk drive parameters") |
| 3237 | (description |
| 3238 | "@command{hdparm} is a command-line utility to control ATA controllers and |
| 3239 | disk drives. It can increase performance and/or reliability by careful tuning |
| 3240 | of hardware settings like power and acoustic management, DMA modes, and caching. |
| 3241 | It can also display detailed device information, or be used as a simple |
| 3242 | performance benchmarking tool. |
| 3243 | |
| 3244 | @command{hdparm} provides a command line interface to various Linux kernel |
| 3245 | interfaces provided by the SATA/ATA/SAS @code{libata} subsystem, and the older |
| 3246 | IDE driver subsystem. Many external USB drive enclosures with SCSI-ATA Command |
| 3247 | Translation (@dfn{SAT}) are also supported.") |
| 3248 | (license (license:non-copyleft "file://LICENSE.TXT")))) |
| 3249 | |
| 3250 | (define-public rfkill |
| 3251 | (package |
| 3252 | (name "rfkill") |
| 3253 | (version "0.5") |
| 3254 | (source (origin |
| 3255 | (method url-fetch) |
| 3256 | (uri (string-append "mirror://kernel.org/software/network/" |
| 3257 | name "/" name "-" version ".tar.xz")) |
| 3258 | (sha256 |
| 3259 | (base32 |
| 3260 | "0snqj5h0y991lszbigbyyqb8swj0hxajc1vfqg2scfay44231bp0")))) |
| 3261 | (build-system gnu-build-system) |
| 3262 | (arguments |
| 3263 | `(#:make-flags (list "CC=gcc" |
| 3264 | (string-append "PREFIX=" %output)) |
| 3265 | #:phases (modify-phases %standard-phases |
| 3266 | (delete 'configure)) |
| 3267 | #:tests? #f)) |
| 3268 | (home-page "https://wireless.wiki.kernel.org/en/users/Documentation/rfkill") |
| 3269 | (synopsis "Tool for enabling and disabling wireless devices") |
| 3270 | (description |
| 3271 | "rfkill is a simple tool for accessing the rfkill device interface, |
| 3272 | which is used to enable and disable wireless networking devices, typically |
| 3273 | WLAN, Bluetooth and mobile broadband.") |
| 3274 | (license (license:non-copyleft "file://COPYING" |
| 3275 | "See COPYING in the distribution.")) |
| 3276 | ;; rfkill is part of util-linux as of 2.31. |
| 3277 | (properties `((superseded . ,util-linux))))) |
| 3278 | |
| 3279 | (define-public acpi |
| 3280 | (package |
| 3281 | (name "acpi") |
| 3282 | (version "1.7") |
| 3283 | (source (origin |
| 3284 | (method url-fetch) |
| 3285 | (uri (string-append "mirror://sourceforge/acpiclient/acpiclient/" |
| 3286 | version "/" name "-" version ".tar.gz")) |
| 3287 | (sha256 |
| 3288 | (base32 |
| 3289 | "01ahldvf0gc29dmbd5zi4rrnrw2i1ajnf30sx2vyaski3jv099fp")))) |
| 3290 | (build-system gnu-build-system) |
| 3291 | (home-page "http://acpiclient.sourceforge.net") |
| 3292 | (synopsis "Display information on ACPI devices") |
| 3293 | (description "@code{acpi} attempts to replicate the functionality of the |
| 3294 | \"old\" @code{apm} command on ACPI systems, including battery and thermal |
| 3295 | information. It does not support ACPI suspending, only displays information |
| 3296 | about ACPI devices.") |
| 3297 | (license license:gpl2+))) |
| 3298 | |
| 3299 | (define-public acpid |
| 3300 | (package |
| 3301 | (name "acpid") |
| 3302 | (version "2.0.31") |
| 3303 | (source (origin |
| 3304 | (method url-fetch) |
| 3305 | (uri (string-append "mirror://sourceforge/acpid2/acpid-" |
| 3306 | version ".tar.xz")) |
| 3307 | (sha256 |
| 3308 | (base32 |
| 3309 | "1hrc0xm6q12knbgzhq0i8g2rfrkwcvh1asd7k9rs3nc5xmlwd7gw")))) |
| 3310 | (build-system gnu-build-system) |
| 3311 | (home-page "https://sourceforge.net/projects/acpid2/") |
| 3312 | (synopsis "Daemon for delivering ACPI events to user-space programs") |
| 3313 | (description |
| 3314 | "acpid is designed to notify user-space programs of Advanced |
| 3315 | Configuration and Power Interface (ACPI) events. acpid should be started |
| 3316 | during the system boot, and will run as a background process. When an ACPI |
| 3317 | event is received from the kernel, acpid will examine the list of rules |
| 3318 | specified in /etc/acpi/events and execute the rules that match the event.") |
| 3319 | (license license:gpl2+))) |
| 3320 | |
| 3321 | (define-public sysfsutils |
| 3322 | (package |
| 3323 | (name "sysfsutils") |
| 3324 | (version "2.1.0") |
| 3325 | (source |
| 3326 | (origin |
| 3327 | (method url-fetch) |
| 3328 | (uri |
| 3329 | (string-append |
| 3330 | "mirror://sourceforge/linux-diag/sysfsutils/" version "/sysfsutils-" |
| 3331 | version ".tar.gz")) |
| 3332 | (sha256 |
| 3333 | (base32 "12i0ip11xbfcjzxz4r10cvz7mbzgq1hfcdn97w6zz7sm3wndwrg8")))) |
| 3334 | (build-system gnu-build-system) |
| 3335 | (home-page "http://linux-diag.sourceforge.net/Sysfsutils.html") |
| 3336 | (synopsis "System utilities based on Linux sysfs") |
| 3337 | (description |
| 3338 | "These are a set of utilities built upon sysfs, a virtual file system in |
| 3339 | Linux kernel versions 2.5+ that exposes a system's device tree. The package |
| 3340 | also contains the libsysfs library.") |
| 3341 | ;; The library is under lgpl2.1+ (all files say "or any later version"). |
| 3342 | ;; The rest is mostly gpl2, with a few files indicating gpl2+. |
| 3343 | (license (list license:gpl2 license:gpl2+ license:lgpl2.1+)))) |
| 3344 | |
| 3345 | (define-public sysfsutils-1 |
| 3346 | (package |
| 3347 | (inherit sysfsutils) |
| 3348 | (version "1.3.0") |
| 3349 | (source |
| 3350 | (origin |
| 3351 | (method url-fetch) |
| 3352 | (uri |
| 3353 | (string-append |
| 3354 | "mirror://sourceforge/linux-diag/sysfsutils/sysfsutils-" version |
| 3355 | "/sysfsutils-" version ".tar.gz")) |
| 3356 | (sha256 |
| 3357 | (base32 "0kdhs07fm8263pxwd5blwn2x211cg4fk63fyf9ijcdkvzmwxrqq3")) |
| 3358 | (modules '((guix build utils))) |
| 3359 | (snippet |
| 3360 | '(begin |
| 3361 | (substitute* "Makefile.in" |
| 3362 | (("includedir = /usr/include/sysfs") |
| 3363 | "includedir = @includedir@")) |
| 3364 | (substitute* "configure" |
| 3365 | (("includedir='(\\$\\{prefix\\}/include)'" all orig) |
| 3366 | (string-append "includedir='" orig "/sysfs'"))) |
| 3367 | #t)))) |
| 3368 | (synopsis "System utilities based on Linux sysfs (version 1.x)"))) |
| 3369 | |
| 3370 | (define-public cpufrequtils |
| 3371 | (package |
| 3372 | (name "cpufrequtils") |
| 3373 | (version "0.3") |
| 3374 | (source |
| 3375 | (origin |
| 3376 | (method url-fetch) |
| 3377 | (uri (string-append "mirror://kernel.org/linux/utils/kernel/cpufreq/" |
| 3378 | "cpufrequtils-" version ".tar.gz")) |
| 3379 | (sha256 |
| 3380 | (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm")) |
| 3381 | (patches (search-patches "cpufrequtils-fix-aclocal.patch")))) |
| 3382 | (build-system gnu-build-system) |
| 3383 | (native-inputs |
| 3384 | `(("sysfsutils" ,sysfsutils-1))) |
| 3385 | (arguments |
| 3386 | '(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath=" |
| 3387 | (assoc-ref %outputs "out") "/lib")))) |
| 3388 | (home-page "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/") |
| 3389 | (synopsis "Utilities to get and set CPU frequency on Linux") |
| 3390 | (description |
| 3391 | "The cpufrequtils suite contains utilities to retrieve CPU frequency |
| 3392 | information, and set the CPU frequency if supported, using the cpufreq |
| 3393 | capabilities of the Linux kernel.") |
| 3394 | (license license:gpl2))) |
| 3395 | |
| 3396 | (define-public libraw1394 |
| 3397 | (package |
| 3398 | (name "libraw1394") |
| 3399 | (version "2.1.2") |
| 3400 | (source (origin |
| 3401 | (method url-fetch) |
| 3402 | (uri (string-append |
| 3403 | "mirror://kernel.org/linux/libs/ieee1394/" |
| 3404 | name "-" version ".tar.xz")) |
| 3405 | (sha256 |
| 3406 | (base32 |
| 3407 | "0pm5b415j1qdzyw38wdv8h7ff4yx20831z1727mpsb6jc6bwdk03")))) |
| 3408 | (build-system gnu-build-system) |
| 3409 | (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page") |
| 3410 | (synopsis "Interface library for the Linux IEEE1394 drivers") |
| 3411 | (description |
| 3412 | "Libraw1394 is the only supported interface to the kernel side raw1394 of |
| 3413 | the Linux IEEE-1394 subsystem, which provides direct access to the connected |
| 3414 | 1394 buses to user space. Through libraw1394/raw1394, applications can directly |
| 3415 | send to and receive from other nodes without requiring a kernel driver for the |
| 3416 | protocol in question.") |
| 3417 | (license license:lgpl2.1+))) |
| 3418 | |
| 3419 | (define-public libavc1394 |
| 3420 | (package |
| 3421 | (name "libavc1394") |
| 3422 | (version "0.5.4") |
| 3423 | (source (origin |
| 3424 | (method url-fetch) |
| 3425 | (uri (string-append "mirror://sourceforge/libavc1394/libavc1394/" |
| 3426 | name "-" version ".tar.gz")) |
| 3427 | (sha256 |
| 3428 | (base32 |
| 3429 | "0lsv46jdqvdx5hx92v0z2cz3yh6212pz9gk0k3513sbaa04zzcbw")))) |
| 3430 | (build-system gnu-build-system) |
| 3431 | (native-inputs |
| 3432 | `(("pkg-config" ,pkg-config))) |
| 3433 | (propagated-inputs |
| 3434 | `(("libraw1394" ,libraw1394))) ; required by libavc1394.pc |
| 3435 | (home-page "https://sourceforge.net/projects/libavc1394/") |
| 3436 | (synopsis "AV/C protocol library for IEEE 1394") |
| 3437 | (description |
| 3438 | "Libavc1394 is a programming interface to the AV/C specification from |
| 3439 | the 1394 Trade Association. AV/C stands for Audio/Video Control.") |
| 3440 | (license license:lgpl2.1+))) |
| 3441 | |
| 3442 | (define-public libiec61883 |
| 3443 | (package |
| 3444 | (name "libiec61883") |
| 3445 | (version "1.2.0") |
| 3446 | (source (origin |
| 3447 | (method url-fetch) |
| 3448 | (uri (string-append |
| 3449 | "mirror://kernel.org/linux/libs/ieee1394/" |
| 3450 | name "-" version ".tar.xz")) |
| 3451 | (sha256 |
| 3452 | (base32 |
| 3453 | "17ph458zya2l8dr2xwqnzy195qd9swrir31g78qkgb3g4xz2rq6i")))) |
| 3454 | (build-system gnu-build-system) |
| 3455 | (native-inputs |
| 3456 | `(("pkg-config" ,pkg-config))) |
| 3457 | (propagated-inputs |
| 3458 | `(("libraw1394" ,libraw1394))) ; required by libiec61883.pc |
| 3459 | (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page") |
| 3460 | (synopsis "Isochronous streaming media library for IEEE 1394") |
| 3461 | (description |
| 3462 | "The libiec61883 library provides a higher level API for streaming DV, |
| 3463 | MPEG-2 and audio over Linux IEEE 1394.") |
| 3464 | (license license:lgpl2.1+))) |
| 3465 | |
| 3466 | (define-public mdadm |
| 3467 | (package |
| 3468 | (name "mdadm") |
| 3469 | (version "4.1") |
| 3470 | (source (origin |
| 3471 | (method url-fetch) |
| 3472 | (uri (string-append |
| 3473 | "mirror://kernel.org/linux/utils/raid/mdadm/mdadm-" |
| 3474 | version ".tar.xz")) |
| 3475 | (sha256 |
| 3476 | (base32 |
| 3477 | "0jjgjgqijpdp7ijh8slzzjjw690kydb1jjadf0x5ilq85628hxmb")))) |
| 3478 | (build-system gnu-build-system) |
| 3479 | (inputs |
| 3480 | `(("udev" ,eudev))) |
| 3481 | (arguments |
| 3482 | `(#:make-flags (let ((out (assoc-ref %outputs "out"))) |
| 3483 | (list "CC=gcc" |
| 3484 | "INSTALL=install" |
| 3485 | "CHECK_RUN_DIR=0" |
| 3486 | ;; TODO: tell it where to find 'sendmail' |
| 3487 | ;; (string-append "MAILCMD=" <???> "/sbin/sendmail") |
| 3488 | (string-append "BINDIR=" out "/sbin") |
| 3489 | (string-append "MANDIR=" out "/share/man") |
| 3490 | (string-append "UDEVDIR=" out "/lib/udev"))) |
| 3491 | #:phases |
| 3492 | (modify-phases %standard-phases |
| 3493 | (add-before 'build 'patch-program-paths |
| 3494 | (lambda* (#:key inputs #:allow-other-keys) |
| 3495 | (let ((coreutils (assoc-ref inputs "coreutils"))) |
| 3496 | (substitute* "udev-md-raid-arrays.rules" |
| 3497 | (("/usr/bin/(readlink|basename)" all program) |
| 3498 | (string-append coreutils "/bin/" program)))) |
| 3499 | #t)) |
| 3500 | (add-before 'build 'remove-W-error |
| 3501 | (lambda _ |
| 3502 | ;; We cannot build with -Werror on i686 due to a |
| 3503 | ;; 'sign-compare' warning in util.c. |
| 3504 | (substitute* "Makefile" |
| 3505 | (("-Werror") "")) |
| 3506 | #t)) |
| 3507 | (delete 'configure)) |
| 3508 | ;;tests must be done as root |
| 3509 | #:tests? #f)) |
| 3510 | (home-page "http://neil.brown.name/blog/mdadm") |
| 3511 | (synopsis "Tool for managing Linux Software RAID arrays") |
| 3512 | (description |
| 3513 | "mdadm is a tool for managing Linux Software RAID arrays. It can create, |
| 3514 | assemble, report on, and monitor arrays. It can also move spares between raid |
| 3515 | arrays when needed.") |
| 3516 | (license license:gpl2+))) |
| 3517 | |
| 3518 | (define-public mdadm-static |
| 3519 | (package |
| 3520 | (inherit mdadm) |
| 3521 | (name "mdadm-static") |
| 3522 | (arguments |
| 3523 | (substitute-keyword-arguments (package-arguments mdadm) |
| 3524 | ((#:make-flags flags) |
| 3525 | `(cons "LDFLAGS = -static" ,flags)) |
| 3526 | ((#:phases phases) |
| 3527 | `(modify-phases ,phases |
| 3528 | (add-after 'install 'remove-cruft |
| 3529 | (lambda* (#:key outputs #:allow-other-keys) |
| 3530 | (let* ((out (assoc-ref outputs "out")) |
| 3531 | (precious? (lambda (file) |
| 3532 | (member file '("." ".." "sbin")))) |
| 3533 | (directories (scandir out (negate precious?)))) |
| 3534 | (with-directory-excursion out |
| 3535 | (for-each delete-file-recursively directories) |
| 3536 | (remove-store-references "sbin/mdadm") |
| 3537 | (delete-file "sbin/mdmon") |
| 3538 | #t)))))) |
| 3539 | ((#:modules modules %gnu-build-system-modules) |
| 3540 | `((ice-9 ftw) ,@modules)) |
| 3541 | ((#:strip-flags _ '()) |
| 3542 | ''("--strip-all")) ;strip a few extra KiB |
| 3543 | ((#:allowed-references _ '("out")) |
| 3544 | '("out")))) ;refer only self |
| 3545 | (synopsis "Statically-linked 'mdadm' command for use in an initrd"))) |
| 3546 | |
| 3547 | (define-public multipath-tools |
| 3548 | (package |
| 3549 | (name "multipath-tools") |
| 3550 | (version "0.8.2") |
| 3551 | (source (origin |
| 3552 | (method url-fetch) |
| 3553 | (uri (string-append "https://git.opensvc.com/?p=multipath-tools/" |
| 3554 | ".git;a=snapshot;h=" version ";sf=tgz")) |
| 3555 | (file-name (string-append name "-" version ".tar.gz")) |
| 3556 | (sha256 |
| 3557 | (base32 |
| 3558 | "0kb4mhzwyygdbikikmby6hj39pb3nrzv05v526c75wnycwnpxg31")) |
| 3559 | (modules '((guix build utils))) |
| 3560 | (snippet |
| 3561 | '(begin |
| 3562 | ;; Drop bundled valgrind headers. |
| 3563 | (delete-file-recursively "third-party") |
| 3564 | (substitute* '("multipathd/main.c" |
| 3565 | "libmultipath/debug.c") |
| 3566 | (("#include \"../third-party/") |
| 3567 | "#include \"")) |
| 3568 | #t)))) |
| 3569 | (build-system gnu-build-system) |
| 3570 | (arguments |
| 3571 | '(#:tests? #f ; no tests |
| 3572 | #:make-flags (list "CC=gcc" |
| 3573 | (string-append "DESTDIR=" |
| 3574 | (assoc-ref %outputs "out")) |
| 3575 | "SYSTEMDPATH=lib" |
| 3576 | ;; Add the libaio headers to GCCs system header |
| 3577 | ;; search path to suppress -Werror=cast-qual on |
| 3578 | ;; the included headers. |
| 3579 | (string-append "C_INCLUDE_PATH=" |
| 3580 | (assoc-ref %build-inputs "libaio") |
| 3581 | "/include") |
| 3582 | (string-append "LDFLAGS=-Wl,-rpath=" |
| 3583 | (assoc-ref %outputs "out") |
| 3584 | "/lib")) |
| 3585 | #:phases |
| 3586 | (modify-phases %standard-phases |
| 3587 | (add-after 'unpack 'patch-source |
| 3588 | (lambda* (#:key inputs #:allow-other-keys) |
| 3589 | (let ((lvm2 (assoc-ref inputs "lvm2")) |
| 3590 | (udev (assoc-ref inputs "udev"))) |
| 3591 | (substitute* "Makefile.inc" |
| 3592 | (("\\$\\(prefix\\)/usr") "$(prefix)") |
| 3593 | ;; Do not save timestamp to avoid gzip "timestamp |
| 3594 | ;; out-of-range" warnings. |
| 3595 | (("gzip -9") "gzip -9n")) |
| 3596 | (substitute* '("kpartx/Makefile" "libmultipath/Makefile") |
| 3597 | (("/usr/include/libdevmapper.h") |
| 3598 | (string-append lvm2 "/include/libdevmapper.h")) |
| 3599 | (("/usr/include/libudev.h") |
| 3600 | (string-append udev "/include/libudev.h"))) |
| 3601 | #t))) |
| 3602 | (delete 'configure)))) ; no configure script |
| 3603 | (native-inputs |
| 3604 | `(("perl" ,perl) |
| 3605 | ("pkg-config" ,pkg-config) |
| 3606 | ("valgrind" ,valgrind))) |
| 3607 | (inputs |
| 3608 | `(("json-c" ,json-c) |
| 3609 | ("libaio" ,libaio) |
| 3610 | ("liburcu" ,liburcu) |
| 3611 | ("lvm2" ,lvm2) |
| 3612 | ("readline" ,readline) |
| 3613 | ("udev" ,eudev))) |
| 3614 | (home-page "http://christophe.varoqui.free.fr/") |
| 3615 | (synopsis "Access block devices through multiple paths") |
| 3616 | (description |
| 3617 | "This package provides the following binaries to drive the |
| 3618 | Linux Device Mapper multipathing driver: |
| 3619 | @enumerate |
| 3620 | @item @command{multipath} - Device mapper target autoconfig. |
| 3621 | @item @command{multipathd} - Multipath daemon. |
| 3622 | @item @command{mpathpersist} - Manages SCSI persistent reservations on |
| 3623 | @code{dm} multipath devices. |
| 3624 | @item @command{kpartx} - Create device maps from partition tables. |
| 3625 | @end enumerate") |
| 3626 | (license (list license:gpl2+ ; main distribution |
| 3627 | license:lgpl2.0+)))) ; libmpathcmd/mpath_cmd.h |
| 3628 | |
| 3629 | (define-public libaio |
| 3630 | (package |
| 3631 | (name "libaio") |
| 3632 | (version "0.3.111") |
| 3633 | (source (origin |
| 3634 | (method url-fetch) |
| 3635 | (uri (list |
| 3636 | (string-append "https://releases.pagure.org/libaio/" |
| 3637 | name "-" version ".tar.gz"))) |
| 3638 | (sha256 |
| 3639 | (base32 |
| 3640 | "0ajhzbqjwsmz51gwccfyw6w9k4j4gmxcl2ph30sfn2gxv0d8gkv2")))) |
| 3641 | (build-system gnu-build-system) |
| 3642 | (arguments |
| 3643 | '(#:make-flags |
| 3644 | (list "CC=gcc" (string-append "prefix=" %output)) |
| 3645 | #:test-target "partcheck" ; need root for a full 'check' |
| 3646 | #:phases |
| 3647 | (modify-phases %standard-phases (delete 'configure)))) ; no configure script |
| 3648 | (home-page "https://pagure.io/libaio") |
| 3649 | (synopsis "Linux-native asynchronous I/O access library") |
| 3650 | (description |
| 3651 | "This library enables userspace to use Linux kernel asynchronous I/O |
| 3652 | system calls, important for the performance of databases and other advanced |
| 3653 | applications.") |
| 3654 | (license license:lgpl2.1+))) |
| 3655 | |
| 3656 | (define-public sbc |
| 3657 | (package |
| 3658 | (name "sbc") |
| 3659 | (version "1.4") |
| 3660 | (source (origin |
| 3661 | (method url-fetch) |
| 3662 | (uri (string-append "mirror://kernel.org/linux/bluetooth/sbc-" |
| 3663 | version ".tar.xz")) |
| 3664 | (sha256 |
| 3665 | (base32 |
| 3666 | "1jal98pnrjkzxlkiqy0ykh4qmgnydz9bmsp1jn581p5kddpg92si")))) |
| 3667 | (build-system gnu-build-system) |
| 3668 | (inputs |
| 3669 | `(("libsndfile" ,libsndfile))) |
| 3670 | (native-inputs |
| 3671 | `(("pkg-config" ,pkg-config))) |
| 3672 | (home-page "https://www.kernel.org/pub/linux/bluetooth/") |
| 3673 | (synopsis "Bluetooth subband audio codec") |
| 3674 | (description |
| 3675 | "The SBC is a digital audio encoder and decoder used to transfer data to |
| 3676 | Bluetooth audio output devices like headphones or loudspeakers.") |
| 3677 | (license license:gpl2+))) |
| 3678 | |
| 3679 | (define-public bluez |
| 3680 | (package |
| 3681 | (name "bluez") |
| 3682 | (version "5.50") |
| 3683 | (source (origin |
| 3684 | (method url-fetch) |
| 3685 | (uri (string-append |
| 3686 | "mirror://kernel.org/linux/bluetooth/bluez-" |
| 3687 | version ".tar.xz")) |
| 3688 | (sha256 |
| 3689 | (base32 |
| 3690 | "048r91vx9gs5nwwbah2s0xig04nwk14c5s0vb7qmaqdvighsmz2z")))) |
| 3691 | (build-system gnu-build-system) |
| 3692 | (arguments |
| 3693 | `(#:configure-flags |
| 3694 | (let ((out (assoc-ref %outputs "out"))) |
| 3695 | (list "--sysconfdir=/etc" |
| 3696 | "--localstatedir=/var" |
| 3697 | "--enable-library" |
| 3698 | "--disable-systemd" |
| 3699 | ;; Install dbus/udev files to the correct location. |
| 3700 | (string-append "--with-dbusconfdir=" out "/etc") |
| 3701 | (string-append "--with-udevdir=" out "/lib/udev"))) |
| 3702 | #:phases |
| 3703 | (modify-phases %standard-phases |
| 3704 | ;; Test unit/test-gatt fails unpredictably. Seems to be a timing |
| 3705 | ;; issue (discussion on upstream mailing list: |
| 3706 | ;; https://marc.info/?t=149578476300002&r=1&w=2) |
| 3707 | (add-before 'check 'skip-wonky-test |
| 3708 | (lambda _ |
| 3709 | (substitute* "unit/test-gatt.c" |
| 3710 | (("tester_init\\(&argc, &argv\\);") "return 77;")) |
| 3711 | #t)) |
| 3712 | (add-after 'install 'post-install |
| 3713 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 3714 | (let* ((out (assoc-ref outputs "out")) |
| 3715 | (servicedir (string-append out "/share/dbus-1/services")) |
| 3716 | (service "obexd/src/org.bluez.obex.service") |
| 3717 | (rule (string-append |
| 3718 | out "/lib/udev/rules.d/97-hid2hci.rules"))) |
| 3719 | ;; Install the obex dbus service file. |
| 3720 | (substitute* service |
| 3721 | (("/bin/false") |
| 3722 | (string-append out "/libexec/bluetooth/obexd"))) |
| 3723 | (install-file service servicedir) |
| 3724 | ;; Fix paths in the udev rule. |
| 3725 | (substitute* rule |
| 3726 | (("hid2hci --method") |
| 3727 | (string-append out "/lib/udev/hid2hci --method")) |
| 3728 | (("/sbin/udevadm") |
| 3729 | (string-append (assoc-ref inputs "eudev") "/bin/udevadm"))) |
| 3730 | #t)))))) |
| 3731 | (native-inputs |
| 3732 | `(("pkg-config" ,pkg-config) |
| 3733 | ("gettext" ,gettext-minimal))) |
| 3734 | (inputs |
| 3735 | `(("glib" ,glib) |
| 3736 | ("dbus" ,dbus) |
| 3737 | ("eudev" ,eudev) |
| 3738 | ("libical" ,libical) |
| 3739 | ("readline" ,readline))) |
| 3740 | (home-page "http://www.bluez.org/") |
| 3741 | (synopsis "Linux Bluetooth protocol stack") |
| 3742 | (description |
| 3743 | "BlueZ provides support for the core Bluetooth layers and protocols. It |
| 3744 | is flexible, efficient and uses a modular implementation.") |
| 3745 | (license license:gpl2+))) |
| 3746 | |
| 3747 | (define-public fuse-exfat |
| 3748 | (package |
| 3749 | (name "fuse-exfat") |
| 3750 | (version "1.3.0") |
| 3751 | (source (origin |
| 3752 | (method url-fetch) |
| 3753 | (uri (string-append |
| 3754 | "https://github.com/relan/exfat/releases/download/v" |
| 3755 | version "/" name "-" version ".tar.gz")) |
| 3756 | (sha256 |
| 3757 | (base32 |
| 3758 | "1lz00q8g4590mrdqmf13ba1s9zrqq645ymgm5p9y99ad0qv22r87")))) |
| 3759 | (build-system gnu-build-system) |
| 3760 | (native-inputs |
| 3761 | `(("pkg-config" ,pkg-config))) |
| 3762 | (inputs |
| 3763 | `(("fuse" ,fuse))) |
| 3764 | (home-page "https://github.com/relan/exfat") |
| 3765 | (synopsis "Mount exFAT file systems") |
| 3766 | (description |
| 3767 | "This package provides a FUSE-based file system that provides read and |
| 3768 | write access to exFAT devices.") |
| 3769 | (license license:gpl2+))) |
| 3770 | |
| 3771 | (define-public fuseiso |
| 3772 | (package |
| 3773 | (name "fuseiso") |
| 3774 | (version "20070708") |
| 3775 | (source (origin |
| 3776 | (method url-fetch) |
| 3777 | (uri (string-append "mirror://sourceforge/fuseiso/fuseiso/" |
| 3778 | version "/fuseiso-" version ".tar.bz2")) |
| 3779 | (sha256 |
| 3780 | (base32 |
| 3781 | "127xql52dcdhmh7s5m9xc6q39jdlj3zhbjar1j821kb6gl3jw94b")))) |
| 3782 | (build-system gnu-build-system) |
| 3783 | (native-inputs |
| 3784 | `(("pkg-config" ,pkg-config))) |
| 3785 | (inputs |
| 3786 | `(("fuse" ,fuse) |
| 3787 | ("glib" ,glib) |
| 3788 | ("zlib" ,zlib))) |
| 3789 | (home-page "https://sourceforge.net/projects/fuseiso/") |
| 3790 | (synopsis "Mount ISO file system images") |
| 3791 | (description |
| 3792 | "FuseISO is a FUSE module to mount ISO file system images (.iso, .nrg, |
| 3793 | .bin, .mdf and .img files). It supports plain ISO9660 Level 1 and 2, Rock |
| 3794 | Ridge, Joliet, and zisofs.") |
| 3795 | (license license:gpl2))) |
| 3796 | |
| 3797 | (define-public gpm |
| 3798 | (package |
| 3799 | (name "gpm") |
| 3800 | (version "1.20.7") |
| 3801 | (source (origin |
| 3802 | (method url-fetch) |
| 3803 | (uri (string-append |
| 3804 | "http://www.nico.schottelius.org/software/gpm/archives/gpm-" |
| 3805 | version ".tar.bz2")) |
| 3806 | (patches (search-patches "gpm-glibc-2.26.patch")) |
| 3807 | (sha256 |
| 3808 | (base32 |
| 3809 | "13d426a8h403ckpc8zyf7s2p5rql0lqbg2bv0454x0pvgbfbf4gh")))) |
| 3810 | (build-system gnu-build-system) |
| 3811 | (arguments |
| 3812 | '(#:phases (modify-phases %standard-phases |
| 3813 | (replace 'bootstrap |
| 3814 | (lambda _ |
| 3815 | ;; The tarball was not generated with 'make dist' so we |
| 3816 | ;; need to bootstrap things ourselves. |
| 3817 | (substitute* "autogen.sh" |
| 3818 | (("/bin/sh") (which "sh"))) |
| 3819 | (invoke "./autogen.sh") |
| 3820 | (patch-makefile-SHELL "Makefile.include.in") |
| 3821 | #t))) |
| 3822 | |
| 3823 | ;; Make sure programs find libgpm.so. |
| 3824 | #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath=" |
| 3825 | (assoc-ref %outputs "out") |
| 3826 | "/lib")))) |
| 3827 | (native-inputs |
| 3828 | `(("texinfo" ,texinfo) |
| 3829 | ("bison" ,bison) |
| 3830 | ("flex" ,flex) |
| 3831 | ("autoconf" ,autoconf) |
| 3832 | ("automake" ,automake) |
| 3833 | ("libtool" ,libtool))) |
| 3834 | (home-page "http://www.nico.schottelius.org/software/gpm/") |
| 3835 | (synopsis "Mouse support for the Linux console") |
| 3836 | (description |
| 3837 | "The GPM (general-purpose mouse) daemon is a mouse server for |
| 3838 | applications running on the Linux console. It allows users to select items |
| 3839 | and copy/paste text in the console and in xterm.") |
| 3840 | (license license:gpl2+))) |
| 3841 | |
| 3842 | (define-public btrfs-progs |
| 3843 | (package |
| 3844 | (name "btrfs-progs") |
| 3845 | (version "5.2.2") |
| 3846 | (source (origin |
| 3847 | (method url-fetch) |
| 3848 | (uri (string-append "mirror://kernel.org/linux/kernel/" |
| 3849 | "people/kdave/btrfs-progs/" |
| 3850 | "btrfs-progs-v" version ".tar.xz")) |
| 3851 | (sha256 |
| 3852 | (base32 |
| 3853 | "1imivxjppi8zl27gn472pwpk8bg5dijkbyi340by31vhy7dj24w2")))) |
| 3854 | (build-system gnu-build-system) |
| 3855 | (outputs '("out" |
| 3856 | "static")) ; static versions of the binaries in "out" |
| 3857 | (arguments |
| 3858 | '(#:phases (modify-phases %standard-phases |
| 3859 | (add-after 'build 'build-static |
| 3860 | (lambda _ (invoke "make" "static"))) |
| 3861 | (add-after 'install 'install-bash-completion |
| 3862 | (lambda* (#:key outputs #:allow-other-keys) |
| 3863 | (let* ((out (assoc-ref outputs "out")) |
| 3864 | (bashcomp (string-append out "/etc/bash_completion.d"))) |
| 3865 | (mkdir-p bashcomp) |
| 3866 | (copy-file "btrfs-completion" |
| 3867 | (string-append bashcomp "/btrfs")) |
| 3868 | #t))) |
| 3869 | (add-after 'install 'install-static |
| 3870 | (let ((staticbin (string-append (assoc-ref %outputs "static") |
| 3871 | "/bin"))) |
| 3872 | (lambda _ |
| 3873 | (invoke "make" |
| 3874 | (string-append "bindir=" staticbin) |
| 3875 | "install-static"))))) |
| 3876 | #:tests? #f ; XXX: require the 'btrfs' kernel module. |
| 3877 | #:test-target "test" |
| 3878 | #:parallel-tests? #f)) ; tests fail when run in parallel |
| 3879 | (inputs `(("e2fsprogs" ,e2fsprogs) |
| 3880 | ("libblkid" ,util-linux) |
| 3881 | ("libblkid:static" ,util-linux "static") |
| 3882 | ("libuuid" ,util-linux) |
| 3883 | ("libuuid:static" ,util-linux "static") |
| 3884 | ("lzo" ,lzo) |
| 3885 | ("zlib" ,zlib) |
| 3886 | ("zlib:static" ,zlib "static") |
| 3887 | ("zstd" ,zstd "lib") |
| 3888 | ("zstd:static" ,zstd "static"))) |
| 3889 | (native-inputs `(("pkg-config" ,pkg-config) |
| 3890 | ("asciidoc" ,asciidoc) |
| 3891 | ("python" ,python) |
| 3892 | ("xmlto" ,xmlto) |
| 3893 | ;; For building documentation. |
| 3894 | ("libxml2" ,libxml2) |
| 3895 | ("docbook-xsl" ,docbook-xsl) |
| 3896 | ;; For tests. |
| 3897 | ("acl" ,acl) |
| 3898 | ("which" ,which) |
| 3899 | ;; The tests need 'grep' with perl regexp support. |
| 3900 | ("grep" ,grep))) |
| 3901 | (home-page "https://btrfs.wiki.kernel.org/index.php/Main_Page") |
| 3902 | (synopsis "Create and manage btrfs copy-on-write file systems") |
| 3903 | (description "Btrfs is a @dfn{copy-on-write} (CoW) file system for Linux |
| 3904 | aimed at implementing advanced features while focusing on fault tolerance, |
| 3905 | repair and easy administration.") |
| 3906 | ;; GPL2+: crc32.c, radix-tree.c, raid6.c, rbtree.c. |
| 3907 | ;; GPL2: Everything else. |
| 3908 | (license (list license:gpl2 license:gpl2+)))) |
| 3909 | |
| 3910 | (define-public btrfs-progs/static |
| 3911 | (package |
| 3912 | (name "btrfs-progs-static") |
| 3913 | (version (package-version btrfs-progs)) |
| 3914 | (source #f) |
| 3915 | (build-system trivial-build-system) |
| 3916 | (inputs |
| 3917 | `(("btrfs-progs:static" ,btrfs-progs "static"))) |
| 3918 | (arguments |
| 3919 | `(#:modules ((guix build utils)) |
| 3920 | #:builder |
| 3921 | (begin |
| 3922 | (use-modules (guix build utils) |
| 3923 | (ice-9 ftw) |
| 3924 | (srfi srfi-26)) |
| 3925 | |
| 3926 | (let* ((btrfs (assoc-ref %build-inputs "btrfs-progs:static")) |
| 3927 | (out (assoc-ref %outputs "out")) |
| 3928 | (source (string-append btrfs "/bin/btrfs.static")) |
| 3929 | (target (string-append out "/bin/btrfs"))) |
| 3930 | (mkdir-p (dirname target)) |
| 3931 | (copy-file source target) |
| 3932 | (remove-store-references target) |
| 3933 | (chmod target #o555) |
| 3934 | #t)))) |
| 3935 | (home-page (package-home-page btrfs-progs)) |
| 3936 | (synopsis "Statically-linked btrfs command from btrfs-progs") |
| 3937 | (description "This package provides the statically-linked @command{btrfs} |
| 3938 | from the btrfs-progs package. It is meant to be used in initrds.") |
| 3939 | (license (package-license btrfs-progs)))) |
| 3940 | |
| 3941 | (define-public compsize |
| 3942 | (package |
| 3943 | (name "compsize") |
| 3944 | (version "1.3") |
| 3945 | (home-page "https://github.com/kilobyte/compsize") |
| 3946 | (source (origin |
| 3947 | (method git-fetch) |
| 3948 | (uri (git-reference |
| 3949 | (url home-page) |
| 3950 | (commit (string-append "v" version)))) |
| 3951 | (sha256 |
| 3952 | (base32 "1c69whla844nwis30jxbj00zkpiw3ccndhkmzjii8av5358mjn43")) |
| 3953 | (file-name (git-file-name name version)))) |
| 3954 | (build-system gnu-build-system) |
| 3955 | (inputs |
| 3956 | `(("btrfs-progs" ,btrfs-progs))) |
| 3957 | (arguments |
| 3958 | `(#:tests? #f ; No tests. |
| 3959 | #:make-flags (list "CC=gcc") |
| 3960 | #:phases |
| 3961 | (modify-phases %standard-phases |
| 3962 | (delete 'configure) |
| 3963 | (replace 'install |
| 3964 | (lambda* (#:key outputs #:allow-other-keys) |
| 3965 | (let ((out (assoc-ref outputs "out"))) |
| 3966 | (install-file "compsize" (string-append out "/bin")) |
| 3967 | (install-file "compsize.8" (string-append out "/share/man/man8")))))))) |
| 3968 | (synopsis "Find compression type/ratio on Btrfs files") |
| 3969 | (description "@command{compsize} takes a list of files (given as |
| 3970 | arguments) on a Btrfs file system and measures used compression types and |
| 3971 | effective compression ratio, producing a report. |
| 3972 | |
| 3973 | A directory has no extents but has a (recursive) list of files. A non-regular |
| 3974 | file is silently ignored. |
| 3975 | |
| 3976 | As it makes no sense to talk about compression ratio of a partial extent, |
| 3977 | every referenced extent is counted whole, exactly once -- no matter if you use |
| 3978 | only a few bytes of a 1GB extent or reflink it a thousand times. Thus, the |
| 3979 | uncompressed size will not match the number given by @command{tar} or |
| 3980 | @command{du}. On the other hand, the space used should be accurate (although |
| 3981 | obviously it can be shared with files outside our set).") |
| 3982 | (license license:gpl2+))) |
| 3983 | |
| 3984 | (define-public f2fs-tools-1.7 |
| 3985 | (package |
| 3986 | (name "f2fs-tools") |
| 3987 | (version "1.7.0") |
| 3988 | (source (origin |
| 3989 | (method url-fetch) |
| 3990 | (uri (string-append |
| 3991 | "https://git.kernel.org/cgit/linux/kernel/git/jaegeuk" |
| 3992 | "/f2fs-tools.git/snapshot/f2fs-tools-" version ".tar.gz")) |
| 3993 | (sha256 |
| 3994 | (base32 |
| 3995 | "1m6bn1ibq0p53m0n97il91xqgjgn2pzlz74lb5bfzassx7159m1k")))) |
| 3996 | |
| 3997 | (build-system gnu-build-system) |
| 3998 | (arguments |
| 3999 | `(#:phases |
| 4000 | (modify-phases %standard-phases |
| 4001 | (add-after 'install 'install-headers |
| 4002 | (lambda* (#:key outputs #:allow-other-keys) |
| 4003 | (let* ((out (assoc-ref outputs "out")) |
| 4004 | (out-include (string-append out "/include"))) |
| 4005 | (install-file "include/f2fs_fs.h" out-include) |
| 4006 | (install-file "mkfs/f2fs_format_utils.h" out-include) |
| 4007 | #t)))))) |
| 4008 | (native-inputs |
| 4009 | `(("autoconf" ,autoconf) |
| 4010 | ("automake" ,automake) |
| 4011 | ("libtool" ,libtool) |
| 4012 | ("pkg-config" ,pkg-config))) |
| 4013 | (inputs |
| 4014 | `(("libuuid" ,util-linux) |
| 4015 | ("libselinux" ,libselinux))) |
| 4016 | (home-page "https://f2fs.wiki.kernel.org/") |
| 4017 | (synopsis "Userland tools for f2fs") |
| 4018 | (description |
| 4019 | "F2FS, the Flash-Friendly File System, is a modern file system |
| 4020 | designed to be fast and durable on flash devices such as solid-state |
| 4021 | disks and SD cards. This package provides the userland utilities.") |
| 4022 | ;; The formatting utility, libf2fs and include/f2fs_fs.h is dual |
| 4023 | ;; GPL2/LGPL2.1, everything else is GPL2 only. See 'COPYING'. |
| 4024 | (license (list license:gpl2 license:lgpl2.1)))) |
| 4025 | |
| 4026 | (define-public f2fs-tools |
| 4027 | (package |
| 4028 | (inherit f2fs-tools-1.7) |
| 4029 | (name "f2fs-tools") |
| 4030 | (version "1.12.0") |
| 4031 | (source (origin |
| 4032 | (method url-fetch) |
| 4033 | (uri (string-append |
| 4034 | "https://git.kernel.org/cgit/linux/kernel/git/jaegeuk" |
| 4035 | "/f2fs-tools.git/snapshot/f2fs-tools-" version ".tar.gz")) |
| 4036 | (sha256 |
| 4037 | (base32 |
| 4038 | "15pn2fm9knn7p1vzfzy6msnrdl14p6y1gn4m2ka6ba5bzx6lw4p2")))) |
| 4039 | (inputs |
| 4040 | `(("libuuid" ,util-linux))))) |
| 4041 | |
| 4042 | (define-public freefall |
| 4043 | (package |
| 4044 | (name "freefall") |
| 4045 | (version (package-version linux-libre)) |
| 4046 | (source (package-source linux-libre)) |
| 4047 | (build-system gnu-build-system) |
| 4048 | (arguments |
| 4049 | '(#:phases (modify-phases %standard-phases |
| 4050 | (add-after 'unpack 'enter-subdirectory |
| 4051 | (lambda _ |
| 4052 | (chdir "tools/laptop/freefall") |
| 4053 | #t)) |
| 4054 | (delete 'configure) |
| 4055 | (add-before 'build 'increase-timeout |
| 4056 | (lambda _ |
| 4057 | ;; The default of 2 seconds is too low: it assumes an |
| 4058 | ;; open lid and AC power without actually checking. |
| 4059 | (substitute* "freefall.c" |
| 4060 | (("alarm\\(2\\)") "alarm(5)")) |
| 4061 | #t))) |
| 4062 | #:make-flags (list (string-append "PREFIX=" |
| 4063 | (assoc-ref %outputs "out")) |
| 4064 | "CC=gcc") |
| 4065 | #:tests? #f)) ;no tests |
| 4066 | (home-page (package-home-page linux-libre)) |
| 4067 | (synopsis "Free-fall protection for spinning laptop hard drives") |
| 4068 | (description |
| 4069 | "Prevents shock damage to the internal spinning hard drive(s) of some |
| 4070 | HP and Dell laptops. When sudden movement is detected, all input/output |
| 4071 | operations on the drive are suspended and its heads are parked on the ramp, |
| 4072 | where they are less likely to cause damage to the spinning disc. Requires a |
| 4073 | drive that supports the ATA/ATAPI-7 IDLE IMMEDIATE command with unload |
| 4074 | feature, and a laptop with an accelerometer. It has no effect on SSDs.") |
| 4075 | (license license:gpl2))) |
| 4076 | |
| 4077 | (define-public thinkfan |
| 4078 | (package |
| 4079 | (name "thinkfan") |
| 4080 | (version "1.0.2") |
| 4081 | (source |
| 4082 | (origin |
| 4083 | (method git-fetch) |
| 4084 | (uri (git-reference |
| 4085 | (url "https://github.com/vmatare/thinkfan.git") |
| 4086 | (commit version))) |
| 4087 | (file-name (git-file-name name version)) |
| 4088 | (sha256 |
| 4089 | (base32 "107vw0962hrwva3wra9n3hxlbfzg82ldc10qssv3dspja88g8psr")))) |
| 4090 | (build-system cmake-build-system) |
| 4091 | (arguments |
| 4092 | `(#:modules ((guix build cmake-build-system) |
| 4093 | (guix build utils) |
| 4094 | (srfi srfi-26)) |
| 4095 | #:tests? #f ; no test target |
| 4096 | #:configure-flags |
| 4097 | ;; Enable reading temperatures from hard disks via S.M.A.R.T. |
| 4098 | ;; Upstream ‘defaults to OFF because libatasmart seems to be horribly |
| 4099 | ;; inefficient’. |
| 4100 | `("-DUSE_ATASMART:BOOL=ON") |
| 4101 | #:phases |
| 4102 | (modify-phases %standard-phases |
| 4103 | (add-after 'unpack 'create-init-scripts |
| 4104 | ;; CMakeLists.txt relies on build-time symptoms of OpenRC and |
| 4105 | ;; systemd to patch and install their service files. Fake their |
| 4106 | ;; presence rather than duplicating the build system below. Leave |
| 4107 | ;; things like ‘/bin/kill’ because they're not worth a dependency. |
| 4108 | ;; The sysvinit needs manual patching, but since upstream doesn't |
| 4109 | ;; even provide the option to install it: don't. |
| 4110 | (lambda* (#:key outputs #:allow-other-keys) |
| 4111 | (let* ((out (assoc-ref outputs "out")) |
| 4112 | (share (string-append out "/share/" ,name))) |
| 4113 | (substitute* "CMakeLists.txt" |
| 4114 | (("pkg_check_modules\\((OPENRC|SYSTEMD) .*" _ package) |
| 4115 | (format "option(~a_FOUND \"Faked\" ON)\n" package)) |
| 4116 | ;; That was easy! Now we just need to fix the destinations. |
| 4117 | (("/etc" directory) |
| 4118 | (string-append out directory))) |
| 4119 | #t)))))) |
| 4120 | (native-inputs |
| 4121 | `(("pkg-config" ,pkg-config))) |
| 4122 | (inputs |
| 4123 | `(("libatasmart" ,libatasmart) |
| 4124 | ("yaml-cpp" ,yaml-cpp))) |
| 4125 | (home-page "http://thinkfan.sourceforge.net/") |
| 4126 | (synopsis "Simple fan control program") |
| 4127 | (description |
| 4128 | "Thinkfan is a simple fan control program. It reads temperatures, |
| 4129 | checks them against configured limits and switches to appropriate (also |
| 4130 | pre-configured) fan level. It requires a working @code{thinkpad_acpi} or any |
| 4131 | other @code{hwmon} driver that enables temperature reading and fan control |
| 4132 | from userspace.") |
| 4133 | (license license:gpl3+))) |
| 4134 | |
| 4135 | (define-public tpacpi-bat |
| 4136 | (package |
| 4137 | (name "tpacpi-bat") |
| 4138 | (version "3.1") |
| 4139 | (source |
| 4140 | (origin |
| 4141 | (method git-fetch) |
| 4142 | (uri (git-reference |
| 4143 | (url "https://github.com/teleshoes/tpacpi-bat.git") |
| 4144 | (commit (string-append "v" version)))) |
| 4145 | (file-name (git-file-name name version)) |
| 4146 | (sha256 |
| 4147 | (base32 "0wbaz34z99gqx721alh5vmpxpj2yxg3x9m8jqyivfi1wfpwc2nd5")))) |
| 4148 | (build-system gnu-build-system) |
| 4149 | (arguments |
| 4150 | `(#:tests? #f ; no test target |
| 4151 | #:phases |
| 4152 | (modify-phases %standard-phases |
| 4153 | (add-after 'unpack 'refer-to-inputs |
| 4154 | (lambda _ |
| 4155 | (substitute* "tpacpi-bat" |
| 4156 | (("cat ") |
| 4157 | (format "~a " (which "cat"))) |
| 4158 | ;; tpacpi-bat modprobes the acpi_call kernel module if it's not |
| 4159 | ;; loaded. That's the administrator's prerogative; disable it. |
| 4160 | (("system \"(modprobe .*)\"" _ match) |
| 4161 | (format "die \"Please run ‘~a’ first.\\n\"" match))) |
| 4162 | #t)) |
| 4163 | (delete 'configure) ; nothing to configure |
| 4164 | (delete 'build) ; nothing to build |
| 4165 | (replace 'install |
| 4166 | (lambda* (#:key outputs #:allow-other-keys) |
| 4167 | (let* ((out (assoc-ref outputs "out")) |
| 4168 | (bin (string-append out "/bin")) |
| 4169 | (doc (string-append out "/share/doc/" ,name "-" ,version))) |
| 4170 | (install-file "tpacpi-bat" bin) |
| 4171 | |
| 4172 | ;; There's no man page. Install other forms of documentation. |
| 4173 | (for-each (lambda (file) |
| 4174 | (let ((target (string-append doc "/" file))) |
| 4175 | (mkdir-p (dirname target)) |
| 4176 | (copy-recursively file target))) |
| 4177 | (list "battery_asl" "examples" "README.md")) |
| 4178 | #t)))))) |
| 4179 | (inputs |
| 4180 | `(("perl" ,perl))) |
| 4181 | (home-page "https://github.com/teleshoes/tpacpi-bat") |
| 4182 | (synopsis "ThinkPad battery charge controller") |
| 4183 | (description |
| 4184 | "Tpacpi-bat is a command-line interface to control battery charging on |
| 4185 | @uref{https://github.com/teleshoes/tpacpi-bat/wiki/Supported-Hardware, Lenovo |
| 4186 | ThinkPad models released after 2011}, starting with the xx20 series. It can |
| 4187 | query and set the thresholds at which one or both batteries will start and stop |
| 4188 | charging, inhibit charging batteries for a set period of time, or force them to |
| 4189 | discharge when they otherwise would not. |
| 4190 | |
| 4191 | This tool merely exposes ACPI calls provided by the @code{acpi_call} Linux |
| 4192 | kernel module provided by the @code{acpi-call-linux-module} package, which must |
| 4193 | be installed and loaded separately. Only the original vendor firmware is |
| 4194 | supported.") |
| 4195 | (license license:gpl3+))) |
| 4196 | |
| 4197 | (define-public ntfs-3g |
| 4198 | (package |
| 4199 | (name "ntfs-3g") |
| 4200 | (version "2017.3.23") |
| 4201 | (source (origin |
| 4202 | (method url-fetch) |
| 4203 | (uri (string-append "https://tuxera.com/opensource/" |
| 4204 | "ntfs-3g_ntfsprogs-" version ".tgz")) |
| 4205 | (patches (search-patches "ntfs-3g-CVE-2019-9755.patch")) |
| 4206 | (sha256 |
| 4207 | (base32 |
| 4208 | "1mb228p80hv97pgk3myyvgp975r9mxq56c6bdn1n24kngcfh4niy")) |
| 4209 | (modules '((guix build utils))) |
| 4210 | (snippet '(begin |
| 4211 | ;; Install under $prefix. |
| 4212 | (substitute* '("src/Makefile.in" "ntfsprogs/Makefile.in") |
| 4213 | (("/sbin") |
| 4214 | "@sbindir@")) |
| 4215 | #t)))) |
| 4216 | (build-system gnu-build-system) |
| 4217 | (inputs `(("util-linux" ,util-linux) |
| 4218 | ("fuse" ,fuse))) ;libuuid |
| 4219 | (native-inputs `(("pkg-config" ,pkg-config))) |
| 4220 | (arguments |
| 4221 | '(#:configure-flags (list "--exec-prefix=${prefix}" |
| 4222 | "--with-fuse=external" ;use our own FUSE |
| 4223 | "--enable-mount-helper" |
| 4224 | "--enable-posix-acls" |
| 4225 | "--enable-xattr-mappings") |
| 4226 | #:phases |
| 4227 | (modify-phases %standard-phases |
| 4228 | ;; If users install ntfs-3g, they probably want to make it the |
| 4229 | ;; default driver as well, so we opt for sensible defaults and link |
| 4230 | ;; mount.ntfs to mount.ntfs-3g. (libmount tries to run mount.ntfs to |
| 4231 | ;; mount NTFS file systems.) |
| 4232 | (add-after 'install 'install-link |
| 4233 | (lambda* (#:key outputs #:allow-other-keys) |
| 4234 | (let* ((out (assoc-ref outputs "out")) |
| 4235 | (sbin (string-append out "/sbin"))) |
| 4236 | (symlink "mount.ntfs-3g" |
| 4237 | (string-append sbin "/mount.ntfs"))) |
| 4238 | #t))))) |
| 4239 | (home-page "https://www.tuxera.com/community/open-source-ntfs-3g/") |
| 4240 | (synopsis "Read-write access to NTFS file systems") |
| 4241 | (description |
| 4242 | "NTFS-3G provides read-write access to NTFS file systems, which are |
| 4243 | commonly found on Microsoft Windows. It is implemented as a FUSE file system. |
| 4244 | The package provides additional NTFS tools.") |
| 4245 | (license license:gpl2+))) |
| 4246 | |
| 4247 | (define-public rdma-core |
| 4248 | (package |
| 4249 | (name "rdma-core") |
| 4250 | (version "22.3") |
| 4251 | (source (origin |
| 4252 | (method url-fetch) |
| 4253 | (uri (string-append "https://github.com/linux-rdma/rdma-core" |
| 4254 | "/releases/download/v" version "/rdma-core-" |
| 4255 | version ".tar.gz")) |
| 4256 | (sha256 |
| 4257 | (base32 |
| 4258 | "0jgp1xh328x0kr6lkn4vq71cc627zd05wczr74b3j3151flhj828")))) |
| 4259 | (build-system cmake-build-system) |
| 4260 | (arguments |
| 4261 | '(#:tests? #f ; no tests |
| 4262 | ;; Upstream uses the "ninja" build system and encourage distros |
| 4263 | ;; to do the same for consistency. They also recommend using the |
| 4264 | ;; "Release" build type. |
| 4265 | #:build-type "Release" |
| 4266 | #:configure-flags (list "-GNinja") |
| 4267 | #:phases |
| 4268 | (modify-phases %standard-phases |
| 4269 | (replace 'build |
| 4270 | (lambda _ |
| 4271 | (invoke "ninja" |
| 4272 | "-j" (number->string (parallel-job-count))))) |
| 4273 | (replace 'install |
| 4274 | (lambda _ |
| 4275 | (invoke "ninja" "install")))))) |
| 4276 | (native-inputs |
| 4277 | `(("ninja" ,ninja) |
| 4278 | ("pkg-config" ,pkg-config) |
| 4279 | ("python" ,python-wrapper))) |
| 4280 | (inputs |
| 4281 | `(("libnl" ,libnl) |
| 4282 | ("udev" ,eudev))) |
| 4283 | (home-page "https://github.com/linux-rdma/rdma-core") |
| 4284 | (synopsis "Utilities and libraries for working with RDMA devices") |
| 4285 | (description |
| 4286 | "This package provides userspace components for the InfiniBand |
| 4287 | subsystem of the Linux kernel. Specifically it contains userspace |
| 4288 | libraries for the following device nodes: |
| 4289 | |
| 4290 | @enumerate |
| 4291 | @item @file{/dev/infiniband/uverbsX} (@code{libibverbs}) |
| 4292 | @item @file{/dev/infiniband/rdma_cm} (@code{librdmacm}) |
| 4293 | @item @file{/dev/infiniband/umadX} (@code{libibumad}) |
| 4294 | @end enumerate |
| 4295 | |
| 4296 | The following service daemons are also provided: |
| 4297 | @enumerate |
| 4298 | @item @code{srp_daemon} (for the @code{ib_srp} kernel module) |
| 4299 | @item @code{iwpmd} (for iWARP kernel providers) |
| 4300 | @item @code{ibacm} (for InfiniBand communication management assistant) |
| 4301 | @end enumerate") |
| 4302 | ;; All library code is dual licensed under GPL2 and a custom MIT |
| 4303 | ;; variant. The package also includes some components covered by |
| 4304 | ;; other licenses. Consult COPYING.md for full details. |
| 4305 | (license |
| 4306 | (list license:gpl2 |
| 4307 | (license:x11-style "See COPYING.BSD_MIT in the distribution") |
| 4308 | license:bsd-2 ; Files referring to COPYING.BSD_FB |
| 4309 | license:cc0 ; most files in ccan/ |
| 4310 | license:bsd-3)))) ; providers/hfi1verbs are dual GPL2/BSD-3 |
| 4311 | |
| 4312 | (define-public perftest |
| 4313 | (package |
| 4314 | (name "perftest") |
| 4315 | (version "4.4-0.4") |
| 4316 | (source |
| 4317 | (origin |
| 4318 | (method url-fetch) |
| 4319 | (uri (string-append "https://github.com/linux-rdma/perftest/releases/download/v" |
| 4320 | version "/perftest-" version ".g0927198.tar.gz")) |
| 4321 | (sha256 |
| 4322 | (base32 "11ix4h0rrmqqyi84y55a9xnkvwsmwq0sywr46hvxzm4rqz4ma8vq")))) |
| 4323 | (build-system gnu-build-system) |
| 4324 | (arguments |
| 4325 | `(#:phases |
| 4326 | (modify-phases %standard-phases |
| 4327 | (add-after 'unpack 'patch-header-paths |
| 4328 | (lambda _ |
| 4329 | (substitute* '("src/raw_ethernet_fs_rate.c" |
| 4330 | "src/raw_ethernet_resources.c" |
| 4331 | "src/raw_ethernet_resources.h" |
| 4332 | "src/raw_ethernet_send_burst_lat.c" |
| 4333 | "src/raw_ethernet_send_bw.c" |
| 4334 | "src/raw_ethernet_send_lat.c") |
| 4335 | (("/usr/include/netinet/ip.h") "netinet/ip.h")) |
| 4336 | #t))))) |
| 4337 | (inputs `(("rdma-core" ,rdma-core))) |
| 4338 | (home-page "https://github.com/linux-rdma/perftest/") |
| 4339 | (synopsis "Open Fabrics Enterprise Distribution (OFED) Performance Tests") |
| 4340 | (description "This is a collection of tests written over uverbs intended for |
| 4341 | use as a performance micro-benchmark. The tests may be used for hardware or |
| 4342 | software tuning as well as for functional testing. |
| 4343 | |
| 4344 | The collection contains a set of bandwidth and latency benchmark such as: |
| 4345 | @enumerate |
| 4346 | @item Send - @code{ib_send_bw} and @code{ib_send_lat} |
| 4347 | @item RDMA Read - @code{ib_read_bw} and @code{ib_read_lat} |
| 4348 | @item RDMA Write - @code{ib_write_bw} and @code{ib_wriet_lat} |
| 4349 | @item RDMA Atomic - @code{ib_atomic_bw} and @code{ib_atomic_lat} |
| 4350 | @item Native Ethernet (when working with MOFED2) - @code{raw_ethernet_bw}, @code{raw_ethernet_lat} |
| 4351 | @end enumerate") |
| 4352 | (license license:gpl2))) |
| 4353 | |
| 4354 | (define-public rng-tools |
| 4355 | (package |
| 4356 | (name "rng-tools") |
| 4357 | (home-page "https://github.com/nhorman/rng-tools") |
| 4358 | (version "6.7") |
| 4359 | (source (origin |
| 4360 | (method git-fetch) |
| 4361 | (uri (git-reference (url home-page) |
| 4362 | (commit (string-append "v" version)))) |
| 4363 | (file-name (git-file-name name version)) |
| 4364 | (sha256 |
| 4365 | (base32 |
| 4366 | "19f75m6mzg8h7b4snzg7d6ypvkz6nq32lrpi9ja95gqz4wsd18a5")))) |
| 4367 | (build-system gnu-build-system) |
| 4368 | (arguments |
| 4369 | `(;; Avoid using OpenSSL, curl, and libxml2, reducing the closure by 166 MiB. |
| 4370 | #:configure-flags '("--without-nistbeacon" |
| 4371 | "--without-pkcs11"))) |
| 4372 | (native-inputs |
| 4373 | `(("autoconf" ,autoconf) |
| 4374 | ("automake" ,automake) |
| 4375 | ("pkg-config" ,pkg-config))) |
| 4376 | (inputs |
| 4377 | `(("libsysfs" ,sysfsutils))) |
| 4378 | (synopsis "Random number generator daemon") |
| 4379 | (description |
| 4380 | "Monitor a hardware random number generator, and supply entropy |
| 4381 | from that to the system kernel's @file{/dev/random} machinery.") |
| 4382 | ;; The source package is offered under the GPL2+, but the files |
| 4383 | ;; 'rngd_rdrand.c' and 'rdrand_asm.S' are only available under the GPL2. |
| 4384 | (license (list license:gpl2 license:gpl2+)))) |
| 4385 | |
| 4386 | (define-public cpupower |
| 4387 | (package |
| 4388 | (name "cpupower") |
| 4389 | (version (package-version linux-libre)) |
| 4390 | (source (package-source linux-libre)) |
| 4391 | (build-system gnu-build-system) |
| 4392 | (arguments |
| 4393 | '(#:phases (modify-phases %standard-phases |
| 4394 | (add-after 'unpack 'enter-subdirectory |
| 4395 | (lambda _ |
| 4396 | (chdir "tools/power/cpupower") |
| 4397 | #t)) |
| 4398 | (delete 'configure) |
| 4399 | (add-before 'build 'fix-makefiles |
| 4400 | (lambda _ |
| 4401 | (substitute* "Makefile" |
| 4402 | (("/usr/") "/") |
| 4403 | (("/bin/(install|pwd)" _ command) command)) |
| 4404 | (substitute* "bench/Makefile" |
| 4405 | (("\\$\\(CC\\) -o") "$(CC) $(LDFLAGS) -o")) |
| 4406 | #t))) |
| 4407 | #:make-flags (let ((out (assoc-ref %outputs "out"))) |
| 4408 | (list (string-append "DESTDIR=" out) |
| 4409 | (string-append "LDFLAGS=-Wl,-rpath=" out "/lib") |
| 4410 | "docdir=/share/doc/cpupower" |
| 4411 | "confdir=$(docdir)/examples" |
| 4412 | ;; The Makefile recommends the following changes |
| 4413 | "DEBUG=false" |
| 4414 | "PACKAGE_BUGREPORT=bug-guix@gnu.org")) |
| 4415 | #:tests? #f)) ;no tests |
| 4416 | (native-inputs `(("gettext" ,gettext-minimal))) |
| 4417 | (inputs `(("pciutils" ,pciutils))) |
| 4418 | (home-page (package-home-page linux-libre)) |
| 4419 | (synopsis "CPU frequency and voltage scaling tools for Linux") |
| 4420 | (description |
| 4421 | "cpupower is a set of user-space tools that use the cpufreq feature of the |
| 4422 | Linux kernel to retrieve and control processor features related to power saving, |
| 4423 | such as frequency and voltage scaling.") |
| 4424 | (license license:gpl2))) |
| 4425 | |
| 4426 | (define-public x86-energy-perf-policy |
| 4427 | (package |
| 4428 | (name "x86-energy-perf-policy") |
| 4429 | (version (package-version linux-libre)) |
| 4430 | (source (package-source linux-libre)) |
| 4431 | (build-system gnu-build-system) |
| 4432 | (arguments |
| 4433 | '(#:tests? #f |
| 4434 | #:phases |
| 4435 | (modify-phases %standard-phases |
| 4436 | (add-after 'unpack 'enter-subdirectory |
| 4437 | (lambda _ |
| 4438 | (chdir "tools/power/x86/x86_energy_perf_policy") |
| 4439 | #t)) |
| 4440 | (delete 'configure) |
| 4441 | (add-before 'build 'fix-makefile |
| 4442 | (lambda _ |
| 4443 | (substitute* "Makefile" (("/usr") "")) |
| 4444 | #t))) |
| 4445 | #:make-flags |
| 4446 | (let ((out (assoc-ref %outputs "out"))) |
| 4447 | (list (string-append "DESTDIR=" out) |
| 4448 | (string-append "LDFLAGS=-Wl,-rpath=" out "/lib"))))) |
| 4449 | (supported-systems '("i686-linux" "x86_64-linux")) |
| 4450 | (home-page (package-home-page linux-libre)) |
| 4451 | (synopsis "Display and update Intel-CPU energy-performance policy") |
| 4452 | (description |
| 4453 | "@command{x86_energy_perf_policy} displays and updates energy-performance |
| 4454 | policy settings specific to Intel Architecture Processors. Settings are |
| 4455 | accessed via Model Specific Register (MSR) updates, no matter if the Linux |
| 4456 | cpufreq sub-system is enabled or not.") |
| 4457 | (license license:gpl2))) |
| 4458 | |
| 4459 | (define-public haveged |
| 4460 | (package |
| 4461 | (name "haveged") |
| 4462 | (version "1.9.6") |
| 4463 | (source |
| 4464 | (origin |
| 4465 | (method git-fetch) |
| 4466 | (uri (git-reference |
| 4467 | (url "https://github.com/jirka-h/haveged.git") |
| 4468 | (commit (string-append "v" version)))) |
| 4469 | (file-name (git-file-name name version)) |
| 4470 | (sha256 |
| 4471 | (base32 "11kr19n2f87izsj341lv5amhd1wc2ckfmqr9pq5fxix8pkbs94rh")))) |
| 4472 | (build-system gnu-build-system) |
| 4473 | (home-page "https://www.issihosts.com/haveged") |
| 4474 | (synopsis "Entropy source for the Linux random number generator") |
| 4475 | (description |
| 4476 | "haveged generates an unpredictable stream of random numbers for use by |
| 4477 | Linux's @file{/dev/random} and @file{/dev/urandom} devices. The kernel's |
| 4478 | standard mechanisms for filling the entropy pool may not be sufficient for |
| 4479 | systems with high needs or limited user interaction, such as headless servers. |
| 4480 | |
| 4481 | @command{haveged} runs as a privileged daemon, harvesting randomness from the |
| 4482 | indirect effects of hardware events on hidden processor state using the |
| 4483 | @acronym{HAVEGE, HArdware Volatile Entropy Gathering and Expansion} algorithm. |
| 4484 | It tunes itself to its environment and provides the same built-in test suite |
| 4485 | for the output stream as used on certified hardware security devices. |
| 4486 | |
| 4487 | The quality of the randomness produced by this algorithm has not been proven. |
| 4488 | It is recommended to run it together with another entropy source like rngd, and |
| 4489 | not as a replacement for it.") |
| 4490 | (license (list (license:non-copyleft "file://nist/mconf.h") |
| 4491 | (license:non-copyleft "file://nist/packtest.c") |
| 4492 | license:public-domain ; nist/dfft.c |
| 4493 | license:gpl3+)))) ; everything else |
| 4494 | |
| 4495 | (define-public ecryptfs-utils |
| 4496 | (package |
| 4497 | (name "ecryptfs-utils") |
| 4498 | (version "111") |
| 4499 | (source |
| 4500 | (origin |
| 4501 | (method url-fetch) |
| 4502 | (uri (string-append "https://launchpad.net/ecryptfs/trunk/" |
| 4503 | version "/+download/ecryptfs-utils_" |
| 4504 | version ".orig.tar.gz")) |
| 4505 | (sha256 |
| 4506 | (base32 |
| 4507 | "0zwq19siiwf09h7lwa7n7mgmrr8cxifp45lmwgcfr8c1gviv6b0i")))) |
| 4508 | (build-system gnu-build-system) |
| 4509 | (arguments |
| 4510 | `(#:configure-flags (list "--disable-pywrap") |
| 4511 | #:phases |
| 4512 | (modify-phases %standard-phases |
| 4513 | (add-after 'patch-source-shebangs 'patch-hardcoded-paths |
| 4514 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 4515 | (let ((out (assoc-ref outputs "out")) |
| 4516 | (utils-linux (assoc-ref inputs "utils-linux")) |
| 4517 | (cryptsetup (assoc-ref inputs "cryptsetup")) |
| 4518 | (linux-pam (assoc-ref inputs "linux-pam")) |
| 4519 | (lvm2 (assoc-ref inputs "lvm2"))) |
| 4520 | (substitute* '("src/utils/ecryptfs-mount-private" |
| 4521 | "src/utils/ecryptfs-umount-private" |
| 4522 | "src/utils/ecryptfs-setup-private" |
| 4523 | "src/utils/ecryptfs-setup-swap" |
| 4524 | "src/utils/mount.ecryptfs.c" |
| 4525 | "src/utils/umount.ecryptfs.c" |
| 4526 | "src/pam_ecryptfs/pam_ecryptfs.c" |
| 4527 | "src/desktop/ecryptfs-mount-private.desktop.in" |
| 4528 | "src/desktop/ecryptfs-setup-private.desktop.in") |
| 4529 | (("/bin/mount") |
| 4530 | (string-append utils-linux "/bin/mount")) |
| 4531 | (("/bin/umount") |
| 4532 | (string-append utils-linux "/bin/umount")) |
| 4533 | (("/sbin/mount.ecryptfs_private") |
| 4534 | (string-append out "/sbin/mount.ecryptfs_private")) |
| 4535 | (("/sbin/umount.ecryptfs_private") |
| 4536 | (string-append out "/sbin/umount.ecryptfs_private")) |
| 4537 | (("/usr/bin/ecryptfs-mount-private") |
| 4538 | (string-append out "/bin/ecryptfs-mount-private")) |
| 4539 | (("/usr/bin/ecryptfs-rewrite-file") |
| 4540 | (string-append out "/bin/ecryptfs-rewrite-file")) |
| 4541 | (("/usr/bin/ecryptfs-setup-private") |
| 4542 | (string-append out "/bin/ecryptfs-setup-private")) |
| 4543 | (("/sbin/cryptsetup") |
| 4544 | (string-append cryptsetup "/sbin/cryptsetup")) |
| 4545 | (("/sbin/unix_chkpwd") |
| 4546 | (string-append linux-pam "/sbin/unix_chkpwd")) |
| 4547 | (("/sbin/dmsetup") |
| 4548 | (string-append lvm2 "/sbin/dmsetup"))))))))) |
| 4549 | (native-inputs |
| 4550 | `(("intltool" ,intltool) |
| 4551 | ("perl" ,perl) ; for pod2man |
| 4552 | ("pkg-config" ,pkg-config))) |
| 4553 | (inputs |
| 4554 | `(("keyutils" ,keyutils) |
| 4555 | ("linux-pam" ,linux-pam) |
| 4556 | ("utils-linux" ,util-linux) |
| 4557 | ("cryptsetup" ,cryptsetup) |
| 4558 | ("lvm2" ,lvm2) |
| 4559 | ("nss" ,nss))) |
| 4560 | (home-page "http://ecryptfs.org/") |
| 4561 | (synopsis "eCryptfs cryptographic file system utilities") |
| 4562 | (description |
| 4563 | "eCryptfs is a POSIX-compliant stacked cryptographic file system for Linux. |
| 4564 | Each file's cryptographic meta-data is stored inside the file itself, along |
| 4565 | with the encrypted contents. This allows individual encrypted files to be |
| 4566 | copied between hosts and still be decrypted with the proper key. eCryptfs is a |
| 4567 | native Linux file system, and has been part of the Linux kernel since version |
| 4568 | 2.6.19. This package contains the userland utilities to manage it.") |
| 4569 | ;; The files src/key_mod/ecryptfs_key_mod_{openssl,pkcs11_helper,tspi}.c |
| 4570 | ;; grant additional permission to link with OpenSSL. |
| 4571 | (license license:gpl2+))) |
| 4572 | |
| 4573 | (define-public libnfsidmap |
| 4574 | (package |
| 4575 | (name "libnfsidmap") |
| 4576 | (version "0.27") |
| 4577 | (source |
| 4578 | (origin |
| 4579 | (method url-fetch) |
| 4580 | (uri (string-append "https://fedorapeople.org/~steved/" |
| 4581 | name "/" version "/" name "-" version ".tar.bz2")) |
| 4582 | (sha256 |
| 4583 | (base32 "0bg2bcii424mf1bnp3fssr8jszbvhdxl7wvifm1yf6g596v8b8i5")))) |
| 4584 | (build-system gnu-build-system) |
| 4585 | (arguments |
| 4586 | `(#:configure-flags (list |
| 4587 | (string-append "--with-pluginpath=" |
| 4588 | (assoc-ref %outputs "out") |
| 4589 | "/lib/libnfsidmap")))) |
| 4590 | (native-inputs |
| 4591 | `(("autoconf" ,autoconf))) ; 0.27 still needs autoheader |
| 4592 | (home-page |
| 4593 | "http://www.citi.umich.edu/projects/nfsv4/crossrealm/libnfsidmap_config.html") |
| 4594 | (synopsis "NFSv4 support library for name/ID mapping") |
| 4595 | (description "Libnfsidmap is a library holding mulitiple methods of |
| 4596 | mapping names to ids and visa versa, mainly for NFSv4. It provides an |
| 4597 | extensible array of mapping functions, currently consisting of two choices: |
| 4598 | the default @code{nsswitch} and the experimental @code{umich_ldap}.") |
| 4599 | (license (license:non-copyleft "file://COPYING" |
| 4600 | "See COPYING in the distribution.")))) |
| 4601 | |
| 4602 | (define-public module-init-tools |
| 4603 | (package |
| 4604 | (name "module-init-tools") |
| 4605 | (version "3.16") |
| 4606 | (source (origin |
| 4607 | (method url-fetch) |
| 4608 | (uri (string-append |
| 4609 | "mirror://kernel.org/linux/utils/kernel/module-init-tools/" |
| 4610 | "module-init-tools-" version ".tar.bz2")) |
| 4611 | (sha256 |
| 4612 | (base32 |
| 4613 | "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1")) |
| 4614 | (patches (search-patches "module-init-tools-moduledir.patch")))) |
| 4615 | (build-system gnu-build-system) |
| 4616 | (arguments |
| 4617 | ;; FIXME: The upstream tarball lacks man pages, and building them would |
| 4618 | ;; require DocBook & co. We used to use Gentoo's pre-built man pages, |
| 4619 | ;; but they vanished. In the meantime, fake it. |
| 4620 | '(#:phases |
| 4621 | (modify-phases %standard-phases |
| 4622 | (add-before 'configure 'fake-docbook |
| 4623 | (lambda _ |
| 4624 | (substitute* "Makefile.in" |
| 4625 | (("^DOCBOOKTOMAN.*$") |
| 4626 | "DOCBOOKTOMAN = true\n")) |
| 4627 | #t))))) |
| 4628 | (home-page "https://www.kernel.org/pub/linux/utils/kernel/module-init-tools/") |
| 4629 | (synopsis "Tools for loading and managing Linux kernel modules") |
| 4630 | (description |
| 4631 | "Tools for loading and managing Linux kernel modules, such as |
| 4632 | @code{modprobe}, @code{insmod}, @code{lsmod}, and more.") |
| 4633 | (license license:gpl2+))) |
| 4634 | |
| 4635 | (define-public mcelog |
| 4636 | (package |
| 4637 | (name "mcelog") |
| 4638 | (version "154") |
| 4639 | (source (origin |
| 4640 | (method url-fetch) |
| 4641 | (uri (string-append "https://git.kernel.org/cgit/utils/cpu/mce/" |
| 4642 | "mcelog.git/snapshot/v" version ".tar.gz")) |
| 4643 | (sha256 |
| 4644 | (base32 |
| 4645 | "07628cr05f50m7lsvw26wxlnb7qcl0x6rymdpp5spqzhz91l58p3")) |
| 4646 | (file-name (string-append name "-" version ".tar.gz")) |
| 4647 | (modules '((guix build utils))) |
| 4648 | (snippet |
| 4649 | `(begin |
| 4650 | ;; The snapshots lack a .git directory, |
| 4651 | ;; breaking ‘git describe’. |
| 4652 | (substitute* "Makefile" |
| 4653 | (("\"unknown\"") (string-append "\"v" ,version "\""))) |
| 4654 | #t)))) |
| 4655 | (build-system gnu-build-system) |
| 4656 | (arguments |
| 4657 | `(#:phases (modify-phases %standard-phases |
| 4658 | (delete 'configure)) ; no configure script |
| 4659 | #:make-flags (let ((out (assoc-ref %outputs "out"))) |
| 4660 | (list "CC=gcc" |
| 4661 | (string-append "prefix=" out) |
| 4662 | (string-append "DOCDIR=" out "/share/doc/mcelog") |
| 4663 | "etcprefix=$(DOCDIR)/examples")) |
| 4664 | ;; The tests will only run as root on certain supported CPU models. |
| 4665 | #:tests? #f)) |
| 4666 | (supported-systems (list "i686-linux" "x86_64-linux")) |
| 4667 | (home-page "https://mcelog.org/") |
| 4668 | (synopsis "Machine check monitor for x86 Linux systems") |
| 4669 | (description |
| 4670 | "The mcelog daemon is required by the Linux kernel to log memory, I/O, CPU, |
| 4671 | and other hardware errors on x86 systems. It can also perform user-defined |
| 4672 | tasks, such as bringing bad pages off-line, when configurable error thresholds |
| 4673 | are exceeded.") |
| 4674 | (license license:gpl2))) |
| 4675 | |
| 4676 | (define-public mtd-utils |
| 4677 | (package |
| 4678 | (name "mtd-utils") |
| 4679 | (version "2.1.1") |
| 4680 | (source (origin |
| 4681 | (method url-fetch) |
| 4682 | (uri (string-append |
| 4683 | "ftp://ftp.infradead.org/pub/mtd-utils/" |
| 4684 | "mtd-utils-" version ".tar.bz2")) |
| 4685 | (sha256 |
| 4686 | (base32 |
| 4687 | "1lijl89l7hljx8xx70vrz9srd3h41v5gh4b0lvqnlv831yvyh5cd")))) |
| 4688 | (arguments |
| 4689 | '(#:configure-flags '("--enable-unit-tests"))) |
| 4690 | (native-inputs |
| 4691 | `(("cmocka" ,cmocka) |
| 4692 | ("pkg-config" ,pkg-config))) |
| 4693 | (inputs |
| 4694 | `(("acl" ,acl) ; extended attributes (xattr) |
| 4695 | ("libuuid" ,util-linux) |
| 4696 | ("lzo" ,lzo) |
| 4697 | ("openssl" ,openssl) ; optional crypto support |
| 4698 | ("zlib" ,zlib) |
| 4699 | ("zstd" ,zstd "lib"))) |
| 4700 | (build-system gnu-build-system) |
| 4701 | (synopsis "MTD Flash Storage Utilities") |
| 4702 | (description "This package provides utilities for testing, partitioning, etc |
| 4703 | of flash storage.") |
| 4704 | (home-page "http://www.linux-mtd.infradead.org/") |
| 4705 | (license |
| 4706 | (list license:gpl2 ; Almost everything is gpl2 or gpl2+ |
| 4707 | license:mpl1.1 ; All ftl* files |
| 4708 | license:expat)))) ; libiniparser |
| 4709 | |
| 4710 | (define-public libseccomp |
| 4711 | (package |
| 4712 | (name "libseccomp") |
| 4713 | (version "2.4.1") |
| 4714 | (source (origin |
| 4715 | (method url-fetch) |
| 4716 | (uri (string-append "https://github.com/seccomp/libseccomp/" |
| 4717 | "releases/download/v" version |
| 4718 | "/libseccomp-" version ".tar.gz")) |
| 4719 | (sha256 |
| 4720 | (base32 |
| 4721 | "1s06h2cgk0xxwmhwj72z33bllafc1xqnxzk2yyra2rmg959778qw")))) |
| 4722 | (build-system gnu-build-system) |
| 4723 | (native-inputs |
| 4724 | `(("which" ,which))) |
| 4725 | (synopsis "Interface to Linux's seccomp syscall filtering mechanism") |
| 4726 | (description "The libseccomp library provides an easy to use, platform |
| 4727 | independent, interface to the Linux Kernel's syscall filtering mechanism. The |
| 4728 | libseccomp API is designed to abstract away the underlying BPF based syscall |
| 4729 | filter language and present a more conventional function-call based filtering |
| 4730 | interface that should be familiar to, and easily adopted by, application |
| 4731 | developers.") |
| 4732 | (home-page "https://github.com/seccomp/libseccomp") |
| 4733 | (license license:lgpl2.1))) |
| 4734 | |
| 4735 | (define-public radeontop |
| 4736 | (package |
| 4737 | (name "radeontop") |
| 4738 | (version "1.2") |
| 4739 | (source |
| 4740 | (origin |
| 4741 | (method git-fetch) |
| 4742 | (uri (git-reference |
| 4743 | (url "https://github.com/clbr/radeontop.git") |
| 4744 | (commit (string-append "v" version)))) |
| 4745 | (file-name (git-file-name name version)) |
| 4746 | (sha256 |
| 4747 | (base32 "1b1m30r2nfwqkajqw6m01xmfhlq83z1qylyijxg7962mp9x2k0gw")))) |
| 4748 | (build-system gnu-build-system) |
| 4749 | (arguments |
| 4750 | `(#:phases (modify-phases %standard-phases |
| 4751 | ;; getver.sh uses ‘git --describe’, isn't worth an extra git |
| 4752 | ;; dependency, and doesn't even work on release(!) tarballs. |
| 4753 | (add-after 'unpack 'report-correct-version |
| 4754 | (lambda _ |
| 4755 | (substitute* "getver.sh" |
| 4756 | (("ver=unknown") |
| 4757 | (string-append "ver=" ,version))) |
| 4758 | #t)) |
| 4759 | (delete 'configure)) ; no configure script |
| 4760 | #:make-flags (list "CC=gcc" |
| 4761 | (string-append "PREFIX=" %output)) |
| 4762 | #:tests? #f)) ; no tests |
| 4763 | (native-inputs |
| 4764 | `(("gettext" ,gettext-minimal) |
| 4765 | ("pkg-config" ,pkg-config))) |
| 4766 | (inputs |
| 4767 | `(("libdrm" ,libdrm) |
| 4768 | ("libpciaccess" ,libpciaccess) |
| 4769 | ("libxcb" ,libxcb) |
| 4770 | ("ncurses" ,ncurses))) |
| 4771 | (home-page "https://github.com/clbr/radeontop/") |
| 4772 | (synopsis "Usage monitor for AMD Radeon graphics") |
| 4773 | (description "RadeonTop monitors resource consumption on supported AMD |
| 4774 | Radeon Graphics Processing Units (GPUs), either in real time as bar graphs on |
| 4775 | a terminal or saved to a file for further processing. It measures both the |
| 4776 | activity of the GPU as a whole, which is also accurate during OpenCL |
| 4777 | computations, as well as separate component statistics that are only meaningful |
| 4778 | under OpenGL graphics workloads.") |
| 4779 | (license license:gpl3))) |
| 4780 | |
| 4781 | (define-public efivar |
| 4782 | (package |
| 4783 | (name "efivar") |
| 4784 | (version "37") |
| 4785 | (source (origin |
| 4786 | (method url-fetch) |
| 4787 | (uri (string-append "https://github.com/rhboot/" name |
| 4788 | "/releases/download/" version "/" name |
| 4789 | "-" version ".tar.bz2")) |
| 4790 | (sha256 |
| 4791 | (base32 |
| 4792 | "17vvfivhsrszh7q39b6npjsrhrhsjf1cmmcpp3xrh6wh7ywzwrrw")))) |
| 4793 | (build-system gnu-build-system) |
| 4794 | (arguments |
| 4795 | `(;; Tests require a UEFI system and is not detected in the chroot. |
| 4796 | #:tests? #f |
| 4797 | #:make-flags (list (string-append "prefix=" %output) |
| 4798 | (string-append "libdir=" %output "/lib") |
| 4799 | "CC_FOR_BUILD=gcc" |
| 4800 | (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")) |
| 4801 | #:phases |
| 4802 | (modify-phases %standard-phases |
| 4803 | (delete 'configure) |
| 4804 | (add-before 'build 'kernel-headers-are-system-headers |
| 4805 | (lambda* (#:key inputs #:allow-other-keys) |
| 4806 | (let ((kernel-headers (assoc-ref inputs "kernel-headers"))) |
| 4807 | ;; Make sure the kernel headers are treated as system headers |
| 4808 | ;; to suppress a conflict between "util.h" and <linux/fs.h>. |
| 4809 | (setenv "C_INCLUDE_PATH" (string-append kernel-headers "/include")) |
| 4810 | #t)))))) |
| 4811 | (native-inputs |
| 4812 | `(("pkg-config" ,pkg-config))) |
| 4813 | (inputs |
| 4814 | `(("popt" ,popt))) |
| 4815 | (home-page "https://github.com/rhboot/efivar") |
| 4816 | (synopsis "Tool and library to manipulate EFI variables") |
| 4817 | (description "This package provides a library and a command line |
| 4818 | interface to the variable facility of UEFI boot firmware.") |
| 4819 | (license license:lgpl2.1+))) |
| 4820 | |
| 4821 | (define-public efibootmgr |
| 4822 | (package |
| 4823 | (name "efibootmgr") |
| 4824 | (version "16") |
| 4825 | (source (origin |
| 4826 | (method url-fetch) |
| 4827 | (uri (string-append "https://github.com/rhinstaller/efibootmgr" |
| 4828 | "/releases/download/" version "/efibootmgr" |
| 4829 | "-" version ".tar.bz2")) |
| 4830 | (sha256 |
| 4831 | (base32 |
| 4832 | "0pzn67vxxaf7jna4cd0i4kqm60h04kb21hckksv9z82q9gxra1wm")))) |
| 4833 | (build-system gnu-build-system) |
| 4834 | (arguments |
| 4835 | `(#:tests? #f ;no tests |
| 4836 | #:make-flags (list (string-append "prefix=" %output) |
| 4837 | (string-append "libdir=" %output "/lib") |
| 4838 | ;; EFIDIR denotes a subdirectory relative to the |
| 4839 | ;; EFI System Partition where the loader will be |
| 4840 | ;; installed (known as OS_VENDOR in the code). |
| 4841 | ;; GRUB overrides this, as such it's only used if |
| 4842 | ;; nothing else is specified on the command line. |
| 4843 | "EFIDIR=gnu" |
| 4844 | ;; Treat kernel headers as system headers to prevent |
| 4845 | ;; warnings about conflicting types. |
| 4846 | (string-append "C_INCLUDE_PATH=" |
| 4847 | (assoc-ref %build-inputs "kernel-headers") |
| 4848 | "/include")) |
| 4849 | #:phases (modify-phases %standard-phases (delete 'configure)))) |
| 4850 | (native-inputs |
| 4851 | `(("pkg-config" ,pkg-config))) |
| 4852 | (inputs |
| 4853 | `(("efivar" ,efivar) |
| 4854 | ("popt" ,popt))) |
| 4855 | (home-page "https://github.com/rhinstaller/efibootmgr") |
| 4856 | (synopsis "Modify the Extensible Firmware Interface (EFI) boot manager") |
| 4857 | (description |
| 4858 | "@code{efibootmgr} is a user-space application to modify the Intel |
| 4859 | Extensible Firmware Interface (EFI) Boot Manager. This application can |
| 4860 | create and destroy boot entries, change the boot order, change the next |
| 4861 | running boot option, and more.") |
| 4862 | (license license:gpl2+))) |
| 4863 | |
| 4864 | (define-public sysstat |
| 4865 | (package |
| 4866 | (name "sysstat") |
| 4867 | (version "12.1.6") |
| 4868 | (source (origin |
| 4869 | (method url-fetch) |
| 4870 | (uri (string-append "http://pagesperso-orange.fr/sebastien.godard/" |
| 4871 | "sysstat-" version ".tar.xz")) |
| 4872 | (sha256 |
| 4873 | (base32 |
| 4874 | "0agi17n82k363mf9f7cky3isq195hw112vs98v26yfhm0v2g6lpp")))) |
| 4875 | (build-system gnu-build-system) |
| 4876 | (arguments |
| 4877 | `(#:tests? #f ; No test suite. |
| 4878 | ;; Without this flag, it tries to install the man pages with group 'root' |
| 4879 | ;; and fails because /etc/passwd lacks an entry for the root user. |
| 4880 | #:configure-flags |
| 4881 | (list "--disable-file-attr" |
| 4882 | (string-append "conf_dir=" (assoc-ref %outputs "out") "/etc")) |
| 4883 | #:phases |
| 4884 | (modify-phases %standard-phases |
| 4885 | ;; The build process tries to create '/var/lib/sa', so we skip that |
| 4886 | ;; instruction. |
| 4887 | (add-after 'build 'skip-touching-var |
| 4888 | (lambda _ |
| 4889 | (substitute* "Makefile" |
| 4890 | (("mkdir -p \\$\\(DESTDIR\\)\\$\\(SA_DIR\\)") |
| 4891 | "")) |
| 4892 | #t))))) |
| 4893 | (home-page "http://sebastien.godard.pagesperso-orange.fr/") |
| 4894 | (synopsis "Performance monitoring tools for Linux") |
| 4895 | (description "The sysstat utilities are a collection of performance |
| 4896 | monitoring tools for Linux. These include @code{mpstat}, @code{iostat}, |
| 4897 | @code{tapestat}, @code{cifsiostat}, @code{pidstat}, @code{sar}, @code{sadc}, |
| 4898 | @code{sadf} and @code{sa}.") |
| 4899 | (license license:gpl2+))) |
| 4900 | |
| 4901 | (define-public light |
| 4902 | (package |
| 4903 | (name "light") |
| 4904 | (version "1.2") |
| 4905 | (source (origin |
| 4906 | (method url-fetch) |
| 4907 | (uri (string-append |
| 4908 | "https://github.com/haikarainen/light/archive/v" |
| 4909 | version ".tar.gz")) |
| 4910 | (sha256 |
| 4911 | (base32 |
| 4912 | "1gfvsw7gh5pis733l7j54vzp272pvjyzbg8a0pvapfmg0s7mip97")) |
| 4913 | (file-name (string-append name "-" version ".tar.gz")))) |
| 4914 | (build-system gnu-build-system) |
| 4915 | (native-inputs |
| 4916 | `(("autoconf" ,autoconf) |
| 4917 | ("automake" ,automake))) |
| 4918 | (home-page "https://haikarainen.github.io/light/") |
| 4919 | (synopsis "GNU/Linux application to control backlights") |
| 4920 | (description |
| 4921 | "Light is a program to send commands to screen backlight controllers |
| 4922 | under GNU/Linux. Features include: |
| 4923 | |
| 4924 | @itemize |
| 4925 | @item It does not rely on X. |
| 4926 | @item Light can automatically figure out the best controller to use, making |
| 4927 | full use of underlying hardware. |
| 4928 | @item It is possible to set a minimum brightness value, as some controllers |
| 4929 | set the screen to be pitch black at a vaĺue of 0 (or higher). |
| 4930 | @end itemize |
| 4931 | |
| 4932 | Light is the successor of lightscript.") |
| 4933 | (license license:gpl3+))) |
| 4934 | |
| 4935 | (define-public brightnessctl |
| 4936 | (let ((commit "6a791e7694aeeb5d027f71c6098e5182cf03371c")) |
| 4937 | (package |
| 4938 | (name "brightnessctl") |
| 4939 | (version (git-version "0.4" "0" commit)) |
| 4940 | (source (origin |
| 4941 | (method git-fetch) |
| 4942 | (uri (git-reference |
| 4943 | (url "https://github.com/Hummer12007/brightnessctl/") |
| 4944 | (commit commit))) |
| 4945 | (file-name (git-file-name name version)) |
| 4946 | (sha256 |
| 4947 | (base32 |
| 4948 | "1n1gb8ldgqv3vs565yhk1w4jfvrviczp94r8wqlkv5q6ab43c8w9")))) |
| 4949 | (build-system gnu-build-system) |
| 4950 | (arguments |
| 4951 | '(#:tests? #f ; no tests |
| 4952 | #:make-flags (list "CC=gcc" |
| 4953 | (string-append "PREFIX=" %output) |
| 4954 | (string-append "UDEVDIR=" %output "/lib/udev/rules.d/")) |
| 4955 | #:phases |
| 4956 | (modify-phases %standard-phases |
| 4957 | (delete 'configure) |
| 4958 | (add-after 'unpack 'adjust-udev-rules |
| 4959 | (lambda _ |
| 4960 | (substitute* "90-brightnessctl.rules" |
| 4961 | (("/bin/") "/run/current-system/profile/bin/")) |
| 4962 | #t))))) |
| 4963 | (home-page "https://github.com/Hummer12007/brightnessctl") |
| 4964 | (synopsis "Backlight and LED brightness control") |
| 4965 | (description |
| 4966 | "This program allows you read and control device brightness. Devices |
| 4967 | include backlight and LEDs. It can also preserve current brightness before |
| 4968 | applying the operation, such as on lid close. |
| 4969 | |
| 4970 | The appropriate permissions must be set on the backlight or LED control |
| 4971 | interface in sysfs, which can be accomplished with the included udev rules.") |
| 4972 | (license license:expat)))) |
| 4973 | |
| 4974 | (define-public tlp |
| 4975 | (package |
| 4976 | (name "tlp") |
| 4977 | (version "1.2.2") |
| 4978 | (source (origin |
| 4979 | (method url-fetch) |
| 4980 | (uri (string-append |
| 4981 | "https://github.com/linrunner/" |
| 4982 | (string-upcase name) |
| 4983 | "/archive/" version ".tar.gz")) |
| 4984 | (file-name (string-append name "-" version ".tar.gz")) |
| 4985 | (sha256 |
| 4986 | (base32 |
| 4987 | "059kxrpxx580mm6p0z2a421nxngszyh4yqqhbgvn04b6a7dbsa2w")))) |
| 4988 | (inputs `(("bash" ,bash) |
| 4989 | ("dbus" ,dbus) |
| 4990 | ("ethtool" ,ethtool) |
| 4991 | ("eudev" ,eudev) |
| 4992 | ("grep" ,grep) |
| 4993 | ("hdparm" ,hdparm) |
| 4994 | ("inetutils" ,inetutils) |
| 4995 | ("iw" ,iw) |
| 4996 | ("kmod" ,kmod) |
| 4997 | ("pciutils" ,pciutils) |
| 4998 | ("perl" ,perl) |
| 4999 | ("rfkill" ,rfkill) |
| 5000 | ("sed" ,sed) |
| 5001 | ("usbutils" ,usbutils) |
| 5002 | ("util-linux" ,util-linux) |
| 5003 | ("wireless-tools" ,wireless-tools) |
| 5004 | ,@(if (let ((system (or (%current-target-system) |
| 5005 | (%current-system)))) |
| 5006 | (or (string-prefix? "i686-" system) |
| 5007 | (string-prefix? "x86_64-" system))) |
| 5008 | `(("x86-energy-perf-policy" ,x86-energy-perf-policy)) |
| 5009 | '()))) |
| 5010 | (build-system gnu-build-system) |
| 5011 | (arguments |
| 5012 | `(#:modules ((guix build gnu-build-system) |
| 5013 | (guix build utils) |
| 5014 | (srfi srfi-1)) |
| 5015 | #:phases |
| 5016 | (modify-phases %standard-phases |
| 5017 | (delete 'configure) ; no configure script |
| 5018 | (add-before 'build 'setenv |
| 5019 | (lambda* (#:key outputs #:allow-other-keys) |
| 5020 | (let ((out (assoc-ref outputs "out"))) |
| 5021 | (setenv "TLP_WITH_SYSTEMD" "0") |
| 5022 | (setenv "TLP_NO_INIT" "1") |
| 5023 | (setenv "TLP_NO_PMUTILS" "1") |
| 5024 | (setenv "TLP_SBIN" (string-append out "/bin")) |
| 5025 | (setenv "TLP_BIN" (string-append out "/bin")) |
| 5026 | (setenv "TLP_TLIB" (string-append out "/share/tlp")) |
| 5027 | (setenv "TLP_FLIB" (string-append out "/share/tlp/func.d")) |
| 5028 | (setenv "TLP_ULIB" (string-append out "/lib/udev")) |
| 5029 | (setenv "TLP_CONF" "/etc/tlp") |
| 5030 | (setenv "TLP_ELOD" |
| 5031 | (string-append out "/lib/elogind/system-sleep")) |
| 5032 | (setenv "TLP_SHCPL" |
| 5033 | (string-append out "/share/bash-completion/completions")) |
| 5034 | (setenv "TLP_MAN" (string-append out "/share/man")) |
| 5035 | (setenv "TLP_META" (string-append out "/share/metainfo")) |
| 5036 | #t))) |
| 5037 | (delete 'check) ; no tests |
| 5038 | (add-before 'install 'fix-installation |
| 5039 | (lambda _ |
| 5040 | ;; Stop the Makefile from trying to create system directories. |
| 5041 | (substitute* "Makefile" |
| 5042 | (("\\[ -f \\$\\(_CONF\\) \\]") "#") |
| 5043 | (("install -d -m 755 \\$\\(_VAR\\)") "#")) |
| 5044 | #t)) |
| 5045 | (replace 'install |
| 5046 | (lambda _ |
| 5047 | (invoke "make" "install-tlp" "install-man"))) |
| 5048 | (add-after 'install 'wrap |
| 5049 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 5050 | (let* ((bin (string-append (assoc-ref outputs "out") "/bin")) |
| 5051 | (bin-files (find-files bin ".*"))) |
| 5052 | (define (bin-directory input-name) |
| 5053 | (let ((p (assoc-ref inputs input-name))) |
| 5054 | (and p (string-append p "/bin")))) |
| 5055 | (define (sbin-directory input-name) |
| 5056 | (string-append (assoc-ref inputs input-name) "/sbin")) |
| 5057 | (for-each (lambda (program) |
| 5058 | (wrap-program program |
| 5059 | `("PATH" ":" prefix |
| 5060 | ,(append |
| 5061 | (filter-map bin-directory |
| 5062 | '("bash" |
| 5063 | "coreutils" |
| 5064 | "dbus" |
| 5065 | "eudev" |
| 5066 | "grep" |
| 5067 | "inetutils" |
| 5068 | "kmod" |
| 5069 | "perl" |
| 5070 | "sed" |
| 5071 | "usbutils" |
| 5072 | "util-linux" |
| 5073 | "x86-energy-perf-policy")) |
| 5074 | (filter-map sbin-directory |
| 5075 | '("ethtool" |
| 5076 | "hdparm" |
| 5077 | "iw" |
| 5078 | "pciutils" |
| 5079 | "rfkill" |
| 5080 | "wireless-tools")))))) |
| 5081 | bin-files) |
| 5082 | #t)))))) |
| 5083 | (home-page "http://linrunner.de/en/tlp/tlp.html") |
| 5084 | (synopsis "Power management tool for Linux") |
| 5085 | (description "TLP is a power management tool for Linux. It comes with |
| 5086 | a default configuration already optimized for battery life. Nevertheless, |
| 5087 | TLP is customizable to fulfil system requirements. TLP settings are applied |
| 5088 | every time the power supply source is changed.") |
| 5089 | ;; 'COPYING' is a custom version that says that one file is GPLv3+ and the |
| 5090 | ;; rest is GPLv2+. |
| 5091 | (license (list license:gpl2+ license:gpl3+)))) |
| 5092 | |
| 5093 | (define-public lshw |
| 5094 | (package |
| 5095 | (name "lshw") |
| 5096 | (version "B.02.18") |
| 5097 | (source (origin |
| 5098 | (method url-fetch) |
| 5099 | (uri (string-append "https://www.ezix.org/software/" |
| 5100 | "files/lshw-" version |
| 5101 | ".tar.gz")) |
| 5102 | (sha256 |
| 5103 | (base32 |
| 5104 | "0brwra4jld0d53d7jsgca415ljglmmx1l2iazpj4ndilr48yy8mf")))) |
| 5105 | (build-system gnu-build-system) |
| 5106 | (arguments |
| 5107 | `(#:phases (modify-phases %standard-phases (delete 'configure)) |
| 5108 | #:tests? #f ; no tests |
| 5109 | #:make-flags |
| 5110 | (list (string-append "PREFIX=" (assoc-ref %outputs "out"))))) |
| 5111 | (synopsis "List hardware information") |
| 5112 | (description |
| 5113 | "@command{lshw} (Hardware Lister) is a small tool to provide |
| 5114 | detailed information on the hardware configuration of the machine. |
| 5115 | It can report exact memory configuration, firmware version, mainboard |
| 5116 | configuration, CPU version and speed, cache configuration, bus speed, |
| 5117 | and more on DMI-capable x86 or EFI (IA-64) systems and on some PowerPC |
| 5118 | machines (PowerMac G4 is known to work).") |
| 5119 | (home-page "https://www.ezix.org/project/wiki/HardwareLiSter") |
| 5120 | (license license:gpl2+))) |
| 5121 | |
| 5122 | (define-public libmnl |
| 5123 | (package |
| 5124 | (name "libmnl") |
| 5125 | (version "1.0.4") |
| 5126 | (source |
| 5127 | (origin |
| 5128 | (method url-fetch) |
| 5129 | (uri (string-append "mirror://netfilter.org/libmnl/" |
| 5130 | "libmnl-" version ".tar.bz2")) |
| 5131 | (sha256 |
| 5132 | (base32 |
| 5133 | "108zampspaalv44zn0ar9h386dlfixpd149bnxa5hsi8kxlqj7qp")))) |
| 5134 | (build-system gnu-build-system) |
| 5135 | (home-page "https://www.netfilter.org/projects/libmnl/") |
| 5136 | (synopsis "Netlink utility library") |
| 5137 | (description "Libmnl is a minimalistic user-space library oriented to |
| 5138 | Netlink developers. There are a lot of common tasks in parsing, validating, |
| 5139 | constructing of both the Netlink header and TLVs that are repetitive and easy to |
| 5140 | get wrong. This library aims to provide simple helpers that allows you to |
| 5141 | re-use code and to avoid re-inventing the wheel.") |
| 5142 | (license license:lgpl2.1+))) |
| 5143 | |
| 5144 | (define-public libnftnl |
| 5145 | (package |
| 5146 | (name "libnftnl") |
| 5147 | (version "1.1.4") |
| 5148 | (source |
| 5149 | (origin |
| 5150 | (method url-fetch) |
| 5151 | (uri (string-append "mirror://netfilter.org/libnftnl/" |
| 5152 | "libnftnl-" version ".tar.bz2")) |
| 5153 | (sha256 |
| 5154 | (base32 "087dfc2n4saf2k68hyi4byvgz5grwpw5kfjvmkpn3wmd8y1riiy8")))) |
| 5155 | (build-system gnu-build-system) |
| 5156 | (native-inputs |
| 5157 | `(("pkg-config" ,pkg-config))) |
| 5158 | (inputs |
| 5159 | `(("libmnl" ,libmnl))) |
| 5160 | (home-page "https://www.netfilter.org/projects/libnftnl/index.html") |
| 5161 | (synopsis "Netlink programming interface to the Linux nf_tables subsystem") |
| 5162 | (description "Libnftnl is a userspace library providing a low-level netlink |
| 5163 | programming interface to the in-kernel nf_tables subsystem. The library |
| 5164 | libnftnl has been previously known as libnftables. This library is currently |
| 5165 | used by nftables.") |
| 5166 | (license license:gpl2+))) |
| 5167 | |
| 5168 | (define-public nftables |
| 5169 | (package |
| 5170 | (name "nftables") |
| 5171 | (version "0.9.2") |
| 5172 | (source |
| 5173 | (origin |
| 5174 | (method url-fetch) |
| 5175 | (uri (string-append "http://www.nftables.org/projects/nftables" |
| 5176 | "/files/nftables-" version ".tar.bz2")) |
| 5177 | (sha256 |
| 5178 | (base32 |
| 5179 | "1x8kalbggjq44j4916i6vyv1rb20dlh1dcsf9xvzqsry2j063djw")))) |
| 5180 | (build-system gnu-build-system) |
| 5181 | (arguments `(#:configure-flags |
| 5182 | '("--disable-man-doc"))) ; FIXME: Needs docbook2x. |
| 5183 | (inputs `(("bison" ,bison) |
| 5184 | ("flex" ,flex) |
| 5185 | ("gmp" ,gmp) |
| 5186 | ("libmnl" ,libmnl) |
| 5187 | ("libnftnl" ,libnftnl) |
| 5188 | ("readline" ,readline))) |
| 5189 | (native-inputs `(("pkg-config" ,pkg-config))) |
| 5190 | (home-page "http://www.nftables.org") |
| 5191 | (synopsis "Userspace utility for Linux packet filtering") |
| 5192 | (description "nftables is the project that aims to replace the existing |
| 5193 | {ip,ip6,arp,eb}tables framework. Basically, this project provides a new packet |
| 5194 | filtering framework, a new userspace utility and also a compatibility layer for |
| 5195 | {ip,ip6}tables. nftables is built upon the building blocks of the Netfilter |
| 5196 | infrastructure such as the existing hooks, the connection tracking system, the |
| 5197 | userspace queueing component and the logging subsystem.") |
| 5198 | (license license:gpl2))) |
| 5199 | |
| 5200 | (define-public proot |
| 5201 | (package |
| 5202 | (name "proot") |
| 5203 | (version "5.1.0") |
| 5204 | (source |
| 5205 | (origin |
| 5206 | (method git-fetch) |
| 5207 | (uri (git-reference |
| 5208 | (url "https://github.com/proot-me/PRoot.git") |
| 5209 | (commit (string-append "v" version)))) |
| 5210 | (file-name (git-file-name name version)) |
| 5211 | (sha256 |
| 5212 | (base32 "0azsqis99gxldmbcg43girch85ysg4hwzf0h1b44bmapnsm89fbz")) |
| 5213 | (patches (search-patches "proot-test-fhs.patch")))) |
| 5214 | (build-system gnu-build-system) |
| 5215 | (arguments |
| 5216 | '(#:make-flags '("-C" "src") |
| 5217 | |
| 5218 | #:phases (modify-phases %standard-phases |
| 5219 | (delete 'configure) |
| 5220 | (add-before 'build 'set-shell-file-name |
| 5221 | (lambda* (#:key inputs #:allow-other-keys) |
| 5222 | (substitute* (find-files "src" "\\.[ch]$") |
| 5223 | (("\"/bin/sh\"") |
| 5224 | (string-append "\"" |
| 5225 | (assoc-ref inputs "bash") |
| 5226 | "/bin/sh\""))) |
| 5227 | #t)) |
| 5228 | (add-before 'check 'fix-fhs-assumptions-in-tests |
| 5229 | (lambda _ |
| 5230 | (substitute* "tests/test-c6b77b77.mk" |
| 5231 | (("/bin/bash") (which "bash")) |
| 5232 | (("/usr/bin/test") (which "test"))) |
| 5233 | (substitute* '("tests/test-16573e73.c") |
| 5234 | (("/bin/([a-z-]+)" _ program) |
| 5235 | (which program))) |
| 5236 | |
| 5237 | (substitute* (find-files "tests" "\\.sh$") |
| 5238 | ;; Some of the tests try to "bind-mount" /bin/true. |
| 5239 | (("-b /bin/true:") |
| 5240 | (string-append "-b " (which "true") ":")) |
| 5241 | ;; Likewise for /bin. |
| 5242 | (("-b /bin:") "-b /gnu:") |
| 5243 | ;; Others try to run /bin/sh. |
| 5244 | (("/bin/sh") (which "sh")) |
| 5245 | ;; Others assume /etc/fstab exists. |
| 5246 | (("/etc/fstab") "/etc/passwd")) |
| 5247 | |
| 5248 | (substitute* "tests/GNUmakefile" |
| 5249 | (("-b /bin:") "-b /gnu:")) |
| 5250 | |
| 5251 | ;; XXX: This test fails in an obscure corner case, just |
| 5252 | ;; skip it. |
| 5253 | (delete-file "tests/test-kkkkkkkk.c") |
| 5254 | |
| 5255 | #t)) |
| 5256 | (replace 'check |
| 5257 | (lambda _ |
| 5258 | (let ((n (parallel-job-count))) |
| 5259 | ;; For some reason we get lots of segfaults with |
| 5260 | ;; seccomp support (x86_64, Linux-libre 4.11.0). |
| 5261 | (setenv "PROOT_NO_SECCOMP" "1") |
| 5262 | |
| 5263 | ;; Most of the tests expect "/bin" to be in $PATH so |
| 5264 | ;; they can run things that live in $ROOTFS/bin. |
| 5265 | (setenv "PATH" |
| 5266 | (string-append (getenv "PATH") ":/bin")) |
| 5267 | |
| 5268 | (invoke "make" "check" "-C" "tests" |
| 5269 | ;;"V=1" |
| 5270 | "-j" (number->string n))))) |
| 5271 | (replace 'install |
| 5272 | (lambda* (#:key outputs #:allow-other-keys) |
| 5273 | ;; The 'install' rule does nearly nothing. |
| 5274 | (let* ((out (assoc-ref outputs "out")) |
| 5275 | (man1 (string-append out "/share/man/man1"))) |
| 5276 | ;; TODO: 'make install-care' (does not even |
| 5277 | ;; build currently.) |
| 5278 | (invoke "make" "-C" "src" "install" |
| 5279 | (string-append "PREFIX=" out)) |
| 5280 | |
| 5281 | (mkdir-p man1) |
| 5282 | (copy-file "doc/proot/man.1" |
| 5283 | (string-append man1 "/proot.1")) |
| 5284 | #t)))))) |
| 5285 | (native-inputs `(("which" ,which) |
| 5286 | |
| 5287 | ;; For 'mcookie', used by some of the tests. |
| 5288 | ("util-linux" ,util-linux))) |
| 5289 | (inputs `(("talloc" ,talloc))) |
| 5290 | (home-page "https://github.com/proot-me/PRoot") |
| 5291 | (synopsis "Unprivileged chroot, bind mount, and binfmt_misc") |
| 5292 | (description |
| 5293 | "PRoot is a user-space implementation of @code{chroot}, @code{mount --bind}, |
| 5294 | and @code{binfmt_misc}. This means that users don't need any privileges or |
| 5295 | setup to do things like using an arbitrary directory as the new root |
| 5296 | file system, making files accessible somewhere else in the file system |
| 5297 | hierarchy, or executing programs built for another CPU architecture |
| 5298 | transparently through QEMU user-mode. Also, developers can use PRoot as a |
| 5299 | generic process instrumentation engine thanks to its extension mechanism. |
| 5300 | Technically PRoot relies on @code{ptrace}, an unprivileged system-call |
| 5301 | available in the kernel Linux.") |
| 5302 | (license license:gpl2+))) |
| 5303 | |
| 5304 | (define-public proot-static |
| 5305 | (package |
| 5306 | (inherit proot) |
| 5307 | (name "proot-static") |
| 5308 | (synopsis |
| 5309 | "Unprivileged chroot, bind mount, and binfmt_misc (statically linked)") |
| 5310 | (inputs `(("talloc" ,talloc/static))) |
| 5311 | (arguments |
| 5312 | (substitute-keyword-arguments (package-arguments proot) |
| 5313 | ((#:make-flags flags) |
| 5314 | `(cons "LDFLAGS = -ltalloc -static -static-libgcc" ,flags)) |
| 5315 | ((#:phases phases) |
| 5316 | `(modify-phases ,phases |
| 5317 | (add-after 'strip 'remove-store-references |
| 5318 | (lambda* (#:key outputs #:allow-other-keys) |
| 5319 | (let* ((out (assoc-ref outputs "out"))) |
| 5320 | (with-directory-excursion out |
| 5321 | (remove-store-references "bin/proot") |
| 5322 | #t)))))) |
| 5323 | ((#:allowed-references _ '("out")) |
| 5324 | '("out")))))) |
| 5325 | |
| 5326 | (define-public cpuid |
| 5327 | (package |
| 5328 | (name "cpuid") |
| 5329 | (version "20180519") |
| 5330 | (source (origin |
| 5331 | (method url-fetch) |
| 5332 | (uri (string-append "http://www.etallen.com/cpuid/cpuid-" |
| 5333 | version ".src.tar.gz")) |
| 5334 | (sha256 |
| 5335 | (base32 |
| 5336 | "16pzwyifc9glpk1hm6bqb5d1a7cw0qnqiamh5sbvqg7j6sz26y4n")))) |
| 5337 | (build-system gnu-build-system) |
| 5338 | (arguments |
| 5339 | '(#:make-flags '("CC=gcc") |
| 5340 | #:tests? #f ; no tests |
| 5341 | #:phases (modify-phases %standard-phases |
| 5342 | (delete 'configure) ; no configure script |
| 5343 | (add-before 'install 'fix-makefile |
| 5344 | (lambda* (#:key outputs #:allow-other-keys) |
| 5345 | (substitute* "Makefile" |
| 5346 | (("\\$\\(BUILDROOT\\)/usr") (assoc-ref outputs "out"))) |
| 5347 | ;; Make the compressed manpages writable so that the |
| 5348 | ;; reset-gzip-timestamps phase does not error out. |
| 5349 | (substitute* "Makefile" |
| 5350 | (("-m 444") "-m 644")) |
| 5351 | #t))))) |
| 5352 | (inputs `(("perl" ,perl))) |
| 5353 | (supported-systems '("i686-linux" "x86_64-linux")) |
| 5354 | (home-page "http://www.etallen.com/cpuid.html") |
| 5355 | (synopsis "Linux tool to dump x86 CPUID information about the CPU(s)") |
| 5356 | (description "cpuid dumps detailed information about the CPU(s) gathered |
| 5357 | from the CPUID instruction, and also determines the exact model of CPU(s). It |
| 5358 | supports Intel, AMD, and VIA CPUs, as well as older Transmeta, Cyrix, UMC, |
| 5359 | NexGen, Rise, and SiS CPUs.") |
| 5360 | (license license:gpl2+))) |
| 5361 | |
| 5362 | (define-public jmtpfs |
| 5363 | (package |
| 5364 | (name "jmtpfs") |
| 5365 | (version "0.5") |
| 5366 | (source |
| 5367 | (origin |
| 5368 | (method url-fetch) |
| 5369 | (uri (string-append "https://github.com/JasonFerrara/jmtpfs/archive/v" |
| 5370 | version ".tar.gz")) |
| 5371 | (file-name (string-append name "-" version ".tar.gz")) |
| 5372 | (sha256 |
| 5373 | (base32 |
| 5374 | "10v8d7mmx8b8123x5f9y9zaaa428ms6wkngwn2ra71n5a53wrjn0")))) |
| 5375 | (build-system gnu-build-system) |
| 5376 | (inputs |
| 5377 | `(("file" ,file) |
| 5378 | ("fuse" ,fuse) |
| 5379 | ("libmtp" ,libmtp))) |
| 5380 | (native-inputs |
| 5381 | `(("pkg-config" ,pkg-config))) |
| 5382 | (home-page "https://github.com/JasonFerrara/jmtpfs") |
| 5383 | (synopsis "Use a FUSE file system to access data over MTP") |
| 5384 | (description "jmtpfs uses FUSE (file system in userspace) to provide access |
| 5385 | to data over the Media Transfer Protocol (MTP). Unprivileged users can mount |
| 5386 | the MTP device as a file system.") |
| 5387 | (license license:gpl3))) |
| 5388 | |
| 5389 | (define-public procenv |
| 5390 | (package |
| 5391 | (name "procenv") |
| 5392 | (version "0.50") |
| 5393 | (source |
| 5394 | (origin |
| 5395 | (method url-fetch) |
| 5396 | (uri (string-append "https://github.com/jamesodhunt/procenv/archive/" |
| 5397 | version ".tar.gz")) |
| 5398 | (file-name (string-append name "-" version ".tar.gz")) |
| 5399 | (sha256 |
| 5400 | (base32 "0dvscyf47i3j5ay0amncqmqw9kd916689r2pqdvpnsrhp6j46zp1")))) |
| 5401 | (build-system gnu-build-system) |
| 5402 | (arguments `(#:configure-flags '("--disable-silent-rules"))) |
| 5403 | (native-inputs `(("pkg-config" ,pkg-config))) |
| 5404 | (inputs `(("expat" ,expat) ("libcap" ,libcap) ("check" ,check) |
| 5405 | ("groff" ,groff) ; for tests |
| 5406 | ("libselinux" ,libselinux))) |
| 5407 | (synopsis "Utility to show process environment") |
| 5408 | (description "Procenv is a command-line tool that displays as much detail about |
| 5409 | itself and its environment as possible. It can be used as a test |
| 5410 | tool, to understand the type of environment a process runs in, and for |
| 5411 | comparing system environments.") |
| 5412 | (home-page "http://github.com/jamesodhunt/procenv/") |
| 5413 | (license license:gpl3+))) |
| 5414 | |
| 5415 | (define-public libfabric |
| 5416 | (package |
| 5417 | (name "libfabric") |
| 5418 | (version "1.4.1") |
| 5419 | (source |
| 5420 | (origin |
| 5421 | (method url-fetch) |
| 5422 | (uri |
| 5423 | (string-append "https://github.com/ofiwg/libfabric/releases/download/v" |
| 5424 | version "/libfabric-" version ".tar.bz2")) |
| 5425 | (sha256 |
| 5426 | (base32 "19l2m1frna1l765z4j7wl8hp4rb9wrh0hy5496685hd183hmy5pv")))) |
| 5427 | (build-system gnu-build-system) |
| 5428 | (inputs `(("rdma-core" ,rdma-core) |
| 5429 | ,@(match (%current-system) |
| 5430 | ((member (package-supported-systems psm)) |
| 5431 | `(("psm" ,psm))) |
| 5432 | (_ `())) |
| 5433 | ("libnl" ,libnl))) |
| 5434 | (home-page "https://ofiwg.github.io/libfabric/") |
| 5435 | (synopsis "Open Fabric Interfaces") |
| 5436 | (description |
| 5437 | "OpenFabrics Interfaces (OFI) is a framework focused on exporting fabric |
| 5438 | communication services to applications. OFI is best described as a collection |
| 5439 | of libraries and applications used to export fabric services. The key |
| 5440 | components of OFI are: application interfaces, provider libraries, kernel |
| 5441 | services, daemons, and test applications. |
| 5442 | |
| 5443 | Libfabric is a core component of OFI. It is the library that defines and |
| 5444 | exports the user-space API of OFI, and is typically the only software that |
| 5445 | applications deal with directly. It works in conjunction with provider |
| 5446 | libraries, which are often integrated directly into libfabric.") |
| 5447 | (license (list license:bsd-2 license:gpl2)))) ;dual |
| 5448 | |
| 5449 | (define-public psm |
| 5450 | (package |
| 5451 | (name "psm") |
| 5452 | (version "3.3.20170428") |
| 5453 | (home-page "https://github.com/intel/psm") |
| 5454 | (source |
| 5455 | (origin |
| 5456 | (method git-fetch) |
| 5457 | (uri (git-reference (url home-page) |
| 5458 | (commit "604758e76dc31e68d1de736ccf5ddf16cb22355b"))) |
| 5459 | (file-name (string-append "psm-" version ".tar.gz")) |
| 5460 | (sha256 |
| 5461 | (base32 "0nsb325dmhn5ia3d2cnksqr0gdvrrx2hmvlylfgvmaqdpq76zm85")) |
| 5462 | (patches (search-patches |
| 5463 | "psm-arch.patch" ; uname -p returns "unknown" on Debian 9 |
| 5464 | "psm-ldflags.patch" ; build shared lib with LDFLAGS |
| 5465 | "psm-repro.patch")))) ; reproducibility |
| 5466 | (build-system gnu-build-system) |
| 5467 | (inputs `(("libuuid" ,util-linux))) |
| 5468 | (arguments |
| 5469 | '(#:make-flags `("PSM_USE_SYS_UUID=1" "CC=gcc" "WERROR=" |
| 5470 | ,(string-append "INSTALL_PREFIX=" %output) |
| 5471 | ,(string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")) |
| 5472 | #:tests? #f |
| 5473 | #:phases (modify-phases %standard-phases |
| 5474 | (delete 'configure) |
| 5475 | (add-after 'unpack 'patch-/usr/include |
| 5476 | (lambda _ |
| 5477 | (substitute* "Makefile" |
| 5478 | (("\\$\\{DESTDIR}/usr/include") |
| 5479 | (string-append %output "/include"))) |
| 5480 | (substitute* "Makefile" |
| 5481 | (("/lib64") "/lib")) |
| 5482 | #t)) |
| 5483 | (add-after 'unpack 'patch-sysmacros |
| 5484 | (lambda _ |
| 5485 | (substitute* "ipath/ipath_proto.c" |
| 5486 | (("#include <sys/poll.h>" m) |
| 5487 | (string-append m "\n" |
| 5488 | "#include <sys/sysmacros.h>"))) |
| 5489 | #t))))) |
| 5490 | (synopsis "Intel Performance Scaled Messaging (PSM) Libraries") |
| 5491 | (description |
| 5492 | "The PSM Messaging API, or PSM API, is Intel's low-level user-level |
| 5493 | communications interface for the True Scale family of products. PSM users are |
| 5494 | enabled with mechanisms necessary to implement higher level communications |
| 5495 | interfaces in parallel environments.") |
| 5496 | ;; Only Intel-compatable processors are supported. |
| 5497 | (supported-systems '("i686-linux" "x86_64-linux")) |
| 5498 | (license (list license:bsd-2 license:gpl2)))) ;dual |
| 5499 | |
| 5500 | (define-public snapscreenshot |
| 5501 | (package |
| 5502 | (name "snapscreenshot") |
| 5503 | (version "1.0.14.3") |
| 5504 | (source |
| 5505 | (origin |
| 5506 | (method url-fetch) |
| 5507 | (uri (string-append "http://bisqwit.iki.fi/src/arch/" |
| 5508 | name "-" version ".tar.bz2")) |
| 5509 | (sha256 |
| 5510 | (base32 "0gzvqsbf6a2sbd1mqvj1lbm57i2bm5k0cr6ncr821d1f32gw03mk")))) |
| 5511 | (build-system gnu-build-system) |
| 5512 | (arguments |
| 5513 | `(#:make-flags |
| 5514 | (let ((out (assoc-ref %outputs "out"))) |
| 5515 | (list (string-append "BINDIR=" out "/bin") |
| 5516 | (string-append "MANDIR=" out "/share/man"))) |
| 5517 | #:tests? #f ; no test suite |
| 5518 | #:phases |
| 5519 | (modify-phases %standard-phases |
| 5520 | (delete 'configure) ; ./configure is a snarky no-op |
| 5521 | (add-before 'install 'fix-ownership |
| 5522 | ;; Install binaries owned by ‘root’ instead of the nonexistent ‘bin’. |
| 5523 | (lambda _ |
| 5524 | (substitute* "depfun.mak" |
| 5525 | ((" -o bin -g bin ") " ")) |
| 5526 | #t)) |
| 5527 | (add-before 'install 'create-output-directories |
| 5528 | (lambda* (#:key outputs #:allow-other-keys) |
| 5529 | (let ((out (assoc-ref outputs "out"))) |
| 5530 | (mkdir-p (string-append out "/share/man/man1")) |
| 5531 | #t)))))) |
| 5532 | (home-page "https://bisqwit.iki.fi/source/snapscreenshot.html") |
| 5533 | (synopsis "Take screenshots of one or more Linux text consoles") |
| 5534 | (description |
| 5535 | "snapscreenshot saves a screenshot of one or more Linux text consoles as a |
| 5536 | Targa (@dfn{.tga}) image. It can be used by anyone with read access to the |
| 5537 | relevant @file{/dev/vcs*} file(s).") |
| 5538 | (license license:gpl2))) |
| 5539 | |
| 5540 | (define-public fbcat |
| 5541 | (package |
| 5542 | (name "fbcat") |
| 5543 | (version "0.5.1") |
| 5544 | (source |
| 5545 | (origin |
| 5546 | (method url-fetch) |
| 5547 | (uri (string-append "https://github.com/jwilk/fbcat/releases/download/" |
| 5548 | version "/" name "-" version ".tar.gz")) |
| 5549 | (sha256 |
| 5550 | (base32 "0pj9hxmwhbz6kmd7847yx2jh1scl9l25zgndyi8s9vlzdkq2q8d7")))) |
| 5551 | (build-system gnu-build-system) |
| 5552 | (inputs |
| 5553 | ;; The ‘fbgrab’ wrapper can use one of several PPM-to-PNG converters. We |
| 5554 | ;; choose netpbm simply because it's the smallest. It still adds ~94 MiB |
| 5555 | ;; to an otherwise tiny package, so we put ‘fbgrab’ in its own output. |
| 5556 | `(("pnmtopng" ,netpbm))) |
| 5557 | (outputs (list "out" "fbgrab")) |
| 5558 | (arguments |
| 5559 | `(#:make-flags |
| 5560 | (list "CC=gcc" |
| 5561 | (string-append "PREFIX=" (assoc-ref %outputs "out"))) |
| 5562 | #:tests? #f ; no tests |
| 5563 | #:phases |
| 5564 | (modify-phases %standard-phases |
| 5565 | (delete 'configure) ; no configure script |
| 5566 | (add-after 'build 'qualify-references |
| 5567 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 5568 | (let* ((pnmtopng (assoc-ref inputs "pnmtopng")) |
| 5569 | (out (assoc-ref outputs "out"))) |
| 5570 | (substitute* "fbgrab" |
| 5571 | (("fbcat" all) |
| 5572 | (string-append out "/bin/" all)) |
| 5573 | (("pnmtopng" all) |
| 5574 | (string-append pnmtopng "/bin/" all))) |
| 5575 | #t))) |
| 5576 | (add-after 'install 'split-fbgrab-output |
| 5577 | (lambda* (#:key outputs #:allow-other-keys) |
| 5578 | (let* ((out (assoc-ref outputs "out")) |
| 5579 | (out:fbgrab (assoc-ref outputs "fbgrab"))) |
| 5580 | (for-each (lambda (file) |
| 5581 | (let ((old (string-append out "/" file)) |
| 5582 | (new (string-append out:fbgrab "/" file))) |
| 5583 | (mkdir-p (dirname new)) |
| 5584 | (rename-file old new))) |
| 5585 | (list "bin/fbgrab" |
| 5586 | "share/man/man1/fbgrab.1")) |
| 5587 | #t)))))) |
| 5588 | (home-page "https://jwilk.net/software/fbcat") |
| 5589 | (synopsis "Take a screenshot of the contents of the Linux framebuffer") |
| 5590 | (description |
| 5591 | "fbcat saves the contents of the Linux framebuffer (@file{/dev/fb*}), or |
| 5592 | a dump therof. It supports a wide range of drivers and pixel formats. |
| 5593 | @command{fbcat} can take screenshots of virtually any application that can be |
| 5594 | made to write its output to the framebuffer, including (but not limited to) |
| 5595 | text-mode or graphical applications that don't use a display server. |
| 5596 | |
| 5597 | Also included is @command{fbgrab}, a wrapper around @command{fbcat} that |
| 5598 | emulates the behaviour of Gunnar Monell's older fbgrab utility.") |
| 5599 | (license license:gpl2))) |
| 5600 | |
| 5601 | (define-public libcgroup |
| 5602 | (package |
| 5603 | (name "libcgroup") |
| 5604 | (version "0.41") |
| 5605 | (source |
| 5606 | (origin |
| 5607 | (method url-fetch) |
| 5608 | (uri (string-append |
| 5609 | "mirror://sourceforge/libcg/" name "/" |
| 5610 | version "/" name "-" version ".tar.bz2")) |
| 5611 | (sha256 |
| 5612 | (base32 "0lgvyq37gq84sk30sg18admxaj0j0p5dq3bl6g74a1ppgvf8pqz4")))) |
| 5613 | (build-system gnu-build-system) |
| 5614 | (arguments |
| 5615 | `(#:tests? #f)) |
| 5616 | (native-inputs |
| 5617 | `(("bison" ,bison) |
| 5618 | ("flex" ,flex))) |
| 5619 | (inputs |
| 5620 | `(("linux-pam" ,linux-pam))) |
| 5621 | (home-page "https://sourceforge.net/projects/libcg/") |
| 5622 | (synopsis "Control groups management tools") |
| 5623 | (description "Control groups is Linux kernel method for process resource |
| 5624 | restriction, permission handling and more. This package provides userspace |
| 5625 | interface to this kernel feature.") |
| 5626 | (license license:lgpl2.1))) |
| 5627 | |
| 5628 | (define-public mbpfan |
| 5629 | (package |
| 5630 | (name "mbpfan") |
| 5631 | (version "2.1.1") |
| 5632 | (source |
| 5633 | (origin |
| 5634 | (method git-fetch) |
| 5635 | (uri (git-reference |
| 5636 | (url "https://github.com/dgraziotin/mbpfan.git") |
| 5637 | (commit (string-append "v" version)))) |
| 5638 | (file-name (git-file-name name version)) |
| 5639 | (sha256 |
| 5640 | (base32 "0aijyxrqh01x0s80yr4cgxgd001iiqqph65pxvby7f0wz8lnxnqj")))) |
| 5641 | (build-system gnu-build-system) |
| 5642 | (arguments |
| 5643 | '(#:tests? #f ; tests ask to be run as root |
| 5644 | #:make-flags (let ((out (assoc-ref %outputs "out"))) |
| 5645 | (list (string-append "DESTDIR=" out) |
| 5646 | "CC=gcc")) |
| 5647 | #:phases |
| 5648 | (modify-phases %standard-phases |
| 5649 | (add-after 'unpack 'patch-paths |
| 5650 | (lambda _ |
| 5651 | (substitute* "Makefile" |
| 5652 | (("/usr") "")) |
| 5653 | #t)) |
| 5654 | (delete 'configure)))) ; there's no configure phase |
| 5655 | (home-page "https://github.com/dgraziotin/mbpfan") |
| 5656 | (synopsis "Control fan speed on Macbooks") |
| 5657 | (description |
| 5658 | "mbpfan is a fan control daemon for Apple Macbooks. It uses input from |
| 5659 | the @code{coretemp} module and sets the fan speed using the @code{applesmc} |
| 5660 | module. It can be executed as a daemon or in the foreground with root |
| 5661 | privileges.") |
| 5662 | (license license:gpl3+))) |
| 5663 | |
| 5664 | (define-public psm2 |
| 5665 | (package |
| 5666 | (name "psm2") |
| 5667 | (version "10.3-46") |
| 5668 | (source (origin |
| 5669 | (method git-fetch) |
| 5670 | (uri (git-reference |
| 5671 | (url "https://github.com/intel/opa-psm2.git") |
| 5672 | (commit (string-append "PSM2_" version)))) |
| 5673 | (file-name (git-file-name name version)) |
| 5674 | (sha256 |
| 5675 | (base32 |
| 5676 | "0wadphv4rl5p38x6a3dgpbijlzqdvcn02cfafnp72nh9faz0zvlx")))) |
| 5677 | (build-system gnu-build-system) |
| 5678 | (arguments |
| 5679 | '(#:make-flags |
| 5680 | `(,(string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")) |
| 5681 | #:tests? #f |
| 5682 | #:phases (modify-phases %standard-phases |
| 5683 | (delete 'configure) |
| 5684 | (add-after 'unpack 'patch-Makefiles |
| 5685 | (lambda _ |
| 5686 | (substitute* "Makefile" |
| 5687 | (("/lib64") "/lib") |
| 5688 | (("/usr") "")) |
| 5689 | (substitute* "compat/Makefile" |
| 5690 | (("/lib64") "/lib") |
| 5691 | (("/usr") "")) |
| 5692 | #t)) |
| 5693 | (replace 'install |
| 5694 | (lambda _ |
| 5695 | (setenv "DESTDIR" %output) |
| 5696 | (invoke "make" "install") |
| 5697 | #t))))) |
| 5698 | (inputs |
| 5699 | `(("rdma-core" ,rdma-core) |
| 5700 | ("numactl" ,numactl))) |
| 5701 | (synopsis "Intel Performance Scaled Messaging 2 (PSM2) library") |
| 5702 | (description |
| 5703 | "This package is low-level user-level Intel's communications interface. |
| 5704 | The PSM2 API is a high-performance vendor-specific protocol that provides a |
| 5705 | low-level communications interface for the Intel Omni-Path family of |
| 5706 | high-speed networking devices.") |
| 5707 | (home-page "https://github.com/intel/opa-psm2") |
| 5708 | ;; Only the x86_64 architecure is supported. |
| 5709 | (supported-systems '("x86_64-linux")) |
| 5710 | (license (list license:bsd-3 license:gpl2)))) ; dual |
| 5711 | |
| 5712 | (define-public libpfm4 |
| 5713 | (package |
| 5714 | (name "libpfm4") |
| 5715 | (version "4.9.0") |
| 5716 | (source (origin |
| 5717 | (method url-fetch) |
| 5718 | (uri (string-append "mirror://sourceforge/perfmon2/" |
| 5719 | name "/libpfm-" version ".tar.gz")) |
| 5720 | (sha256 |
| 5721 | (base32 |
| 5722 | "1qp4g4n6dw42p2w5rkwzdb7ynk8h7g5vg01ybpmvxncgwa7bw3yv")))) |
| 5723 | (build-system gnu-build-system) |
| 5724 | (arguments |
| 5725 | '(#:modules ((guix build utils) |
| 5726 | (guix build gnu-build-system)) |
| 5727 | #:phases (modify-phases %standard-phases |
| 5728 | (delete 'configure) |
| 5729 | (delete 'check) |
| 5730 | (replace 'build |
| 5731 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 5732 | (let* ((out (assoc-ref outputs "out"))) |
| 5733 | (setenv "CC" "gcc") |
| 5734 | (invoke "make") |
| 5735 | #t))) |
| 5736 | (replace 'install |
| 5737 | (lambda* (#:key outputs #:allow-other-keys) |
| 5738 | (let* ((out (assoc-ref outputs "out"))) |
| 5739 | (invoke "make" |
| 5740 | (string-append "PREFIX=" out) |
| 5741 | "install") |
| 5742 | #t)))))) |
| 5743 | (synopsis "Performance event monitoring library") |
| 5744 | (description |
| 5745 | "This package provides a library called libpfm4, which is used to develop |
| 5746 | monitoring tools exploiting the performance monitoring events such as those |
| 5747 | provided by the Performance Monitoring Unit (PMU) of modern processors. |
| 5748 | |
| 5749 | Libpfm4 helps convert from an event name, expressed as a string, to the event |
| 5750 | encoding that is either the raw event as documented by the hardware vendor or |
| 5751 | the OS-specific encoding. In the latter case, the library is able to prepare |
| 5752 | the OS-specific data structures needed by the kernel to setup the event. |
| 5753 | |
| 5754 | libpfm4 provides support for the @code{perf_events} interface, which was |
| 5755 | introduced in Linux 2.6.31.") |
| 5756 | (home-page "http://perfmon2.sourceforge.net/") |
| 5757 | (license license:expat))) |
| 5758 | |
| 5759 | (define-public libnfnetlink |
| 5760 | (package |
| 5761 | (name "libnfnetlink") |
| 5762 | (version "1.0.1") |
| 5763 | (source (origin |
| 5764 | (method url-fetch) |
| 5765 | (uri (string-append |
| 5766 | "https://www.netfilter.org/projects/libnfnetlink/files/" |
| 5767 | "libnfnetlink-" version ".tar.bz2")) |
| 5768 | (sha256 |
| 5769 | (base32 |
| 5770 | "06mm2x4b01k3m7wnrxblk9j0mybyr4pfz28ml7944xhjx6fy2w7j")))) |
| 5771 | (build-system gnu-build-system) |
| 5772 | (home-page "https://www.netfilter.org/projects/libnfnetlink/") |
| 5773 | (synopsis "Low-level netfilter netlink communication library") |
| 5774 | (description |
| 5775 | "@code{libnfnetlink} is the low-level library for netfilter related |
| 5776 | kernel/userspace communication. It provides a generic messaging |
| 5777 | infrastructure for in-kernel netfilter subsystems (such as nfnetlink_log, |
| 5778 | nfnetlink_queue, nfnetlink_conntrack) and their respective users and/or |
| 5779 | management tools in userspace.") |
| 5780 | (license license:gpl2))) |
| 5781 | |
| 5782 | (define-public go-netlink |
| 5783 | (package |
| 5784 | (name "go-netlink") |
| 5785 | (version "1.0.0") |
| 5786 | (source (origin |
| 5787 | (method git-fetch) |
| 5788 | (uri (git-reference |
| 5789 | (url "https://github.com/vishvananda/netlink.git") |
| 5790 | (commit (string-append "v" version)))) |
| 5791 | (file-name (git-file-name name version)) |
| 5792 | (sha256 |
| 5793 | (base32 |
| 5794 | "0hpzghf1a4cwawzhkiwdzin80h6hd09fskl77d5ppgc084yvj8x0")))) |
| 5795 | (build-system go-build-system) |
| 5796 | (arguments |
| 5797 | `(#:import-path "github.com/vishvananda/netlink")) |
| 5798 | (native-inputs |
| 5799 | `(("go-golang-org-x-sys-unix" ,go-golang-org-x-sys-unix) |
| 5800 | ("go-netns" ,go-netns))) |
| 5801 | (home-page "https://github.com/vishvananda/netlink") |
| 5802 | (synopsis "Simple netlink library for Go") |
| 5803 | (description "The netlink package provides a simple netlink library for |
| 5804 | Go. Netlink is the interface a user-space program in Linux uses to |
| 5805 | communicate with the kernel. It can be used to add and remove interfaces, set |
| 5806 | IP addresses and routes, and configure IPsec.") |
| 5807 | (license license:asl2.0))) |
| 5808 | |
| 5809 | (define-public xfsprogs |
| 5810 | (package |
| 5811 | (name "xfsprogs") |
| 5812 | (version "4.20.0") |
| 5813 | (source (origin |
| 5814 | (method url-fetch) |
| 5815 | (uri (string-append |
| 5816 | "mirror://kernel.org/linux/utils/fs/xfs/xfsprogs/" |
| 5817 | "xfsprogs-" version ".tar.gz")) |
| 5818 | (sha256 |
| 5819 | (base32 |
| 5820 | "0ss0r6jlxxinf9fhpc0fgf7b89n9mzirpa85xxjmi1ix9l6cls6x")))) |
| 5821 | (build-system gnu-build-system) |
| 5822 | (arguments |
| 5823 | `(#:tests? #f ;kernel/user integration tests are in package "xfstests" |
| 5824 | #:phases (modify-phases %standard-phases |
| 5825 | (add-after 'install 'install-headers |
| 5826 | (lambda _ |
| 5827 | (invoke "make" "install-dev")))))) |
| 5828 | (native-inputs |
| 5829 | `(("gettext" ,gettext-minimal) |
| 5830 | ("util-linux" ,util-linux))) |
| 5831 | (home-page "https://xfs.wiki.kernel.org/") |
| 5832 | (synopsis "XFS file system tools") |
| 5833 | (description "This package provides commands to create and check XFS |
| 5834 | file systems.") |
| 5835 | ;; The library "libhandle" and the headers in "xfslibs-dev" are |
| 5836 | ;; licensed under lgpl2.1. the other stuff is licensed under gpl2. |
| 5837 | (license (list license:gpl2 license:lgpl2.1)))) |
| 5838 | |
| 5839 | (define-public genext2fs |
| 5840 | (package |
| 5841 | (name "genext2fs") |
| 5842 | (version "1.4.1-4") |
| 5843 | (source (origin |
| 5844 | (method git-fetch) |
| 5845 | (uri (git-reference |
| 5846 | (url "https://github.com/jeremie-koenig/genext2fs.git") |
| 5847 | ;; 1.4.1-3 had a VCS tag but 1.4.1-4 doesn't. |
| 5848 | (commit "9ee43894634998b0b2b309d636f25c64314c9421"))) |
| 5849 | (file-name (git-file-name name version)) |
| 5850 | (sha256 |
| 5851 | (base32 "0ib5icn78ciz00zhc1bgdlrwaxvsdz7wnplwblng0jirwi9ml7sq")))) |
| 5852 | (build-system gnu-build-system) |
| 5853 | (arguments |
| 5854 | `(#:phases |
| 5855 | (modify-phases %standard-phases |
| 5856 | (add-after 'unpack 'apply-debian-patches |
| 5857 | ;; Debian changes (the revision after ‘-’ in VERSION) are |
| 5858 | ;; maintained as separate patches. Apply those relevant to us. |
| 5859 | (lambda _ |
| 5860 | (for-each |
| 5861 | (lambda (file-name) |
| 5862 | (invoke "patch" "-p1" "-i" |
| 5863 | (string-append "debian/patches/" file-name))) |
| 5864 | (list "blocksize+creator.diff" ; add -B/-o options |
| 5865 | "byteswap_fix.diff")) |
| 5866 | #t))))) |
| 5867 | (native-inputs |
| 5868 | `(("autoconf" ,autoconf) |
| 5869 | ("automake" ,automake))) |
| 5870 | (home-page "https://github.com/jeremie-koenig/genext2fs") |
| 5871 | (synopsis "Generate ext2 file system as a normal user") |
| 5872 | (description "This package provides a program to generate an ext2 |
| 5873 | file system as a normal (non-root) user. It does not require you to mount |
| 5874 | the image file to copy files on it, nor does it require that you become |
| 5875 | the superuser to make device nodes.") |
| 5876 | (license license:gpl2))) |
| 5877 | |
| 5878 | (define-public fakeroot |
| 5879 | (package |
| 5880 | (name "fakeroot") |
| 5881 | (version "1.24") |
| 5882 | (source (origin |
| 5883 | (method url-fetch) |
| 5884 | (uri (string-append "https://deb.debian.org/debian/pool/main/f/" |
| 5885 | "fakeroot/fakeroot_" version ".orig.tar.gz")) |
| 5886 | (file-name (string-append name "-" version ".tar.gz")) |
| 5887 | (sha256 |
| 5888 | (base32 |
| 5889 | "1vb6f93hjyqnwx8dc8mm3dgma7axgqk8s7sdsjs8l2rpc0qmn11f")))) |
| 5890 | (build-system gnu-build-system) |
| 5891 | (arguments |
| 5892 | `(#:phases |
| 5893 | (modify-phases %standard-phases |
| 5894 | (add-after 'configure 'patch-Makefile |
| 5895 | (lambda _ |
| 5896 | ;; Note: The root of the problem is already in "Makefile.am". |
| 5897 | (substitute* "Makefile" |
| 5898 | (("/bin/sh") (which "sh"))) |
| 5899 | #t)) |
| 5900 | (add-after 'unpack 'patch-getopt |
| 5901 | (lambda* (#:key inputs #:allow-other-keys) |
| 5902 | (substitute* "scripts/fakeroot.in" |
| 5903 | (("getopt") |
| 5904 | (string-append (assoc-ref inputs "util-linux") |
| 5905 | "/bin/getopt"))) |
| 5906 | #t)) |
| 5907 | (add-before 'configure 'setenv |
| 5908 | (lambda _ |
| 5909 | (setenv "LIBS" "-lacl") |
| 5910 | #t)) |
| 5911 | (add-before 'check 'prepare-check |
| 5912 | (lambda _ |
| 5913 | (setenv "SHELL" (which "bash")) |
| 5914 | (setenv "VERBOSE" "1") |
| 5915 | (substitute* "test/t.touchinstall" |
| 5916 | ;; We don't have the name of the root user, so use ID=0. |
| 5917 | (("grep root") "grep \"\\<0\\>\"")) |
| 5918 | (substitute* "test/tartest" |
| 5919 | ;; We don't have the name of the root group, so use ID=0. |
| 5920 | (("ROOTGROUP=root") "ROOTGROUP=0") |
| 5921 | ;; We don't have the name of the daemon user, so use IDs. |
| 5922 | (("daemon:sys") "1:3") |
| 5923 | (("daemon:") "1:")) |
| 5924 | ;; We don't have an /etc/passwd entry for "root" - use numeric IDs. |
| 5925 | (substitute* "test/compare-tar" |
| 5926 | (("tar -tvf") "tar --numeric-owner -tvf")) |
| 5927 | #t))))) |
| 5928 | (native-inputs |
| 5929 | `(("acl" ,acl) |
| 5930 | ("sharutils" ,sharutils) ; for the tests |
| 5931 | ("xz" ,xz))) ; for the tests |
| 5932 | (inputs |
| 5933 | `(("libcap" ,libcap) |
| 5934 | ("util-linux" ,util-linux))) |
| 5935 | (synopsis "Provides a fake root environment") |
| 5936 | (description "@command{fakeroot} runs a command in an environment where |
| 5937 | it appears to have root privileges for file manipulation. This is useful |
| 5938 | for allowing users to create archives (tar, ar, .deb etc.) with files in |
| 5939 | them with root permissions/ownership. Without fakeroot one would have to |
| 5940 | have root privileges to create the constituent files of the archives with |
| 5941 | the correct permissions and ownership, and then pack them up, or one would |
| 5942 | have to construct the archives directly, without using the archiver.") |
| 5943 | (home-page "http://freshmeat.sourceforge.net/projects/fakeroot") |
| 5944 | (license license:gpl3+))) |
| 5945 | |
| 5946 | (define-public inputattach |
| 5947 | (package |
| 5948 | (name "inputattach") |
| 5949 | (version "0.42.0") |
| 5950 | (source (origin |
| 5951 | (method git-fetch) |
| 5952 | (uri (git-reference |
| 5953 | (url "https://github.com/linuxwacom/input-wacom.git") |
| 5954 | (commit (string-append "input-wacom-" version)))) |
| 5955 | (file-name (git-file-name name version)) |
| 5956 | (sha256 |
| 5957 | (base32 "04lnn7v0rm4ppbya140im5d4igcl6c1nrqpgbsr0i8wkral0nv7j")))) |
| 5958 | (build-system gnu-build-system) |
| 5959 | (arguments |
| 5960 | `(#:phases |
| 5961 | (modify-phases %standard-phases |
| 5962 | (delete 'bootstrap) |
| 5963 | (delete 'configure) |
| 5964 | (replace 'build |
| 5965 | (lambda* (#:key inputs #:allow-other-keys) |
| 5966 | (with-directory-excursion "inputattach" |
| 5967 | (invoke (string-append (assoc-ref inputs "gcc") |
| 5968 | "/bin/gcc") |
| 5969 | "-O2" "-o" "inputattach" "inputattach.c")) |
| 5970 | #t)) |
| 5971 | (delete 'check) |
| 5972 | (replace 'install |
| 5973 | (lambda* (#:key outputs #:allow-other-keys) |
| 5974 | (let ((target-dir (string-append |
| 5975 | (assoc-ref outputs "out") |
| 5976 | "/bin/"))) |
| 5977 | (mkdir-p target-dir) |
| 5978 | (copy-file "inputattach/inputattach" |
| 5979 | (string-append target-dir |
| 5980 | "inputattach")) |
| 5981 | #t)))))) |
| 5982 | (home-page "https://linuxwacom.github.io/") |
| 5983 | (synopsis "Dispatch input peripherals events to a device file") |
| 5984 | (description "inputattach dispatches input events from several device |
| 5985 | types and interfaces and translates so that the X server can use them.") |
| 5986 | (license license:gpl2+))) |