package-management.scm 69 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
  3. ;;; Copyright © 2015, 2017, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
  4. ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
  5. ;;; Copyright © 2017, 2018 Oleg Pykhalov <go.wigust@gmail.com>
  6. ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
  7. ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
  8. ;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
  9. ;;; Copyright © 2018, 2019 Rutger Helling <rhelling@mykolab.com>
  10. ;;; Copyright © 2018 Sou Bunnbu <iyzsong@member.fsf.org>
  11. ;;; Copyright © 2018, 2019 Eric Bavier <bavier@member.fsf.org>
  12. ;;; Copyright © 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
  13. ;;; Copyright © 2019 Jonathan Brielmaier <jonathan.brielmaier@web.de>
  14. ;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
  15. ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
  16. ;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
  17. ;;; Copyright © 2020 Jesse Gibbons <jgibbons2357+guix@gmail.com>
  18. ;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
  19. ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
  20. ;;; Copyright © 2021 Ivan Gankevich <i.gankevich@spbu.ru>
  21. ;;;
  22. ;;; This file is part of GNU Guix.
  23. ;;;
  24. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  25. ;;; under the terms of the GNU General Public License as published by
  26. ;;; the Free Software Foundation; either version 3 of the License, or (at
  27. ;;; your option) any later version.
  28. ;;;
  29. ;;; GNU Guix is distributed in the hope that it will be useful, but
  30. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  31. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  32. ;;; GNU General Public License for more details.
  33. ;;;
  34. ;;; You should have received a copy of the GNU General Public License
  35. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  36. (define-module (gnu packages package-management)
  37. #:use-module (gnu packages)
  38. #:use-module (gnu packages acl)
  39. #:use-module (gnu packages attr)
  40. #:use-module (gnu packages avahi)
  41. #:use-module (gnu packages autotools)
  42. #:use-module (gnu packages backup)
  43. #:use-module (gnu packages base)
  44. #:use-module (gnu packages bash)
  45. #:use-module (gnu packages bdw-gc)
  46. #:use-module (gnu packages bison)
  47. #:use-module (gnu packages boost)
  48. #:use-module (gnu packages bootstrap) ;for 'bootstrap-guile-origin'
  49. #:use-module (gnu packages check)
  50. #:use-module (gnu packages compression)
  51. #:use-module (gnu packages cpio)
  52. #:use-module (gnu packages crypto)
  53. #:use-module (gnu packages curl)
  54. #:use-module (gnu packages databases)
  55. #:use-module (gnu packages dejagnu)
  56. #:use-module (gnu packages dbm)
  57. #:use-module (gnu packages docbook)
  58. #:use-module (gnu packages file)
  59. #:use-module (gnu packages gettext)
  60. #:use-module (gnu packages glib)
  61. #:use-module (gnu packages gnome)
  62. #:use-module (gnu packages gnupg)
  63. #:use-module (gnu packages graphviz)
  64. #:use-module (gnu packages gtk)
  65. #:use-module (gnu packages guile)
  66. #:use-module (gnu packages guile-xyz)
  67. #:use-module (gnu packages hurd)
  68. #:use-module (gnu packages less)
  69. #:use-module (gnu packages libedit)
  70. #:use-module (gnu packages linux)
  71. #:use-module (gnu packages lisp)
  72. #:use-module (gnu packages man)
  73. #:use-module (gnu packages nettle)
  74. #:use-module (gnu packages networking)
  75. #:use-module (gnu packages nss)
  76. #:use-module (gnu packages patchutils)
  77. #:use-module (gnu packages perl)
  78. #:use-module (gnu packages perl-check)
  79. #:use-module (gnu packages pkg-config)
  80. #:use-module (gnu packages popt)
  81. #:use-module (gnu packages python)
  82. #:use-module (gnu packages python-check)
  83. #:use-module (gnu packages python-web)
  84. #:use-module (gnu packages python-xyz)
  85. #:use-module (gnu packages serialization)
  86. #:use-module (gnu packages sqlite)
  87. #:use-module (gnu packages ssh)
  88. #:use-module (gnu packages tcl)
  89. #:use-module (gnu packages texinfo)
  90. #:use-module (gnu packages time)
  91. #:use-module (gnu packages tls)
  92. #:use-module (gnu packages vim)
  93. #:use-module (gnu packages virtualization)
  94. #:use-module (gnu packages web)
  95. #:use-module (gnu packages xml)
  96. #:use-module (gnu packages xorg)
  97. #:use-module (guix build-system glib-or-gtk)
  98. #:use-module (guix build-system gnu)
  99. #:use-module (guix build-system meson)
  100. #:use-module (guix build-system python)
  101. #:use-module (guix download)
  102. #:use-module (guix gexp)
  103. #:use-module (guix git-download)
  104. #:use-module ((guix licenses) #:prefix license:)
  105. #:use-module (guix packages)
  106. #:use-module (guix utils)
  107. #:use-module (ice-9 match)
  108. #:use-module (srfi srfi-1))
  109. (define (boot-guile-uri arch)
  110. "Return the URI for the bootstrap Guile tarball for ARCH."
  111. (cond ((string=? "armhf" arch)
  112. (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
  113. arch "-linux"
  114. "/20150101/guile-2.0.11.tar.xz"))
  115. ((string=? "aarch64" arch)
  116. (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
  117. arch "-linux/20170217/guile-2.0.14.tar.xz"))
  118. (else
  119. (string-append "http://alpha.gnu.org/gnu/guix/bootstrap/"
  120. arch "-linux"
  121. "/20131110/guile-2.0.9.tar.xz"))))
  122. ;; NOTE: The commit IDs used here form a linked list threaded through the git
  123. ;; history. In a phenomenon known as boot-stripping, not only the head of this
  124. ;; list is used, but also a few older versions, when a guix from this package is
  125. ;; used to build something also depending on guix.
  126. ;;
  127. ;; Therefore, if, by accident, you set this package to a non-existent commit ID,
  128. ;; it is insufficient to simply correct it with the latest commit.
  129. ;; Instead, please push one commit that rolls back Guix to before the mistake,
  130. ;; and then another that points to the first one. That way, the faulty commit
  131. ;; won't appear on the linked list.
  132. (define-public guix
  133. ;; Latest version of Guix, which may or may not correspond to a release.
  134. ;; Note: the 'update-guix-package.scm' script expects this definition to
  135. ;; start precisely like this.
  136. (let ((version "1.3.0")
  137. (commit "6243ad3812f8c689599a19f0e8b9719ba14461f2")
  138. (revision 5))
  139. (package
  140. (name "guix")
  141. (version (if (zero? revision)
  142. version
  143. (string-append version "-"
  144. (number->string revision)
  145. "." (string-take commit 7))))
  146. (source (origin
  147. (method git-fetch)
  148. (uri (git-reference
  149. (url "https://git.savannah.gnu.org/git/guix.git")
  150. (commit commit)))
  151. (sha256
  152. (base32
  153. "0i3sgk2w2yjy9ip47vk0h17afk16yl5ih3p3q75083kgjzyjdm3d"))
  154. (file-name (string-append "guix-" version "-checkout"))))
  155. (build-system gnu-build-system)
  156. (arguments
  157. `(#:configure-flags (list
  158. ;; Provide channel metadata for 'guix describe'.
  159. ;; Don't pass '--with-channel-url' and
  160. ;; '--with-channel-introduction' and instead use
  161. ;; the defaults.
  162. ,(string-append "--with-channel-commit=" commit)
  163. "--localstatedir=/var"
  164. "--sysconfdir=/etc"
  165. (string-append "--with-bash-completion-dir="
  166. (assoc-ref %outputs "out")
  167. "/etc/bash_completion.d")
  168. ;; Set 'DOT_USER_PROGRAM' to the empty string so
  169. ;; we don't keep a reference to Graphviz, whose
  170. ;; closure is pretty big (too big for the Guix
  171. ;; system installation image.)
  172. "ac_cv_path_DOT_USER_PROGRAM=dot"
  173. ;; To avoid problems with the length of shebangs,
  174. ;; choose a fixed-width and short directory name
  175. ;; for tests.
  176. "ac_cv_guix_test_root=/tmp/guix-tests"
  177. ,@(if (hurd-target?) '("--with-courage") '()))
  178. #:parallel-tests? #f ;work around <http://bugs.gnu.org/21097>
  179. #:modules ((guix build gnu-build-system)
  180. (guix build utils)
  181. (srfi srfi-26)
  182. (ice-9 popen)
  183. (ice-9 rdelim))
  184. #:phases (modify-phases %standard-phases
  185. (replace 'bootstrap
  186. (lambda _
  187. ;; Make sure 'msgmerge' can modify the PO files.
  188. (for-each (lambda (po)
  189. (chmod po #o666))
  190. (find-files "." "\\.po$"))
  191. (patch-shebang "build-aux/git-version-gen")
  192. (call-with-output-file ".tarball-version"
  193. (lambda (port)
  194. (display ,version port)))
  195. ;; Install SysV init files to $(prefix)/etc rather
  196. ;; than to /etc.
  197. (substitute* "nix/local.mk"
  198. (("^sysvinitservicedir = .*$")
  199. (string-append "sysvinitservicedir = \
  200. $(prefix)/etc/init.d\n")))
  201. ;; Install OpenRC init files to $(prefix)/etc rather
  202. ;; than to /etc.
  203. (substitute* "nix/local.mk"
  204. (("^openrcservicedir = .*$")
  205. (string-append "openrcservicedir = \
  206. $(prefix)/etc/openrc\n")))
  207. (invoke "sh" "bootstrap")))
  208. (add-before 'build 'use-host-compressors
  209. (lambda* (#:key inputs target #:allow-other-keys)
  210. (when target
  211. ;; Use host compressors.
  212. (let ((bzip2 (assoc-ref inputs "bzip2"))
  213. (gzip (assoc-ref inputs "gzip"))
  214. (xz (assoc-ref inputs "xz")))
  215. (substitute* "guix/config.scm"
  216. (("\"[^\"]*/bin/bzip2")
  217. (string-append "\"" bzip2 "/bin/bzip2"))
  218. (("\"[^\"]*/bin/gzip") gzip
  219. (string-append "\"" gzip "/bin/gzip"))
  220. (("\"[^\"]*/bin//xz")
  221. (string-append "\"" xz "/bin/xz")))))
  222. #t))
  223. (add-before 'check 'copy-bootstrap-guile
  224. (lambda* (#:key system target inputs #:allow-other-keys)
  225. ;; Copy the bootstrap guile tarball in the store
  226. ;; used by the test suite.
  227. (define (intern file recursive?)
  228. ;; Note: don't use 'guix download' here because we
  229. ;; need to set the 'recursive?' argument.
  230. (define base
  231. (strip-store-file-name file))
  232. (define code
  233. `(begin
  234. (use-modules (guix))
  235. (with-store store
  236. (let* ((item (add-to-store store ,base
  237. ,recursive?
  238. "sha256" ,file))
  239. (root (string-append "/tmp/gc-root-"
  240. (basename item))))
  241. ;; Register a root so that the GC tests
  242. ;; don't delete those.
  243. (symlink item root)
  244. (add-indirect-root store root)))))
  245. (invoke "./test-env" "guile" "-c"
  246. (object->string code)))
  247. (unless target
  248. (intern (assoc-ref inputs "boot-guile") #f)
  249. ;; On x86_64 some tests need the i686 Guile.
  250. (when (and (not target)
  251. (string=? system "x86_64-linux"))
  252. (intern (assoc-ref inputs "boot-guile/i686") #f))
  253. ;; Copy the bootstrap executables.
  254. (for-each (lambda (input)
  255. (intern (assoc-ref inputs input) #t))
  256. '("bootstrap/bash" "bootstrap/mkdir"
  257. "bootstrap/tar" "bootstrap/xz")))
  258. #t))
  259. (add-after 'unpack 'disable-failing-tests
  260. ;; XXX FIXME: These tests fail within the build container.
  261. (lambda _
  262. (substitute* "tests/syscalls.scm"
  263. (("^\\(test-(assert|equal) \"(clone|setns|pivot-root)\"" all)
  264. (string-append "(test-skip 1)\n" all)))
  265. (substitute* "tests/containers.scm"
  266. (("^\\(test-(assert|equal)" all)
  267. (string-append "(test-skip 1)\n" all)))
  268. (when (file-exists? "tests/guix-environment-container.sh")
  269. (substitute* "tests/guix-environment-container.sh"
  270. (("guix environment --version")
  271. "exit 77\n")))
  272. #t))
  273. (add-before 'check 'set-SHELL
  274. (lambda _
  275. ;; 'guix environment' tests rely on 'SHELL' having a
  276. ;; correct value, so set it.
  277. (setenv "SHELL" (which "sh"))
  278. #t))
  279. (add-after 'install 'wrap-program
  280. (lambda* (#:key inputs native-inputs outputs target
  281. #:allow-other-keys)
  282. ;; Make sure the 'guix' command finds GnuTLS,
  283. ;; Guile-JSON, and Guile-Git automatically.
  284. (let* ((out (assoc-ref outputs "out"))
  285. (guile (assoc-ref (or native-inputs inputs)
  286. "guile"))
  287. (avahi (assoc-ref inputs "guile-avahi"))
  288. (gcrypt (assoc-ref inputs "guile-gcrypt"))
  289. (guile-lib (assoc-ref inputs "guile-lib"))
  290. (json (assoc-ref inputs "guile-json"))
  291. (sqlite (assoc-ref inputs "guile-sqlite3"))
  292. (zlib (assoc-ref inputs "guile-zlib"))
  293. (lzlib (assoc-ref inputs "guile-lzlib"))
  294. (zstd (assoc-ref inputs "guile-zstd"))
  295. (git (assoc-ref inputs "guile-git"))
  296. (bs (assoc-ref inputs
  297. "guile-bytestructures"))
  298. (ssh (assoc-ref inputs "guile-ssh"))
  299. (gnutls (assoc-ref inputs "gnutls"))
  300. (disarchive (assoc-ref inputs "disarchive"))
  301. (locales (assoc-ref inputs "glibc-utf8-locales"))
  302. (deps (list gcrypt json sqlite gnutls git
  303. bs ssh zlib lzlib zstd guile-lib
  304. disarchive))
  305. (deps* (if avahi (cons avahi deps) deps))
  306. (effective
  307. (read-line
  308. (open-pipe* OPEN_READ
  309. (string-append guile "/bin/guile")
  310. "-c" "(display (effective-version))")))
  311. (path (map (cut string-append <>
  312. "/share/guile/site/"
  313. effective)
  314. (delete #f deps*)))
  315. (gopath (map (cut string-append <>
  316. "/lib/guile/" effective
  317. "/site-ccache")
  318. (delete #f deps*)))
  319. (locpath (string-append locales "/lib/locale")))
  320. ;; Modify 'guix' directly instead of using
  321. ;; 'wrap-program'. This avoids the indirection
  322. ;; through Bash, which in turn avoids getting Bash's
  323. ;; own locale warnings.
  324. (substitute* (string-append out "/bin/guix")
  325. (("!#")
  326. (string-append
  327. "!#\n\n"
  328. (object->string
  329. `(set! %load-path (append ',path %load-path)))
  330. "\n"
  331. (object->string
  332. `(set! %load-compiled-path
  333. (append ',gopath %load-compiled-path)))
  334. "\n"
  335. (object->string
  336. `(let ((path (getenv "GUIX_LOCPATH")))
  337. (setenv "GUIX_LOCPATH"
  338. (if path
  339. (string-append path ":" ,locpath)
  340. ,locpath))))
  341. "\n\n"))))))
  342. ;; The 'guix' executable has 'OUT/libexec/guix/guile' as
  343. ;; its shebang; that should remain unchanged, thus remove
  344. ;; the 'patch-shebangs' phase, which would otherwise
  345. ;; change it to 'GUILE/bin/guile'.
  346. (delete 'patch-shebangs))))
  347. (native-inputs `(("pkg-config" ,pkg-config)
  348. ;; Guile libraries are needed here for
  349. ;; cross-compilation.
  350. ("guile" ,guile-3.0-latest) ;for faster builds
  351. ("gnutls" ,gnutls)
  352. ,@(if (%current-target-system)
  353. '()
  354. `(("guile-avahi" ,guile-avahi)))
  355. ("guile-gcrypt" ,guile-gcrypt)
  356. ("guile-json" ,guile-json-4)
  357. ("guile-lib" ,guile-lib)
  358. ("guile-sqlite3" ,guile-sqlite3)
  359. ("guile-zlib" ,guile-zlib)
  360. ("guile-lzlib" ,guile-lzlib)
  361. ("guile-zstd" ,guile-zstd)
  362. ("guile-ssh" ,guile-ssh)
  363. ("guile-git" ,guile-git)
  364. ;; XXX: Keep the development inputs here even though
  365. ;; they're unnecessary, just so that 'guix environment
  366. ;; guix' always contains them.
  367. ("autoconf" ,autoconf)
  368. ("automake" ,automake)
  369. ("gettext" ,gettext-minimal)
  370. ("texinfo" ,texinfo)
  371. ("graphviz" ,graphviz)
  372. ("help2man" ,help2man)
  373. ("po4a" ,po4a)))
  374. (inputs
  375. `(("bzip2" ,bzip2)
  376. ("gzip" ,gzip)
  377. ("sqlite" ,sqlite)
  378. ("libgcrypt" ,libgcrypt)
  379. ("guile" ,guile-3.0-latest)
  380. ;; Some of the tests use "unshare" when it is available.
  381. ("util-linux" ,util-linux)
  382. ;; Many tests rely on the 'guile-bootstrap' package, which is why we
  383. ;; have it here.
  384. ("boot-guile" ,(bootstrap-guile-origin (%current-system)))
  385. ,@(if (and (not (%current-target-system))
  386. (string=? (%current-system) "x86_64-linux"))
  387. `(("boot-guile/i686" ,(bootstrap-guile-origin "i686-linux")))
  388. '())
  389. ,@(if (%current-target-system)
  390. `(("xz" ,xz))
  391. '())
  392. ;; Tests also rely on these bootstrap executables.
  393. ("bootstrap/bash" ,(bootstrap-executable "bash" (%current-system)))
  394. ("bootstrap/mkdir" ,(bootstrap-executable "mkdir" (%current-system)))
  395. ("bootstrap/tar" ,(bootstrap-executable "tar" (%current-system)))
  396. ("bootstrap/xz" ,(bootstrap-executable "xz" (%current-system)))
  397. ("disarchive" ,disarchive) ;for 'guix perform-download'
  398. ("glibc-utf8-locales" ,glibc-utf8-locales)))
  399. (propagated-inputs
  400. `(("gnutls" ,gnutls)
  401. ;; Avahi requires "glib" which doesn't cross-compile yet.
  402. ,@(if (%current-target-system)
  403. '()
  404. `(("guile-avahi" ,guile-avahi)))
  405. ("guile-gcrypt" ,guile-gcrypt)
  406. ("guile-json" ,guile-json-4)
  407. ("guile-lib" ,guile-lib)
  408. ("guile-sqlite3" ,guile-sqlite3)
  409. ("guile-ssh" ,guile-ssh)
  410. ("guile-git" ,guile-git)
  411. ("guile-zlib" ,guile-zlib)
  412. ("guile-lzlib" ,guile-lzlib)
  413. ("guile-zstd" ,guile-zstd)))
  414. (native-search-paths
  415. (list (search-path-specification
  416. (variable "GUIX_EXTENSIONS_PATH")
  417. (files '("share/guix/extensions")))
  418. ;; (guix git) and (guix build download) honor this variable whose
  419. ;; name comes from OpenSSL.
  420. (search-path-specification
  421. (variable "SSL_CERT_DIR")
  422. (separator #f) ;single entry
  423. (files '("etc/ssl/certs")))))
  424. (home-page "https://www.gnu.org/software/guix/")
  425. (synopsis "Functional package manager for installed software packages and versions")
  426. (description
  427. "GNU Guix is a functional package manager for the GNU system, and is
  428. also a distribution thereof. It includes a virtual machine image. Besides
  429. the usual package management features, it also supports transactional
  430. upgrades and roll-backs, per-user profiles, and much more. It is based on
  431. the Nix package manager.")
  432. (license license:gpl3+)
  433. (properties '((ftp-server . "alpha.gnu.org"))))))
  434. (define-public guix-daemon
  435. ;; This package is for internal consumption: it allows us to quickly build
  436. ;; the 'guix-daemon' program and use that in (guix self), used by 'guix
  437. ;; pull'.
  438. (package
  439. (inherit guix)
  440. (properties `((hidden? . #t)))
  441. (name "guix-daemon")
  442. ;; Use a minimum set of dependencies.
  443. (native-inputs
  444. (fold alist-delete (package-native-inputs guix)
  445. '("po4a" "graphviz" "help2man")))
  446. (inputs
  447. `(("gnutls" ,gnutls)
  448. ("guile-git" ,guile-git)
  449. ("guile-json" ,guile-json-3)
  450. ("guile-gcrypt" ,guile-gcrypt)
  451. ,@(fold alist-delete (package-inputs guix)
  452. '("boot-guile" "boot-guile/i686" "util-linux"))))
  453. (propagated-inputs '())
  454. (arguments
  455. (substitute-keyword-arguments (package-arguments guix)
  456. ((#:configure-flags flags '())
  457. ;; Pretend we have those libraries; we don't actually need them.
  458. `(append ,flags
  459. '("guix_cv_have_recent_guile_sqlite3=yes"
  460. "guix_cv_have_recent_guile_ssh=yes")))
  461. ((#:tests? #f #f)
  462. #f)
  463. ((#:phases phases '%standard-phases)
  464. `(modify-phases ,phases
  465. (add-after 'unpack 'change-default-guix
  466. (lambda _
  467. ;; We need to tell 'guix-daemon' which 'guix' command to use.
  468. ;; Here we use a questionable hack where we hard-code root's
  469. ;; current guix, which could be wrong (XXX). Note that scripts
  470. ;; like 'guix perform-download' do not run as root so we assume
  471. ;; that they have access to /var/guix/profiles/per-user/root.
  472. (substitute* "nix/libstore/globals.cc"
  473. (("guixProgram = (.*)nixBinDir + \"/guix\"" _ before)
  474. (string-append "guixProgram = " before
  475. "/var/guix/profiles/per-user/root\
  476. /current-guix/bin/guix")))
  477. #t))
  478. (replace 'build
  479. (lambda _
  480. (invoke "make" "nix/libstore/schema.sql.hh")
  481. (invoke "make" "-j" (number->string
  482. (parallel-job-count))
  483. "guix-daemon")))
  484. (delete 'copy-bootstrap-guile)
  485. (replace 'install
  486. (lambda* (#:key outputs #:allow-other-keys)
  487. (invoke "make" "install-binPROGRAMS")))
  488. (delete 'wrap-program)))))))
  489. (define-public guile3.0-guix
  490. (deprecated-package "guile3.0-guix" guix))
  491. (define-public guix-minimal
  492. ;; A version of Guix which is built with the minimal set of dependencies, as
  493. ;; outlined in the README "Requirements" section. Intended as a CI job, so
  494. ;; marked as hidden.
  495. (hidden-package
  496. (package
  497. (inherit guix)
  498. (name "guix-minimal")
  499. (native-inputs
  500. (fold alist-delete
  501. (package-native-inputs guix)
  502. '("guile-ssh")))
  503. (propagated-inputs
  504. (fold alist-delete
  505. (package-propagated-inputs guix)
  506. '("guile-ssh"))))))
  507. (define (source-file? file stat)
  508. "Return true if FILE is likely a source file, false if it is a typical
  509. generated file."
  510. (define (wrong-extension? file)
  511. (or (string-suffix? "~" file)
  512. (member (file-extension file)
  513. '("o" "a" "lo" "so" "go"))))
  514. (match (basename file)
  515. ((or ".git" "autom4te.cache" "configure" "Makefile" "Makefile.in" ".libs")
  516. #f)
  517. ((? wrong-extension?)
  518. #f)
  519. (_
  520. #t)))
  521. (define-public current-guix-package
  522. ;; This parameter allows callers to override the package that 'current-guix'
  523. ;; returns. This is useful when 'current-guix' cannot compute it by itself,
  524. ;; for instance because it's not running from a source code checkout.
  525. (make-parameter #f))
  526. (define-public current-guix
  527. (let* ((repository-root (delay (canonicalize-path
  528. (string-append (current-source-directory)
  529. "/../.."))))
  530. (select? (delay (or (git-predicate (force repository-root))
  531. source-file?))))
  532. (lambda ()
  533. "Return a package representing Guix built from the current source tree.
  534. This works by adding the current source tree to the store (after filtering it
  535. out) and returning a package that uses that as its 'source'."
  536. (or (current-guix-package)
  537. (package
  538. (inherit guix)
  539. (version (string-append (package-version guix) "+"))
  540. (source (local-file (force repository-root) "guix-current"
  541. #:recursive? #t
  542. #:select? (force select?))))))))
  543. ;;;
  544. ;;; Other tools.
  545. ;;;
  546. (define-public nix
  547. (package
  548. (name "nix")
  549. (version "2.3.13")
  550. (source (origin
  551. (method url-fetch)
  552. (uri (string-append "https://releases.nixos.org/nix/nix-"
  553. version "/nix-" version ".tar.xz"))
  554. (sha256
  555. (base32
  556. "0631qk2lgd76y6g2z45wy6lcpv647r2a08jd2dagzzpwniy68d3h"))))
  557. (build-system gnu-build-system)
  558. (arguments
  559. `(#:configure-flags '("--sysconfdir=/etc" "--enable-gc")
  560. #:phases
  561. (modify-phases %standard-phases
  562. (replace 'install
  563. ;; Don't try & fail to create subdirectories in /etc, but keep them
  564. ;; in the output as examples.
  565. (lambda* (#:key (make-flags '()) outputs #:allow-other-keys)
  566. (let* ((out (assoc-ref outputs "out"))
  567. (etc (string-append out "/etc")))
  568. (apply invoke "make" "install"
  569. (string-append "sysconfdir=" etc)
  570. (string-append "profiledir=" etc "/profile.d")
  571. make-flags)))))))
  572. (native-inputs `(("pkg-config" ,pkg-config)))
  573. (inputs `(("boost" ,boost)
  574. ("brotli" ,brotli)
  575. ("bzip2" ,bzip2)
  576. ("curl" ,curl)
  577. ("editline" ,editline)
  578. ("libgc" ,libgc)
  579. ("libseccomp" ,libseccomp)
  580. ("libsodium" ,libsodium)
  581. ("openssl" ,openssl)
  582. ("sqlite" ,sqlite)
  583. ("xz" ,xz)))
  584. (home-page "https://nixos.org/nix/")
  585. (synopsis "The Nix package manager")
  586. (description
  587. "Nix is a purely functional package manager. This means that it treats
  588. packages like values in purely functional programming languages such as
  589. Haskell—they are built by functions that don't have side-effects, and they
  590. never change after they have been built. Nix stores packages in the Nix
  591. store, usually the directory /nix/store, where each package has its own unique
  592. sub-directory.")
  593. (license license:lgpl2.1+)))
  594. (define-public stow
  595. (package
  596. (name "stow")
  597. (version "2.3.1")
  598. (source (origin
  599. (method url-fetch)
  600. (uri (string-append "mirror://gnu/stow/stow-"
  601. version ".tar.gz"))
  602. (sha256
  603. (base32
  604. "0jrxy12ywn7smdzdnvwzjw77l6knx6jkj2rckgykg1dpf6bdkm89"))))
  605. (build-system gnu-build-system)
  606. (inputs
  607. `(("perl" ,perl)))
  608. (native-inputs
  609. `(("perl-test-simple" ,perl-test-simple)
  610. ("perl-test-output" ,perl-test-output)
  611. ("perl-capture-tiny" ,perl-capture-tiny)
  612. ("perl-io-stringy" ,perl-io-stringy)))
  613. (home-page "https://www.gnu.org/software/stow/")
  614. (synopsis "Managing installed software packages")
  615. (description
  616. "GNU Stow is a symlink manager. It generates symlinks to directories
  617. of data and makes them appear to be merged into the same directory. It is
  618. typically used for managing software packages installed from source, by
  619. letting you install them apart in distinct directories and then create
  620. symlinks to the files in a common directory such as /usr/local.")
  621. (license license:gpl3+)))
  622. (define-public xstow
  623. (package
  624. (name "xstow")
  625. (version "1.0.2")
  626. (source (origin
  627. (method url-fetch)
  628. (uri (string-append "mirror://sourceforge/xstow/xstow-"
  629. version ".tar.bz2"))
  630. (sha256
  631. (base32
  632. "1vy6lcswpkixh7h5mvsmq2wbcih6lpsmcva3m7v6f5npllciy13g"))))
  633. (build-system gnu-build-system)
  634. (synopsis "Replacement of GNU Stow written in C++")
  635. (description
  636. "XStow is a replacement of GNU Stow written in C++. It supports all
  637. features of Stow with some extensions.")
  638. (home-page "http://xstow.sourceforge.net/")
  639. (license license:gpl2)))
  640. (define-public rpm
  641. (package
  642. (name "rpm")
  643. (version "4.16.1.3")
  644. (source (origin
  645. (method url-fetch)
  646. (uri (string-append "http://ftp.rpm.org/releases/rpm-"
  647. (version-major+minor version) ".x/rpm-"
  648. version ".tar.bz2"))
  649. (sha256
  650. (base32
  651. "07g2g0adgjm29wqy94iqhpp5dk0hacfw1yf7kzycrrxnfbwwfgai"))))
  652. (build-system gnu-build-system)
  653. (arguments
  654. '(#:configure-flags '("--with-external-db" ;use the system's bdb
  655. "--enable-python"
  656. "--without-lua")
  657. #:phases (modify-phases %standard-phases
  658. (add-before 'configure 'set-nss-library-path
  659. (lambda* (#:key inputs #:allow-other-keys)
  660. (let ((nss (assoc-ref inputs "nss")))
  661. (setenv "LIBRARY_PATH"
  662. (string-append (getenv "LIBRARY_PATH") ":"
  663. nss "/lib/nss"))
  664. #t))))))
  665. (native-inputs
  666. `(("pkg-config" ,pkg-config)))
  667. (inputs
  668. `(("python" ,python)
  669. ("xz" ,xz)
  670. ("bdb" ,bdb)
  671. ("popt" ,popt)
  672. ("nss" ,nss)
  673. ("nspr" ,nspr)
  674. ("libarchive" ,libarchive)
  675. ("libgcrypt" ,libgcrypt)
  676. ("file" ,file)
  677. ("bzip2" ,bzip2)
  678. ("zlib" ,zlib)
  679. ("cpio" ,cpio)))
  680. (home-page "https://rpm.org/")
  681. (synopsis "The RPM Package Manager")
  682. (description
  683. "The RPM Package Manager (RPM) is a command-line driven package
  684. management system capable of installing, uninstalling, verifying, querying,
  685. and updating computer software packages. Each software package consists of an
  686. archive of files along with information about the package like its version, a
  687. description. There is also a library permitting developers to manage such
  688. transactions from C or Python.")
  689. ;; The whole is GPLv2+; librpm itself is dual-licensed LGPLv2+ | GPLv2+.
  690. (license license:gpl2+)))
  691. (define-public python-anaconda-client
  692. (package
  693. (name "python-anaconda-client")
  694. (version "1.8.0")
  695. (source
  696. (origin
  697. (method git-fetch)
  698. (uri (git-reference
  699. (url "https://github.com/Anaconda-Platform/anaconda-client")
  700. (commit version)))
  701. (file-name (git-file-name name version))
  702. (sha256
  703. (base32
  704. "1vyk0g0gci4z9psisb8h50zi3j1nwfdg1jw3j76cxv0brln0v3fw"))))
  705. (build-system python-build-system)
  706. (propagated-inputs
  707. `(("python-clyent" ,python-clyent)
  708. ("python-nbformat" ,python-nbformat)
  709. ("python-pyyaml" ,python-pyyaml)
  710. ("python-requests" ,python-requests)))
  711. (native-inputs
  712. `(("python-coverage" ,python-coverage)
  713. ("python-dateutil" ,python-dateutil)
  714. ("python-freezegun" ,python-freezegun)
  715. ("python-mock" ,python-mock)
  716. ("python-pillow" ,python-pillow)
  717. ("python-pytz" ,python-pytz)))
  718. (arguments
  719. `(#:phases
  720. (modify-phases %standard-phases
  721. ;; This is needed for some tests.
  722. (add-before 'check 'set-up-home
  723. (lambda* _ (setenv "HOME" "/tmp") #t))
  724. (add-before 'check 'remove-network-tests
  725. (lambda* _
  726. ;; Remove tests requiring a network connection
  727. (let ((network-tests '("tests/test_upload.py"
  728. "tests/test_authorizations.py"
  729. "tests/test_login.py"
  730. "tests/test_whoami.py"
  731. "utils/notebook/tests/test_data_uri.py"
  732. "utils/notebook/tests/test_base.py"
  733. "utils/notebook/tests/test_downloader.py"
  734. "inspect_package/tests/test_conda.py")))
  735. (with-directory-excursion "binstar_client"
  736. (for-each delete-file network-tests)))
  737. #t)))))
  738. (home-page "https://github.com/Anaconda-Platform/anaconda-client")
  739. (synopsis "Anaconda Cloud command line client library")
  740. (description
  741. "Anaconda Cloud command line client library provides an interface to
  742. Anaconda Cloud. Anaconda Cloud is useful for sharing packages, notebooks and
  743. environments.")
  744. (license license:bsd-3)))
  745. (define-public python-conda-package-handling
  746. (package
  747. (name "python-conda-package-handling")
  748. (version "1.7.3")
  749. (source
  750. (origin
  751. (method git-fetch)
  752. (uri (git-reference
  753. (url "https://github.com/conda/conda-package-handling/")
  754. (commit version)))
  755. (file-name (git-file-name name version))
  756. (sha256
  757. (base32
  758. "1dq6f5ks3cinb355x712bls9bvv6bli6x3c43sdkqvawdw8xgv9j"))))
  759. (build-system python-build-system)
  760. (arguments
  761. `(#:phases
  762. (modify-phases %standard-phases
  763. (add-after 'unpack 'use-unmodified-libarchive
  764. (lambda _
  765. (substitute* "setup.py"
  766. (("archive_and_deps") "archive"))))
  767. (replace 'check
  768. (lambda* (#:key inputs outputs #:allow-other-keys)
  769. (add-installed-pythonpath inputs outputs)
  770. (invoke "pytest" "-vv" "tests"))))))
  771. (propagated-inputs
  772. `(("python-six" ,python-six)
  773. ("python-tqdm" ,python-tqdm)))
  774. (inputs
  775. `(("libarchive" ,libarchive)))
  776. (native-inputs
  777. `(("python-cython" ,python-cython)
  778. ("python-pytest" ,python-pytest)
  779. ("python-pytest-cov" ,python-pytest-cov)
  780. ("python-pytest-mock" ,python-pytest-mock)
  781. ("python-mock" ,python-mock)))
  782. (home-page "https://conda.io")
  783. (synopsis "Create and extract conda packages of various formats")
  784. (description
  785. "This library is an abstraction of Conda package handling and a tool for
  786. extracting, creating, and converting between formats.")
  787. (license license:bsd-3)))
  788. (define-public conda
  789. (package
  790. (name "conda")
  791. (version "4.10.3")
  792. (source
  793. (origin
  794. (method git-fetch)
  795. (uri (git-reference
  796. (url "https://github.com/conda/conda")
  797. (commit version)))
  798. (file-name (git-file-name name version))
  799. (sha256
  800. (base32
  801. "1w4yy62bsvkybjvcm5fspck4ns5j16nplzpbx6bxv7zhx69pcp4n"))))
  802. (build-system python-build-system)
  803. (arguments
  804. `(#:phases
  805. (modify-phases %standard-phases
  806. (add-after 'unpack 'fix-permissions
  807. (lambda _
  808. ;; This file is no longer writable after downloading with
  809. ;; 'git-fetch'
  810. (make-file-writable
  811. "tests/conda_env/support/saved-env/environment.yml")))
  812. (add-after 'unpack 'fix-ruamel-yaml-dependency
  813. (lambda _
  814. (substitute* "setup.py"
  815. (("ruamel_yaml_conda") "ruamel.yaml"))))
  816. (add-after 'unpack 'correct-python-executable-name
  817. (lambda* (#:key inputs #:allow-other-keys)
  818. (let ((python (assoc-ref inputs "python-wrapper")))
  819. #;
  820. (substitute* "conda/common/path.py"
  821. (("python_version or ''")
  822. "python_version or '3'"))
  823. (substitute* "conda/core/initialize.py"
  824. (("python_exe = join")
  825. (format #f "python_exe = \"~a/bin/python\" #"
  826. python))))
  827. #t))
  828. (add-after 'unpack 'do-not-use-python-root-as-prefix
  829. (lambda* (#:key inputs outputs #:allow-other-keys)
  830. (let ((out (assoc-ref outputs "out"))
  831. (python (assoc-ref inputs "python-wrapper")))
  832. (substitute* "tests/core/test_initialize.py"
  833. (("\"\"\"\\) % conda_prefix")
  834. (format #f "\"\"\") % \"~a\"" python))
  835. (("CONDA_PYTHON_EXE \"%s\"' % join\\(conda_prefix")
  836. (format #f "CONDA_PYTHON_EXE \"%s\"' % join(\"~a\""
  837. python))
  838. (("conda_prefix = abspath\\(sys.prefix\\)")
  839. (format #f "conda_prefix = abspath(\"~a\")" out)))
  840. (substitute* "conda/base/context.py"
  841. (("os.chdir\\(sys.prefix\\)")
  842. (format #f "os.chdir(\"~a\")" out))
  843. (("sys.prefix, '.condarc'")
  844. (format #f "\"~a\", '.condarc'" out))
  845. (("return abspath\\(sys.prefix\\)")
  846. (format #f "return abspath(\"~a\")" out))
  847. (("os.path.join\\(sys.prefix, bin_dir, exe\\)")
  848. (format #f "\"~a/bin/conda\"" out))
  849. (("'CONDA_EXE', sys.executable")
  850. (format #f "'CONDA_EXE', \"~a/bin/conda\"" out))))
  851. #t))
  852. (add-before 'build 'create-version-file
  853. (lambda _
  854. (with-output-to-file "conda/.version"
  855. (lambda () (display ,version)))
  856. #t))
  857. (replace 'check
  858. (lambda _
  859. (setenv "HOME" "/tmp")
  860. (invoke "py.test" "-vv"
  861. "-k"
  862. (string-append
  863. "not integration"
  864. ;; This one reports a newer version of conda than
  865. ;; expected.
  866. " and not test_auto_update_conda"
  867. ;; This fails because the output directory is not a
  868. ;; Conda environment.
  869. " and not test_list"
  870. ;; This fails because we patched the default root
  871. ;; prefix.
  872. " and not test_default_target_is_root_prefix"
  873. ;; These fail because ...
  874. ;; TODO: conda patches its own shebang to
  875. ;; $conda-prefix/bin/python, which is obviously wrong.
  876. " and not test_run_returns_int"
  877. " and not test_run_returns_zero_errorlevel"
  878. " and not test_run_returns_nonzero_errorlevel"
  879. ;; TODO: I don't understand what this failure means
  880. " and not test_PrefixData_return_value_contract"
  881. ;; TODO: same here
  882. " and not test_install_1"
  883. ;; Not sure if this is really wrong. This fails because
  884. ;; /gnu/store/...python-conda-4.8.3/bin/python
  885. ;; is not /gnu/store/...python-wrapper-3.8.2/bin/python
  886. " and not test_make_entry_point"))))
  887. (add-after 'install 'init
  888. ;; This writes a whole bunch of shell initialization files to the
  889. ;; prefix directory. Many features of conda can only be used after
  890. ;; running "conda init".
  891. (lambda* (#:key inputs outputs #:allow-other-keys)
  892. (add-installed-pythonpath inputs outputs)
  893. (setenv "HOME" "/tmp")
  894. (invoke (string-append (assoc-ref outputs "out")
  895. "/bin/conda")
  896. "init"))))))
  897. (inputs
  898. `(("python-wrapper" ,python-wrapper)))
  899. (propagated-inputs
  900. `(("python-anaconda-client" ,python-anaconda-client)
  901. ("python-conda-package-handling" ,python-conda-package-handling)
  902. ("python-cytoolz" ,python-cytoolz)
  903. ("python-pycosat" ,python-pycosat)
  904. ("python-pytest" ,python-pytest)
  905. ("python-pyyaml" ,python-pyyaml)
  906. ("python-requests" ,python-requests)
  907. ("python-responses" ,python-responses)
  908. ("python-ruamel.yaml" ,python-ruamel.yaml)
  909. ("python-tqdm" ,python-tqdm)
  910. ;; XXX: This is dragged in by libarchive and is needed at runtime.
  911. ("zstd" ,zstd)))
  912. (native-inputs
  913. `(("python-pytest-timeout" ,python-pytest-timeout)))
  914. (home-page "https://github.com/conda/conda")
  915. (synopsis "Cross-platform, OS-agnostic, system-level binary package manager")
  916. (description
  917. "Conda is a cross-platform, Python-agnostic binary package manager. It
  918. is the package manager used by Anaconda installations, but it may be used for
  919. other systems as well. Conda makes environments first-class citizens, making
  920. it easy to create independent environments even for C libraries. Conda is
  921. written entirely in Python.")
  922. (license license:bsd-3)))
  923. (define-public python-conda
  924. (deprecated-package "python-conda" conda))
  925. (define-public gwl
  926. (package
  927. (name "gwl")
  928. (version "0.3.0")
  929. (source (origin
  930. (method url-fetch)
  931. (uri (string-append "mirror://gnu/gwl/gwl-" version ".tar.gz"))
  932. (sha256
  933. (base32
  934. "1lqif00mq7fsaknbc2gvvcv1j89k311sm44jp9jklbrv0v2lc83n"))))
  935. (build-system gnu-build-system)
  936. (arguments
  937. `(#:parallel-build? #false ; for reproducibility
  938. #:make-flags
  939. '("GUILE_AUTO_COMPILE=0")))
  940. (native-inputs
  941. `(("autoconf" ,autoconf)
  942. ("automake" ,automake)
  943. ("pkg-config" ,pkg-config)
  944. ("texinfo" ,texinfo)
  945. ("graphviz" ,graphviz)))
  946. (inputs
  947. (let ((p (package-input-rewriting
  948. `((,guile-3.0 . ,guile-3.0-latest))
  949. #:deep? #false)))
  950. `(("guix" ,guix)
  951. ("guile" ,guile-3.0-latest)
  952. ("guile-commonmark" ,(p guile-commonmark))
  953. ("guile-config" ,(p guile-config))
  954. ("guile-gcrypt" ,(p guile-gcrypt))
  955. ("guile-pfds" ,(p guile-pfds))
  956. ("guile-syntax-highlight" ,(p guile-syntax-highlight))
  957. ("guile-wisp" ,(p guile-wisp)))))
  958. (home-page "https://workflows.guix.info")
  959. (synopsis "Workflow management extension for GNU Guix")
  960. (description "The @dfn{Guix Workflow Language} (GWL) provides an
  961. extension to GNU Guix's declarative language for package management to
  962. automate the execution of programs in scientific workflows. The GWL
  963. can use process engines to integrate with various computing
  964. environments.")
  965. ;; The Scheme modules in guix/ and gnu/ are licensed GPL3+,
  966. ;; the web interface modules in gwl/ are licensed AGPL3+,
  967. ;; and the fonts included in this package are licensed OFL1.1.
  968. (license (list license:gpl3+ license:agpl3+ license:silofl1.1))))
  969. (define-public guix-build-coordinator
  970. (let ((commit "c2f0c5b36f8294bb4c699806f9e8c576ae9b9f90")
  971. (revision "33"))
  972. (package
  973. (name "guix-build-coordinator")
  974. (version (git-version "0" revision commit))
  975. (source (origin
  976. (method git-fetch)
  977. (uri (git-reference
  978. (url "https://git.cbaines.net/git/guix/build-coordinator")
  979. (commit commit)))
  980. (sha256
  981. (base32
  982. "0nlh1cyvpbsfy9pk22xmgx0vb625j7qgv79y527q91c9fjn7g37v"))
  983. (file-name (string-append name "-" version "-checkout"))))
  984. (build-system gnu-build-system)
  985. (arguments
  986. `(#:modules (((guix build guile-build-system)
  987. #:select (target-guile-effective-version))
  988. ,@%gnu-build-system-modules)
  989. #:imported-modules ((guix build guile-build-system)
  990. ,@%gnu-build-system-modules)
  991. #:phases
  992. (modify-phases %standard-phases
  993. (add-before 'build 'set-GUILE_AUTO_COMPILE
  994. (lambda _
  995. ;; To avoid warnings relating to 'guild'.
  996. (setenv "GUILE_AUTO_COMPILE" "0")
  997. #t))
  998. (add-after 'install 'wrap-executable
  999. (lambda* (#:key inputs outputs target #:allow-other-keys)
  1000. (let* ((out (assoc-ref outputs "out"))
  1001. (bin (string-append out "/bin"))
  1002. (guile (assoc-ref inputs "guile"))
  1003. (version (target-guile-effective-version))
  1004. (scm (string-append out "/share/guile/site/" version))
  1005. (go (string-append out "/lib/guile/" version "/site-ccache")))
  1006. (for-each
  1007. (lambda (file)
  1008. (simple-format (current-error-port) "wrapping: ~A\n" file)
  1009. (let ((guile-inputs (list
  1010. "guile-json"
  1011. "guile-gcrypt"
  1012. "guix"
  1013. "guile-prometheus"
  1014. "guile-lib"
  1015. "guile-lzlib"
  1016. "guile-zlib"
  1017. "guile-sqlite3"
  1018. "gnutls"
  1019. ,@(if (hurd-target?)
  1020. '()
  1021. '("guile-fibers")))))
  1022. (wrap-program file
  1023. `("PATH" ":" prefix
  1024. (,bin
  1025. ;; Support building without sqitch as an input, as it
  1026. ;; can't be cross-compiled yet
  1027. ,@(or (and=> (assoc-ref inputs "sqitch")
  1028. list)
  1029. '())))
  1030. `("GUILE_LOAD_PATH" ":" prefix
  1031. (,scm ,(string-join
  1032. (map (lambda (input)
  1033. (simple-format
  1034. #f "~A/share/guile/site/~A"
  1035. (assoc-ref inputs input)
  1036. version))
  1037. guile-inputs)
  1038. ":")))
  1039. `("GUILE_LOAD_COMPILED_PATH" ":" prefix
  1040. (,go ,(string-join
  1041. (map (lambda (input)
  1042. (simple-format
  1043. #f "~A/lib/guile/~A/site-ccache"
  1044. (assoc-ref inputs input)
  1045. version))
  1046. guile-inputs)
  1047. ":"))))
  1048. (when target
  1049. ;; XXX work around wrap-program picking bash for the
  1050. ;; host rather than target
  1051. (let ((bash (assoc-ref inputs "bash")))
  1052. (substitute* file
  1053. (("^#!.*/bash")
  1054. (string-append "#! " bash "/bin/bash")))))))
  1055. (find-files bin)))
  1056. #t))
  1057. (delete 'strip)))) ; As the .go files aren't compatible
  1058. (native-inputs
  1059. `(("pkg-config" ,pkg-config)
  1060. ("autoconf" ,autoconf)
  1061. ("automake" ,automake)
  1062. ("gnutls" ,gnutls)
  1063. ;; Guile libraries are needed here for cross-compilation.
  1064. ("guile-json" ,guile-json-4)
  1065. ("guile-gcrypt" ,guile-gcrypt)
  1066. ("guix" ,guix)
  1067. ("guile-prometheus" ,guile-prometheus)
  1068. ("guile-fibers" ,guile-fibers)
  1069. ("guile-lib" ,guile-lib)
  1070. ("guile" ,@(assoc-ref (package-native-inputs guix) "guile"))))
  1071. (inputs
  1072. `(("guile" ,@(assoc-ref (package-native-inputs guix) "guile"))
  1073. ,@(if (%current-target-system)
  1074. `(("bash" ,bash-minimal))
  1075. '())
  1076. ("sqlite" ,sqlite)
  1077. ,@(if (hurd-target?)
  1078. '()
  1079. `(("sqitch" ,sqitch)))))
  1080. (propagated-inputs
  1081. `(,@(if (hurd-target?)
  1082. '()
  1083. `(("guile-fibers" ,guile-fibers)))
  1084. ("guile-prometheus" ,guile-prometheus)
  1085. ("guile-gcrypt" ,guile-gcrypt)
  1086. ("guile-json" ,guile-json-4)
  1087. ("guile-lib" ,guile-lib)
  1088. ("guile-lzlib" ,guile-lzlib)
  1089. ("guile-zlib" ,guile-zlib)
  1090. ("guile-sqlite3" ,guile-sqlite3)
  1091. ("guix" ,guix)
  1092. ("gnutls" ,gnutls)))
  1093. (home-page "https://git.cbaines.net/guix/build-coordinator/")
  1094. (synopsis "Tool to help build derivations")
  1095. (description
  1096. "The Guix Build Coordinator helps with performing lots of builds across
  1097. potentially many machines, and with doing something with the results and
  1098. outputs of those builds.")
  1099. (license license:gpl3+))))
  1100. (define-public guix-jupyter
  1101. (package
  1102. (name "guix-jupyter")
  1103. (version "0.2.2")
  1104. (home-page "https://gitlab.inria.fr/guix-hpc/guix-kernel")
  1105. (source (origin
  1106. (method git-fetch)
  1107. (uri (git-reference (url home-page)
  1108. (commit (string-append "v" version))))
  1109. (sha256
  1110. (base32
  1111. "17m6970wnvwlbarq4gxz5bakhzyhq5ch8qd8jw55ydccpv6473kq"))
  1112. (file-name (string-append "guix-jupyter-" version "-checkout"))))
  1113. (build-system gnu-build-system)
  1114. (arguments
  1115. `(#:modules ((srfi srfi-26)
  1116. (ice-9 match)
  1117. (ice-9 popen)
  1118. (ice-9 rdelim)
  1119. (guix build utils)
  1120. (guix build gnu-build-system))
  1121. #:phases
  1122. (modify-phases %standard-phases
  1123. (add-after 'install 'sed-kernel-json
  1124. (lambda* (#:key inputs outputs #:allow-other-keys)
  1125. (let* ((out (assoc-ref outputs "out"))
  1126. (guix (assoc-ref inputs "guix"))
  1127. (guile (assoc-ref inputs "guile"))
  1128. (json (assoc-ref inputs "guile-json"))
  1129. (git (assoc-ref inputs "guile-git"))
  1130. (bs (assoc-ref inputs "guile-bytestructures"))
  1131. (s-zmq (assoc-ref inputs "guile-simple-zmq"))
  1132. (gcrypt (assoc-ref inputs "guile-gcrypt"))
  1133. (deps (list out s-zmq guix json git bs gcrypt))
  1134. (effective
  1135. (read-line
  1136. (open-pipe* OPEN_READ
  1137. (string-append guile "/bin/guile")
  1138. "-c" "(display (effective-version))")))
  1139. (path (map (cut string-append "-L\", \"" <>
  1140. "/share/guile/site/"
  1141. effective)
  1142. deps))
  1143. (gopath (map (cut string-append "-C\", \"" <>
  1144. "/lib/guile/" effective
  1145. "/site-ccache")
  1146. deps))
  1147. (kernel-dir (string-append out "/share/jupyter/kernels/guix/")))
  1148. (substitute* (string-append kernel-dir "kernel.json")
  1149. (("-s")
  1150. (string-join
  1151. (list (string-join path "\",\n\t\t\"")
  1152. (string-join gopath "\",\n\t\t\"")
  1153. "-s")
  1154. "\",\n\t\t\""))
  1155. (("guix-jupyter-kernel.scm")
  1156. (string-append out "/share/guile/site/3.0/"
  1157. "guix-jupyter-kernel.scm")))
  1158. #t))))))
  1159. (native-inputs
  1160. `(("autoconf" ,autoconf)
  1161. ("automake" ,automake)
  1162. ("pkg-config" ,pkg-config)
  1163. ;; For testing.
  1164. ("jupyter" ,jupyter)
  1165. ("python-ipython" ,python-ipython)
  1166. ("python-ipykernel" ,python-ipykernel)))
  1167. (inputs
  1168. `(("guix" ,guix)
  1169. ("guile" ,@(assoc-ref (package-native-inputs guix) "guile"))))
  1170. (propagated-inputs
  1171. `(("guile-json" ,guile-json-4)
  1172. ("guile-simple-zmq" ,guile-simple-zmq)
  1173. ("guile-gcrypt" ,guile-gcrypt)))
  1174. (synopsis "Guix kernel for Jupyter")
  1175. (description
  1176. "Guix-Jupyter is a Jupyter kernel. It allows you to annotate notebooks
  1177. with information about their software dependencies, such that code is executed
  1178. in the right software environment. Guix-Jupyter spawns the actual kernels
  1179. such as @code{python-ipykernel} on behalf of the notebook user and runs them
  1180. in an isolated environment, in separate namespaces.")
  1181. (license license:gpl3+)))
  1182. (define-public gcab
  1183. (package
  1184. (name "gcab")
  1185. (version "1.4")
  1186. (source (origin
  1187. (method url-fetch)
  1188. (uri (string-append "mirror://gnome/sources/gcab/"
  1189. version "/gcab-" version ".tar.xz"))
  1190. (sha256
  1191. (base32
  1192. "13q43iqld4l50yra45lhvkd376pn6qpk7rkx374zn8y9wsdzm9b7"))))
  1193. (build-system meson-build-system)
  1194. (native-inputs
  1195. `(("glib:bin" ,glib "bin") ; for glib-mkenums
  1196. ("intltool" ,intltool)
  1197. ("pkg-config" ,pkg-config)
  1198. ("vala" ,vala)))
  1199. (inputs
  1200. `(("glib" ,glib)
  1201. ("zlib" ,zlib)))
  1202. (arguments
  1203. `(#:configure-flags
  1204. ;; XXX This ‘documentation’ is for developers, and fails informatively:
  1205. ;; Error in gtkdoc helper script: 'gtkdoc-mkhtml' failed with status 5
  1206. (list "-Ddocs=false"
  1207. "-Dintrospection=false")))
  1208. (home-page "https://wiki.gnome.org/msitools") ; no dedicated home page
  1209. (synopsis "Microsoft Cabinet file manipulation library")
  1210. (description
  1211. "The libgcab library provides GObject functions to read, write, and modify
  1212. Microsoft cabinet (.@dfn{CAB}) files.")
  1213. (license (list license:gpl2+ ; tests/testsuite.at
  1214. license:lgpl2.1+)))) ; the rest
  1215. (define-public msitools
  1216. (package
  1217. (name "msitools")
  1218. (version "0.100")
  1219. (source (origin
  1220. (method url-fetch)
  1221. (uri (string-append "mirror://gnome/sources/msitools/"
  1222. version "/msitools-" version ".tar.xz"))
  1223. (sha256
  1224. (base32
  1225. "1skq17qr2ic4qr3779j49byfm8rncwbsq9rj1a33ncn2m7isdwdv"))))
  1226. (build-system gnu-build-system)
  1227. (native-inputs
  1228. `(("bison" ,bison)
  1229. ("pkg-config" ,pkg-config)))
  1230. (inputs
  1231. `(("gcab" ,gcab)
  1232. ("glib" ,glib)
  1233. ("libgsf" ,libgsf)
  1234. ("libxml2" ,libxml2)
  1235. ("uuid" ,util-linux "lib")))
  1236. (home-page "https://wiki.gnome.org/msitools")
  1237. (synopsis "Windows Installer file manipulation tool")
  1238. (description
  1239. "msitools is a collection of command-line tools to inspect, extract, build,
  1240. and sign Windows@tie{}Installer (.@dfn{MSI}) files. It aims to be a solution
  1241. for packaging and deployment of cross-compiled Windows applications.")
  1242. (license license:lgpl2.1+)))
  1243. (define-public libostree
  1244. (package
  1245. (name "libostree")
  1246. (version "2021.3")
  1247. (source
  1248. (origin
  1249. (method url-fetch)
  1250. (uri (string-append
  1251. "https://github.com/ostreedev/ostree/releases/download/v"
  1252. (version-major+minor version) "/libostree-" version ".tar.xz"))
  1253. (sha256
  1254. (base32 "1cyhr3s7xsgnsais5m4cjwdwcq46naf25r1k042c4n1y1jgs798g"))))
  1255. (build-system gnu-build-system)
  1256. (arguments
  1257. '(#:phases
  1258. (modify-phases %standard-phases
  1259. (add-before 'check 'pre-check
  1260. (lambda _
  1261. ;; Don't try to use the non-existing '/var/tmp' as test
  1262. ;; directory.
  1263. (setenv "TEST_TMPDIR" (getenv "TMPDIR"))
  1264. #t)))
  1265. ;; XXX: fails with:
  1266. ;; tap-driver.sh: missing test plan
  1267. ;; tap-driver.sh: internal error getting exit status
  1268. ;; tap-driver.sh: fatal: I/O or internal error
  1269. #:tests? #f))
  1270. (native-inputs
  1271. `(("attr" ,attr) ; for tests
  1272. ("bison" ,bison)
  1273. ("glib:bin" ,glib "bin") ; for 'glib-mkenums'
  1274. ("gobject-introspection" ,gobject-introspection)
  1275. ("pkg-config" ,pkg-config)
  1276. ("xsltproc" ,libxslt)))
  1277. (inputs
  1278. `(("avahi" ,avahi)
  1279. ("docbook-xml" ,docbook-xml-4.2)
  1280. ("docbook-xsl" ,docbook-xsl)
  1281. ("e2fsprogs" ,e2fsprogs)
  1282. ("fuse" ,fuse)
  1283. ("glib" ,glib)
  1284. ("gpgme" ,gpgme)
  1285. ("libarchive" ,libarchive)
  1286. ("libsoup" ,libsoup)
  1287. ("util-linux" ,util-linux)))
  1288. (home-page "https://ostree.readthedocs.io/en/latest/")
  1289. (synopsis "Operating system and container binary deployment and upgrades")
  1290. (description
  1291. "@code{libostree} is both a shared library and suite of command line
  1292. tools that combines a \"git-like\" model for committing and downloading
  1293. bootable file system trees, along with a layer for deploying them and managing
  1294. the boot loader configuration.")
  1295. (license license:lgpl2.0+)))
  1296. (define-public flatpak
  1297. (package
  1298. (name "flatpak")
  1299. (version "1.10.2")
  1300. (source
  1301. (origin
  1302. (method url-fetch)
  1303. (uri (string-append "https://github.com/flatpak/flatpak/releases/download/"
  1304. version "/flatpak-" version ".tar.xz"))
  1305. (sha256
  1306. (base32 "1r6xw7r3ir2vaa30n3mily6m7d51cf4qv22fkqlzzy3js0wjf5fv"))))
  1307. ;; Wrap 'flatpak' so that GIO_EXTRA_MODULES is set, thereby allowing GIO to
  1308. ;; find the TLS backend in glib-networking.
  1309. (build-system glib-or-gtk-build-system)
  1310. (arguments
  1311. '(#:configure-flags
  1312. (list
  1313. "--enable-documentation=no" ;; FIXME
  1314. "--enable-system-helper=no"
  1315. "--localstatedir=/var"
  1316. (string-append "--with-system-bubblewrap="
  1317. (assoc-ref %build-inputs "bubblewrap")
  1318. "/bin/bwrap")
  1319. (string-append "--with-system-dbus-proxy="
  1320. (assoc-ref %build-inputs "xdg-dbus-proxy")
  1321. "/bin/xdg-dbus-proxy"))
  1322. #:phases
  1323. (modify-phases %standard-phases
  1324. (add-after 'unpack 'fix-tests
  1325. (lambda* (#:key inputs #:allow-other-keys)
  1326. (copy-recursively
  1327. (search-input-directory inputs "lib/locale")
  1328. "/tmp/locale")
  1329. (for-each make-file-writable (find-files "/tmp"))
  1330. (substitute* "tests/make-test-runtime.sh"
  1331. (("cp `which.*") "echo guix\n")
  1332. (("cp -r /usr/lib/locale/C\\.\\*")
  1333. (string-append "mkdir ${DIR}/usr/lib/locale/en_US; \
  1334. cp -r /tmp/locale/*/en_US.*")))
  1335. (substitute* "tests/libtest.sh"
  1336. (("/bin/kill") (which "kill"))
  1337. (("/usr/bin/python3") (which "python3")))
  1338. #t))
  1339. ;; Many tests fail for unknown reasons, so we just run a few basic
  1340. ;; tests.
  1341. (replace 'check
  1342. (lambda _
  1343. (setenv "HOME" "/tmp")
  1344. (invoke "make" "check"
  1345. "TESTS=tests/test-basic.sh tests/test-config.sh testcommon"))))))
  1346. (native-inputs
  1347. `(("bison" ,bison)
  1348. ("dbus" ,dbus) ; for dbus-daemon
  1349. ("gettext" ,gettext-minimal)
  1350. ("glib:bin" ,glib "bin") ; for glib-mkenums + gdbus-codegen
  1351. ("glibc-utf8-locales" ,glibc-utf8-locales)
  1352. ("gobject-introspection" ,gobject-introspection)
  1353. ("libcap" ,libcap)
  1354. ("pkg-config" ,pkg-config)
  1355. ("python" ,python)
  1356. ("python-pyparsing" ,python-pyparsing)
  1357. ("socat" ,socat)
  1358. ("which" ,which)))
  1359. (propagated-inputs `(("glib-networking" ,glib-networking)
  1360. ("gnupg" ,gnupg)
  1361. ("gsettings-desktop-schemas"
  1362. ,gsettings-desktop-schemas)))
  1363. (inputs
  1364. `(("appstream-glib" ,appstream-glib)
  1365. ("bubblewrap" ,bubblewrap)
  1366. ("dconf" ,dconf)
  1367. ("fuse" ,fuse)
  1368. ("gdk-pixbuf" ,gdk-pixbuf)
  1369. ("gpgme" ,gpgme)
  1370. ("json-glib" ,json-glib)
  1371. ("libarchive" ,libarchive)
  1372. ("libostree" ,libostree)
  1373. ("libseccomp" ,libseccomp)
  1374. ("libsoup" ,libsoup)
  1375. ("libxau" ,libxau)
  1376. ("libxml2" ,libxml2)
  1377. ("util-linux" ,util-linux)
  1378. ("xdg-dbus-proxy" ,xdg-dbus-proxy)))
  1379. (home-page "https://flatpak.org")
  1380. (synopsis "System for building, distributing, and running sandboxed desktop
  1381. applications")
  1382. (description "Flatpak is a system for building, distributing, and running
  1383. sandboxed desktop applications on GNU/Linux.")
  1384. (license license:lgpl2.1+)))
  1385. (define-public akku
  1386. (package
  1387. (name "akku")
  1388. (version "1.0.1")
  1389. (source (origin
  1390. (method git-fetch)
  1391. (uri (git-reference
  1392. (url "https://gitlab.com/akkuscm/akku.git")
  1393. (commit (string-append "v" version))))
  1394. (file-name (git-file-name name version))
  1395. (sha256 (base32 "1dm32ws3nshnnscd7k75zswxxs1pp25y2q4k8j5ms241hz47by3c"))))
  1396. (build-system gnu-build-system)
  1397. (arguments
  1398. '(#:phases (modify-phases %standard-phases
  1399. (replace 'bootstrap
  1400. (lambda* (#:key outputs #:allow-other-keys)
  1401. (for-each patch-shebang
  1402. '("bootstrap"
  1403. ".akku/env"))
  1404. (let* ((home "/tmp")
  1405. (datadir (string-append home "/.local/share/akku/")))
  1406. (mkdir-p datadir)
  1407. (invoke "touch" (string-append datadir "index.db"))
  1408. (setenv "HOME" home))
  1409. (invoke "./bootstrap")
  1410. #t))
  1411. (add-after 'install 'wrap-executables
  1412. (lambda* (#:key outputs inputs #:allow-other-keys)
  1413. (let ((out (assoc-ref outputs "out"))
  1414. (curl (assoc-ref inputs "curl")))
  1415. (wrap-program (string-append out "/bin/akku")
  1416. `("LD_LIBRARY_PATH" ":" prefix (,(string-append curl "/lib"))))
  1417. #t))))))
  1418. (native-inputs
  1419. `(("which" ,which)
  1420. ("autoconf" ,autoconf)
  1421. ("automake" ,automake)
  1422. ("pkg-config" ,pkg-config)))
  1423. (inputs
  1424. `(("guile" ,guile-3.0)
  1425. ("curl" ,curl)))
  1426. (home-page "https://akkuscm.org/")
  1427. (synopsis "Language package manager for Scheme")
  1428. (description
  1429. "Akku.scm is a project-based language package manager for R6RS and R7RS Scheme.
  1430. It is mainly meant for programmers who develop portable programs or libraries in Scheme,
  1431. but could potentially work for end-users of those programs. It also has a translator
  1432. from R7RS, which allows most R7RS code to run on R6RS implementations.")
  1433. (license license:gpl3+)))
  1434. (define-public modules
  1435. (package
  1436. (name "modules")
  1437. (version "4.8.0")
  1438. (source
  1439. (origin
  1440. (method url-fetch)
  1441. (uri (string-append "mirror://sourceforge/modules/Modules/modules-"
  1442. version "/modules-" version ".tar.bz2"))
  1443. (sha256 (base32 "1amz8qdqbvfdc8jv0j4720vywbz2gi7l3sr1lh37ilfbxy9lq9g9"))))
  1444. (build-system gnu-build-system)
  1445. (arguments
  1446. `(#:configure-flags
  1447. (list (string-append "--with-bin-search-path="
  1448. (assoc-ref %build-inputs "tcl") "/bin" ":"
  1449. (assoc-ref %build-inputs "procps") "/bin" ":"
  1450. (assoc-ref %build-inputs "less") "/bin" ":"
  1451. (assoc-ref %build-inputs "coreutils") "/bin")
  1452. (string-append "--with-tcl=" (assoc-ref %build-inputs "tcl") "/lib")
  1453. "--disable-compat-version")
  1454. #:test-target "test"
  1455. #:phases
  1456. (modify-phases %standard-phases
  1457. (add-before 'configure 'patch-add-modules
  1458. (lambda* (#:key inputs #:allow-other-keys)
  1459. (let ((coreutils (assoc-ref inputs "coreutils")))
  1460. (substitute* "script/add.modules.in"
  1461. (("/bin/(cat|cp|rm)" _ command)
  1462. (string-append coreutils "/bin/" command))
  1463. (("/bin/echo")
  1464. "echo")))))
  1465. (add-before 'configure 'patch-scripts-for-python-3
  1466. (lambda _
  1467. ;; Patch the script for python-3.
  1468. (substitute* "script/createmodule.py.in"
  1469. (("pathkeys.sort\\(\\)") "pathkeys = sorted(pathkeys)")
  1470. (("print\\(\"\\\\t\"\\*") "print(\"\\t\"*int")
  1471. (("@PYTHON@") (which "python3")))))
  1472. (add-before 'check 'patch-/bin/sh-and-nixbld-groups-in-tests
  1473. (lambda _
  1474. (use-modules (srfi srfi-1))
  1475. (let* ((groups-file (string-append (getcwd) "/nixbld-groups"))
  1476. (groups-file-z (string-append groups-file "-z"))
  1477. (nixbld-groups
  1478. (fold
  1479. (lambda (id prev)
  1480. (catch #t
  1481. (lambda () (cons (group:name (getgrnam id)) prev))
  1482. (lambda _ prev)))
  1483. '()
  1484. (vector->list (getgroups)))))
  1485. ;; Simulate "id -G -n" command output.
  1486. (call-with-output-file groups-file
  1487. (lambda (port)
  1488. (display (string-join nixbld-groups " ") port)
  1489. (display #\newline port)))
  1490. ;; Simulate "id -G -n -z" command output.
  1491. (call-with-output-file groups-file-z
  1492. (lambda (port)
  1493. (for-each
  1494. (lambda (group-name)
  1495. (display group-name port)
  1496. (display #\null port))
  1497. nixbld-groups)))
  1498. ;; Generate "modulecmd-test.tcl" before running "make test".
  1499. (invoke "make" "modulecmd-test.tcl")
  1500. ;; Substitute shell.
  1501. (substitute*
  1502. '("modulecmd-test.tcl"
  1503. "modulecmd.tcl"
  1504. "testsuite/modules.70-maint/380-edit.exp"
  1505. "compat/init/filter")
  1506. (("/bin/sh") (which "sh")))
  1507. ;; Skip tests that use supplementary groups.
  1508. (for-each
  1509. delete-file
  1510. '("testsuite/modules.20-locate/112-hide-user-group.exp"
  1511. "testsuite/modules.20-locate/117-forbid-user-group.exp"
  1512. "testsuite/modules.20-locate/119-hide-cascading.exp"
  1513. "testsuite/modules.50-cmds/140-system.exp"
  1514. "testsuite/modules.50-cmds/287-info-usergroups.exp"
  1515. "testsuite/modules.50-cmds/440-module-tag.exp"
  1516. "testsuite/modules.70-maint/220-config.exp"))
  1517. (for-each
  1518. (lambda (file)
  1519. (substitute* file
  1520. (("/bin/sh") (which "bash"))
  1521. ;; For some reason "kvm" group cannot be resolved for
  1522. ;; "nixbld" user. We replace "id ..." commands with
  1523. ;; "cat ..." that simulates them.
  1524. (("exec id -G -n -z") (string-append "exec cat " groups-file-z))
  1525. (("exec id -G -n") (string-append "exec cat " groups-file))))
  1526. '("testsuite/modules.00-init/005-init_ts.exp"
  1527. "testsuite/install.00-init/005-init_ts.exp"
  1528. "modulecmd-test.tcl"))))))))
  1529. (native-inputs
  1530. `(("dejagnu" ,dejagnu)
  1531. ("autoconf" ,autoconf)
  1532. ("which" ,which)))
  1533. (inputs
  1534. `(("tcl" ,tcl)
  1535. ("less" ,less)
  1536. ("procps" ,procps)
  1537. ("coreutils" ,coreutils)
  1538. ("python" ,python-3)))
  1539. (home-page "http://modules.sourceforge.net/")
  1540. (synopsis "Shell environment variables and aliases management")
  1541. (description "Modules simplify shell initialization and let users
  1542. modify their environment during the session with modulefiles. Modules are
  1543. used on high-performance clusters to dynamically add and remove paths
  1544. to specific versions of applications.")
  1545. (license license:gpl2+)))