file-systems.scm 72 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2017, 2018, 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
  3. ;;; Copyright © 2017 Gábor Boskovits <boskovits@gmail.com>
  4. ;;; Copyright © 2017, 2018, 2021 Ricardo Wurmus <rekado@elephly.net>
  5. ;;; Copyright © 2018 Leo Famulari <leo@famulari.name>
  6. ;;; Copyright © 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
  7. ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
  8. ;;; Copyright © 2020 Morgan Smith <Morgan.J.Smith@outlook.com>
  9. ;;; Copyright © 2021 raid5atemyhomework <raid5atemyhomework@protonmail.com>
  10. ;;; Copyright © 2021 Stefan Reichör <stefan@xsteve.at>
  11. ;;; Copyright © 2021 Noisytoot <noisytoot@disroot.org>
  12. ;;; Copyright © 2021 Kaelyn Takata <kaelyn.alexi@protonmail.com>
  13. ;;;
  14. ;;; This file is part of GNU Guix.
  15. ;;;
  16. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  17. ;;; under the terms of the GNU General Public License as published by
  18. ;;; the Free Software Foundation; either version 3 of the License, or (at
  19. ;;; your option) any later version.
  20. ;;;
  21. ;;; GNU Guix is distributed in the hope that it will be useful, but
  22. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  23. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  24. ;;; GNU General Public License for more details.
  25. ;;;
  26. ;;; You should have received a copy of the GNU General Public License
  27. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  28. (define-module (gnu packages file-systems)
  29. #:use-module ((guix licenses) #:prefix license:)
  30. #:use-module (guix packages)
  31. #:use-module (guix download)
  32. #:use-module (guix git-download)
  33. #:use-module (guix build-system cmake)
  34. #:use-module (guix build-system copy)
  35. #:use-module (guix build-system gnu)
  36. #:use-module (guix build-system go)
  37. #:use-module (guix build-system linux-module)
  38. #:use-module (guix build-system python)
  39. #:use-module (guix build-system trivial)
  40. #:use-module (guix utils)
  41. #:use-module (gnu packages)
  42. #:use-module (gnu packages acl)
  43. #:use-module (gnu packages admin)
  44. #:use-module (gnu packages attr)
  45. #:use-module (gnu packages autotools)
  46. #:use-module (gnu packages base)
  47. #:use-module (gnu packages bash)
  48. #:use-module (gnu packages bison)
  49. #:use-module (gnu packages check)
  50. #:use-module (gnu packages compression)
  51. #:use-module (gnu packages crypto)
  52. #:use-module (gnu packages curl)
  53. #:use-module (gnu packages cyrus-sasl)
  54. #:use-module (gnu packages datastructures)
  55. #:use-module (gnu packages documentation)
  56. #:use-module (gnu packages docbook)
  57. #:use-module (gnu packages flex)
  58. #:use-module (gnu packages gawk)
  59. #:use-module (gnu packages glib)
  60. #:use-module (gnu packages gnupg)
  61. #:use-module (gnu packages golang)
  62. #:use-module (gnu packages guile)
  63. #:use-module (gnu packages kerberos)
  64. #:use-module (gnu packages libffi)
  65. #:use-module (gnu packages linux)
  66. #:use-module (gnu packages nfs)
  67. #:use-module (gnu packages onc-rpc)
  68. #:use-module (gnu packages openldap)
  69. #:use-module (gnu packages pcre)
  70. #:use-module (gnu packages perl)
  71. #:use-module (gnu packages photo)
  72. #:use-module (gnu packages pkg-config)
  73. #:use-module (gnu packages python)
  74. #:use-module (gnu packages python-crypto)
  75. #:use-module (gnu packages python-web)
  76. #:use-module (gnu packages python-xyz)
  77. #:use-module (gnu packages readline)
  78. #:use-module (gnu packages rsync)
  79. #:use-module (gnu packages sssd)
  80. #:use-module (gnu packages sqlite)
  81. #:use-module (gnu packages time)
  82. #:use-module (gnu packages tls)
  83. #:use-module (gnu packages valgrind)
  84. #:use-module (gnu packages version-control)
  85. #:use-module (gnu packages xml))
  86. (define-public autofs
  87. (package
  88. (name "autofs")
  89. (version "5.1.7")
  90. (source
  91. (origin
  92. (method url-fetch)
  93. (uri (string-append "mirror://kernel.org/linux/daemons/autofs/"
  94. "v" (version-major version) "/"
  95. "autofs-" version ".tar.xz"))
  96. (sha256
  97. (base32 "1myfz6a3wj2c4j9h5g44zj796fdi82jhp1s92w2hg6xp2632csx3"))))
  98. (build-system gnu-build-system)
  99. (arguments
  100. `(#:configure-flags
  101. (list "--enable-ignore-busy" ; during shutdown
  102. "--enable-sloppy-mount" ; support mount(8) -s
  103. "--with-libtirpc"
  104. (string-append "--with-openldap="
  105. (assoc-ref %build-inputs "openldap"))
  106. (string-append "--with-sasl="
  107. (assoc-ref %build-inputs "cyrus-sasl"))
  108. "HAVE_SSS_AUTOFS=1" ; required to make sssldir click
  109. (string-append "sssldir="
  110. (assoc-ref %build-inputs "sssd")
  111. "/lib/sssd/modules"))
  112. #:tests? #f ; no test suite
  113. #:phases
  114. (modify-phases %standard-phases
  115. (add-before 'configure 'fix-hard-coded-search-path
  116. (lambda _
  117. (substitute* "configure"
  118. (("^searchpath=\".*\"")
  119. "searchpath=\"$PATH\""))
  120. #t))
  121. (add-before 'configure 'fix-rpath
  122. (lambda* (#:key outputs #:allow-other-keys)
  123. (let ((out (assoc-ref outputs "out")))
  124. (substitute* "Makefile.rules"
  125. (("^AUTOFS_LIB_LINK.*=" match)
  126. (string-append match " -Wl,-rpath=" out "/lib"))))))
  127. (add-before 'install 'omit-obsolete-lookup_nis.so-link
  128. ;; Building lookup_yp.so depends on $(YPCLNT) but this doesn't,
  129. ;; leading to a make error. Since it's broken, comment it out.
  130. (lambda _
  131. (substitute* "modules/Makefile"
  132. (("ln -fs lookup_yp.so" match)
  133. (string-append "# " match)))
  134. #t)))))
  135. (native-inputs
  136. `(("bison" ,bison)
  137. ("flex" ,flex)
  138. ("pkg-config" ,pkg-config)
  139. ("rpcsvc-proto" ,rpcsvc-proto)))
  140. (inputs
  141. `(("cyrus-sasl" ,cyrus-sasl)
  142. ("e2fsprogs" ,e2fsprogs) ; for e[234]fsck
  143. ("libtirpc" ,libtirpc)
  144. ("libxml2" ,libxml2) ; needed for LDAP, SASL
  145. ("mit-krb5" ,mit-krb5) ; needed for LDAP, SASL
  146. ("nfs-utils" ,nfs-utils) ; for mount.nfs
  147. ("openldap" ,openldap)
  148. ("openssl" ,openssl) ; needed for SASL
  149. ("sssd" ,sssd)
  150. ("util-linux" ,util-linux))) ; for mount, umount
  151. ;; XXX A directory index is the closest thing this has to a home page.
  152. (home-page "https://www.kernel.org/pub/linux/daemons/autofs/")
  153. (synopsis "Kernel-based automounter for Linux")
  154. (description
  155. "Autofs is a kernel-based automounter for use with the Linux autofs4
  156. module. It automatically mounts selected file systems when they are used and
  157. unmounts them after a set period of inactivity. This provides
  158. centrally-managed, consistent file names for users and applications, even in a
  159. large and/or frequently changing (network) environment.")
  160. ;; fedfs/ is GPL-2-only but not built.
  161. (license (list license:bsd-3 ; modules/cyrus-sasl.c
  162. license:gpl2+)))) ; the rest
  163. (define-public bindfs
  164. (package
  165. (name "bindfs")
  166. (version "1.15.1")
  167. (source (origin
  168. (method url-fetch)
  169. (uri (string-append "https://bindfs.org/downloads/bindfs-"
  170. version ".tar.gz"))
  171. (sha256
  172. (base32
  173. "1av8dj9i1g0105fs5r9srqqsp7yahlhwc0yl8i1szyfdls23bp84"))))
  174. (build-system gnu-build-system)
  175. (arguments
  176. ;; XXX: The tests have no hope of passing until there is a "nogroup"
  177. ;; entry (or at least some group to which the guix builder does
  178. ;; not belong) in the /etc/group file of the build environment.
  179. ;; Currently we do not have such a group. Disable tests for now.
  180. '(#:tests? #f))
  181. (native-inputs
  182. ;; Native inputs to run the tests
  183. ;; ("ruby" ,ruby)
  184. ;; ("valgrind" ,valgrind)
  185. ;; ("which" ,which)
  186. `(("pkg-config" ,pkg-config)))
  187. (inputs
  188. `(("fuse" ,fuse)))
  189. (home-page "https://bindfs.org")
  190. (synopsis "Bind mount a directory and alter permission bits")
  191. (description
  192. "@command{bindfs} is a FUSE file system for mounting a directory to
  193. another location, similar to @command{mount --bind}. It can be used for:
  194. @itemize
  195. @item Making a directory read-only.
  196. @item Making all executables non-executable.
  197. @item Sharing a directory with a list of users (or groups).
  198. @item Modifying permission bits using rules with chmod-like syntax.
  199. @item Changing the permissions with which files are created.
  200. @end itemize ")
  201. (license license:gpl2+)))
  202. (define-public cachefilesd-inotify
  203. (package
  204. (name "cachefilesd-inotify")
  205. (version "0.11.0")
  206. (source
  207. (origin
  208. (method git-fetch)
  209. (uri (git-reference
  210. (url "https://gitlab.com/tomalok/cachefilesd-inotify")
  211. (commit version)))
  212. (file-name (git-file-name name version))
  213. (sha256
  214. (base32 "0qkrpz69ql6fb3fwh0l35hhf9znnqyxhgv5fzd1gl2a2kz13rq5a"))))
  215. (build-system gnu-build-system)
  216. (arguments
  217. `(#:make-flags
  218. (list (string-append "CC=" ,(cc-for-target))
  219. ;; The Makefile doesn't support prefix= or similar.
  220. (string-append "DESTDIR=" (assoc-ref %outputs "out"))
  221. "MANDIR=/share/man")
  222. #:tests? #f ; no test suite
  223. #:phases
  224. (modify-phases %standard-phases
  225. (delete 'configure)))) ; no configure script
  226. (home-page "https://gitlab.com/tomalok/cachefilesd-inotify")
  227. (synopsis
  228. "CacheFiles file system cache management daemon (using @code{inotify})")
  229. (description
  230. "This package provides the user space component of CacheFiles, a caching
  231. back end that uses a directory on a locally mounted file system (such as ext4)
  232. as a cache to speed up (by reducing) access to a slower file system and make it
  233. appear more reliable.
  234. The cached file system is often a network file system such as NFS or CIFS, but
  235. can also be a local file system like ISO 9660 on a slow optical drive.
  236. CacheFiles itself is part of the kernel but relies on this user space
  237. @command{cachefilesd} daemon to perform maintenance tasks like culling and
  238. reaping stale nodes. Only one such daemon can be running at a time, and
  239. communicates with the kernel through the @file{/dev/cachefiles} character
  240. device.
  241. This version modifies David Howells original cachefilesd---which appears
  242. unmaintained---to use the @code{inotify} API instead of the deprecated
  243. @code{dnotify} to monitor file changes.")
  244. (license license:gpl2+)))
  245. (define-public davfs2
  246. (package
  247. (name "davfs2")
  248. (version "1.6.0")
  249. (source
  250. (origin
  251. (method url-fetch)
  252. (uri (string-append "https://download.savannah.nongnu.org/releases/"
  253. "davfs2/davfs2-" version ".tar.gz"))
  254. (sha256
  255. (base32 "0l1vnv5lfigciwg17p10zxwhzj4qw2d9kw30prr7g4dxhmb6fsrf"))))
  256. (build-system gnu-build-system)
  257. (arguments
  258. `(#:configure-flags
  259. (list "--sysconfdir=/etc" ; so man pages & binaries contain /etc
  260. (string-append "--docdir=" (assoc-ref %outputs "out")
  261. "/share/doc/" ,name "-" ,version)
  262. (string-append "ssbindir=" (assoc-ref %outputs "out") "/sbin")
  263. ;; The default ‘davfs2’ user and group don't exist on most systems.
  264. "dav_user=nobody"
  265. "dav_group=nogroup")
  266. #:phases
  267. (modify-phases %standard-phases
  268. (add-after 'unpack 'omit-redundancy
  269. ;; Don't install redundant copies of /etc examples into /share.
  270. (lambda _
  271. (substitute* "etc/Makefile.in"
  272. (("(dist_pkgdata_DATA =.*) davfs2.conf secrets(.*)"
  273. _ prefix suffix)
  274. (string-append prefix suffix)))
  275. #t))
  276. (add-after 'unpack 'patch-file-names
  277. (lambda _
  278. ;; Don't auto-load the FUSE kernel module. That's up to root.
  279. ;; XXX If/when we restore the previous behaviour, make sure not
  280. ;; to introduce a security hole when mount.davfs is setuid.
  281. (substitute* "src/kernel_interface.c"
  282. (("/sbin/modprobe") "/modprobe/disabled"))
  283. #t))
  284. (replace 'install
  285. (lambda* (#:key make-flags outputs #:allow-other-keys)
  286. (let ((out (assoc-ref outputs "out")))
  287. (apply invoke "make" "install"
  288. (string-append "pkgsysconfdir=" out "/etc")
  289. make-flags)))))))
  290. (inputs
  291. `(("neon" ,neon)
  292. ;; Neon requires but doesn't propagate zlib, nor would we want that.
  293. ;; XZ as well, but that's already present in the build environment.
  294. ("zlib" ,zlib)))
  295. (home-page "https://savannah.nongnu.org/projects/davfs2")
  296. (synopsis "Mount remote WebDAV resources in the local file system")
  297. (description
  298. "The @acronym{WebDAV, Web Distributed Authoring and Versioning} extension
  299. to the HTTP protocol defines a standard way to author resources on a remote Web
  300. server. Davfs2 exposes such resources as a typical file system which can be
  301. used by standard applications with no built-in support for WebDAV, such as the
  302. GNU coreutils (@command{cp}, @command{mv}, etc.) or a graphical word processor.
  303. Davfs2 works with most WebDAV servers with no or little configuration. It
  304. supports TLS (HTTPS), HTTP proxies, HTTP basic and digest authentication, and
  305. client certificates. It performs extensive caching to avoid unnecessary network
  306. traffic, stay responsive even over slow or unreliable connections, and prevent
  307. data loss. It aims to make use by unprivileged users as easy and secure as
  308. possible.
  309. However, davfs2 is not a full-featured WebDAV client. The file system interface
  310. and the WebDAV protocol are quite different. Translating between the two is not
  311. always possible.")
  312. (license (list license:bsd-2 ; src/fuse_kernel.h
  313. license:gpl3+)))) ; everything else
  314. (define-public exfat-utils
  315. (package
  316. (name "exfat-utils")
  317. (version "1.3.0")
  318. (source
  319. (origin
  320. (method url-fetch)
  321. (uri (string-append
  322. "https://github.com/relan/exfat/releases/download/v"
  323. version "/exfat-utils-" version ".tar.gz"))
  324. (sha256
  325. (base32 "0da8f8mm1sbwqp7prh78qk33xm0b8kk2d5is7mh2szlhgdxd1syz"))))
  326. (build-system gnu-build-system)
  327. (home-page "https://github.com/relan/exfat")
  328. (synopsis "Utilities to manipulate exFAT file systems")
  329. (description
  330. "This package provides an implementation of the exFAT file system,
  331. including command-line tools to validate exFAT file systems and to create new
  332. ones.")
  333. (license license:gpl2+)))
  334. (define-public fsarchiver
  335. (package
  336. (name "fsarchiver")
  337. (version "0.8.6")
  338. (source
  339. (origin
  340. (method git-fetch)
  341. (uri
  342. (git-reference
  343. (url "https://github.com/fdupoux/fsarchiver")
  344. (commit version)))
  345. (file-name (git-file-name name version))
  346. (sha256
  347. (base32 "1ry2sdkfbg4bwcldk42g1i3wa3z4pr9yh9dil6ilhwcvhqiw41zc"))))
  348. (build-system gnu-build-system)
  349. (native-inputs
  350. `(("autoconf" ,autoconf)
  351. ("automake" ,automake)
  352. ("pkg-config" ,pkg-config)))
  353. (inputs
  354. `(("bzip2" ,bzip2)
  355. ("e2fsprogs" ,e2fsprogs)
  356. ("libgcrypt" ,libgcrypt)
  357. ("lz4" ,lz4)
  358. ("lzo" ,lzo)
  359. ("util-linux" ,util-linux "lib")
  360. ("xz" ,xz)
  361. ("zlib" ,zlib)
  362. ("zstd:lib" ,zstd "lib")))
  363. (synopsis "File system back-up, deployment, and migration tool")
  364. (description
  365. "FSArchiver saves the contents of a file system to a compressed archive
  366. file, and restores it to a different file system and/or partition. This
  367. partition can be of a different size than the original and FSArchiver will
  368. create a new file system if none exists.
  369. All standard file attributes supported by the kernel are preserved, including
  370. file permissions, timestamps, symbolic and hard links, and extended attributes.
  371. Each file in the archive is protected by a checksum. If part of the archive
  372. is corrupted you'll lose the affected file(s) but not the whole back-up.")
  373. (home-page "https://www.fsarchiver.org/")
  374. (license license:gpl2)))
  375. (define-public gphotofs
  376. (package
  377. (name "gphotofs")
  378. (version "0.5.0")
  379. (source
  380. (origin
  381. (method url-fetch)
  382. (uri
  383. (string-append "mirror://sourceforge/gphoto/gphotofs/" version
  384. "/gphotofs-0.5.tar.gz"))
  385. (sha256
  386. (base32
  387. "04slwhr6ap9xcc27wphk22ad8yn79ngyy5z10lxams3k5liahvc2"))))
  388. (build-system gnu-build-system)
  389. (native-inputs
  390. `(("pkg-config" ,pkg-config)))
  391. (inputs
  392. `(("fuse" ,fuse)
  393. ("glib" ,glib)
  394. ("libgphoto2" ,libgphoto2)))
  395. (synopsis "Virtual file system for libgphoto2 using FUSE")
  396. (description "GPhotoFS is a FUSE file system module to mount your camera as
  397. a file system on Linux. This allow using your camera with any tool able to read
  398. from a mounted file system.")
  399. (home-page "http://www.gphoto.org/proj/gphotofs/")
  400. (license license:gpl2+)))
  401. (define-public bcachefs-tools
  402. (let ((commit "37850436dd7dfbe67738749c4d4a2506ffff1ec3")
  403. (revision "11"))
  404. (package
  405. (name "bcachefs-tools")
  406. (version (git-version "0.1" revision commit))
  407. (source
  408. (origin
  409. (method git-fetch)
  410. (uri (git-reference
  411. (url "https://evilpiepirate.org/git/bcachefs-tools.git")
  412. (commit commit)))
  413. (file-name (git-file-name name version))
  414. (sha256
  415. (base32 "040vgxrimahmfs9rhlggfwg0bzl7h9j2ksx3563rh63asjwlhnhi"))))
  416. (build-system gnu-build-system)
  417. (arguments
  418. `(#:make-flags
  419. (list ,(string-append "VERSION=" version) ; bogus vX.Y-nogit otherwise
  420. (string-append "PREFIX=" (assoc-ref %outputs "out"))
  421. "INITRAMFS_DIR=$(PREFIX)/share/initramfs-tools"
  422. ,(string-append "CC=" (cc-for-target))
  423. ,(string-append "PKG_CONFIG=" (pkg-config-for-target))
  424. "PYTEST=pytest")
  425. #:phases
  426. (modify-phases %standard-phases
  427. (delete 'configure) ; no configure script
  428. (add-after 'install 'promote-mount.bcachefs.sh
  429. ;; XXX The (optional) mount.bcachefs helper requires rust:cargo.
  430. ;; This alternative shell script does the job well enough for now.
  431. (lambda* (#:key inputs outputs #:allow-other-keys)
  432. (let ((out (assoc-ref outputs "out")))
  433. (with-directory-excursion (string-append out "/sbin")
  434. (rename-file "mount.bcachefs.sh" "mount.bcachefs")
  435. ;; WRAP-SCRIPT causes bogus ‘Insufficient arguments’ errors.
  436. (wrap-program "mount.bcachefs"
  437. `("PATH" ":" prefix
  438. ,(cons (string-append out "/sbin")
  439. (map (lambda (input)
  440. (string-append (assoc-ref inputs input)
  441. "/bin"))
  442. (list "coreutils"
  443. "gawk"
  444. "util-linux"))))))))))
  445. #:tests? #f)) ; XXX 6 valgrind tests fail
  446. (native-inputs
  447. `(("pkg-config" ,pkg-config)
  448. ;; For tests.
  449. ("python-pytest" ,python-pytest)
  450. ("valgrind" ,valgrind)
  451. ;; For generating documentation with rst2man.
  452. ("python" ,python)
  453. ("python-docutils" ,python-docutils)))
  454. (inputs
  455. `(("eudev" ,eudev)
  456. ("keyutils" ,keyutils)
  457. ("libaio" ,libaio)
  458. ("libscrypt" ,libscrypt)
  459. ("libsodium" ,libsodium)
  460. ("liburcu" ,liburcu)
  461. ("util-linux:lib" ,util-linux "lib") ; lib{blkid,uuid}
  462. ("lz4" ,lz4)
  463. ("zlib" ,zlib)
  464. ("zstd:lib" ,zstd "lib")
  465. ;; Only for mount.bcachefs.sh.
  466. ("coreutils" ,coreutils-minimal)
  467. ("gawk" ,gawk)
  468. ("util-linux" ,util-linux)))
  469. (home-page "https://bcachefs.org/")
  470. (synopsis "Tools to create and manage bcachefs file systems")
  471. (description
  472. "The bcachefs-tools are command-line utilities for creating, checking,
  473. and otherwise managing bcachefs file systems.
  474. Bcachefs is a @acronym{CoW, copy-on-write} file system supporting native
  475. encryption, compression, snapshots, and (meta)data checksums. It can use
  476. multiple block devices for replication and/or performance, similar to RAID.
  477. In addition, bcachefs provides all the functionality of bcache, a block-layer
  478. caching system, and lets you assign different roles to each device based on its
  479. performance and other characteristics.")
  480. (license license:gpl2+))))
  481. (define-public bcachefs-tools/static
  482. (package
  483. (inherit bcachefs-tools)
  484. (name "bcachefs-tools-static")
  485. (arguments
  486. (substitute-keyword-arguments (package-arguments bcachefs-tools)
  487. ((#:make-flags make-flags)
  488. `(append ,make-flags
  489. (list "LDFLAGS=-static")))))
  490. (inputs
  491. `(("eudev:static" ,eudev "static")
  492. ("libscrypt:static" ,libscrypt "static")
  493. ("lz4:static" ,lz4 "static")
  494. ("util-linux:static" ,util-linux "static") ; lib{blkid,uuid}
  495. ("zlib" ,zlib "static")
  496. ("zstd:static" ,zstd "static")
  497. ,@(package-inputs bcachefs-tools)))))
  498. (define-public bcachefs/static
  499. (package
  500. (name "bcachefs-static")
  501. (version (package-version bcachefs-tools))
  502. (build-system trivial-build-system)
  503. (source #f)
  504. (inputs
  505. `(("bcachefs-tools" ,bcachefs-tools/static)))
  506. (arguments
  507. `(#:modules ((guix build utils))
  508. #:builder
  509. (begin
  510. (use-modules (guix build utils)
  511. (ice-9 ftw)
  512. (srfi srfi-26))
  513. (let* ((bcachefs-tools (assoc-ref %build-inputs "bcachefs-tools"))
  514. (out (assoc-ref %outputs "out")))
  515. (mkdir-p out)
  516. (with-directory-excursion out
  517. (install-file (string-append bcachefs-tools
  518. "/sbin/bcachefs")
  519. "sbin")
  520. (remove-store-references "sbin/bcachefs")
  521. (invoke "sbin/bcachefs" "version") ; test suite
  522. #t)))))
  523. (home-page (package-home-page bcachefs-tools))
  524. (synopsis "Statically-linked bcachefs command from bcachefs-tools")
  525. (description "This package provides the statically-linked @command{bcachefs}
  526. from the bcachefs-tools package. It is meant to be used in initrds.")
  527. (license (package-license bcachefs-tools))))
  528. (define-public exfatprogs
  529. (package
  530. (name "exfatprogs")
  531. (version "1.1.2")
  532. (source
  533. (origin
  534. (method git-fetch)
  535. (uri (git-reference
  536. (url "https://github.com/exfatprogs/exfatprogs")
  537. (commit version)))
  538. (file-name (git-file-name name version))
  539. (sha256
  540. (base32 "19pbybgbfnvjb3n944ihrn1r8ch4dm8dr0d44d6w7p63dcp372xy"))))
  541. (build-system gnu-build-system)
  542. (arguments
  543. `(#:configure-flags
  544. (list "--disable-static")))
  545. (native-inputs
  546. `(("autoconf" ,autoconf)
  547. ("automake" ,automake)
  548. ("libtool" ,libtool)
  549. ("pkg-config" ,pkg-config)))
  550. (home-page "https://github.com/exfatprogs/exfatprogs")
  551. (synopsis "Tools to create, check, and repair exFAT file systems")
  552. (description
  553. "These are command-line user space tools for the @acronym{exFAT,
  554. Extensible File Allocation Table} file systems. Included are
  555. @command{mkfs.exfat} to create (format) new exFAT file systems, and
  556. @command{fsck.exfat} to check their consistency and repair them.")
  557. (license license:gpl2+)))
  558. (define-public httpfs2
  559. (package
  560. (name "httpfs2")
  561. (version "0.1.5")
  562. (source
  563. (origin
  564. (method url-fetch)
  565. (uri (string-append "mirror://sourceforge/httpfs/httpfs2/"
  566. "httpfs2-" version ".tar.gz"))
  567. (sha256
  568. (base32
  569. "1h8ggvhw30n2r6w11n1s458ypggdqx6ldwd61ma4yd7binrlpjq1"))))
  570. (build-system gnu-build-system)
  571. (native-inputs
  572. `(("asciidoc" ,asciidoc)
  573. ("docbook-xml" ,docbook-xml)
  574. ("libxml2" ,libxml2)
  575. ("libxslt" ,libxslt)
  576. ("pkg-config" ,pkg-config)))
  577. (inputs
  578. `(("fuse" ,fuse)
  579. ("gnutls" ,gnutls)))
  580. (arguments
  581. `(#:phases
  582. (modify-phases %standard-phases
  583. (delete 'configure) ; no configure script
  584. (replace 'install
  585. ;; There's no ‘install’ target. Install all variants manually.
  586. (lambda* (#:key outputs #:allow-other-keys)
  587. (let* ((out (assoc-ref outputs "out"))
  588. (bin (string-append out "/bin"))
  589. (man1 (string-append out "/share/man/man1")))
  590. (mkdir-p bin)
  591. (mkdir-p man1)
  592. (for-each
  593. (lambda (variant)
  594. (let ((man1-page (string-append variant ".1")))
  595. (install-file variant bin)
  596. (install-file man1-page man1)))
  597. (list "httpfs2"
  598. "httpfs2-mt"
  599. "httpfs2-ssl"
  600. "httpfs2-ssl-mt")))
  601. #t)))
  602. #:make-flags (list "CC=gcc")
  603. #:parallel-build? #f ; can result in missing man pages
  604. #:tests? #f)) ; no tests
  605. (home-page "https://sourceforge.net/projects/httpfs/")
  606. (synopsis "Mount remote files over HTTP")
  607. (description "httpfs2 is a @code{fuse} file system for mounting any
  608. @dfn{HyperText} (HTTP or HTTPS) URL. It uses HTTP/1.1 byte ranges to request
  609. arbitrary bytes from the web server, without needing to download the entire
  610. file. This is particularly useful with large archives such as ZIP files and
  611. ISO images when you only need to inspect their contents or extract specific
  612. files. Since the HTTP protocol itself has no notion of directories, only a
  613. single file can be mounted.")
  614. (license license:gpl2+)))
  615. (define-public jfsutils
  616. (package
  617. (name "jfsutils")
  618. (version "1.1.15")
  619. (source
  620. (origin
  621. (method url-fetch)
  622. (uri (string-append "http://jfs.sourceforge.net/project/pub/jfsutils-"
  623. version ".tar.gz"))
  624. (sha256
  625. (base32 "0kbsy2sk1jv4m82rxyl25gwrlkzvl3hzdga9gshkxkhm83v1aji4"))
  626. (patches (search-patches "jfsutils-add-sysmacros.patch"
  627. "jfsutils-gcc-compat.patch"
  628. "jfsutils-include-systypes.patch"))))
  629. (build-system gnu-build-system)
  630. (inputs
  631. `(("util-linux" ,util-linux "lib")))
  632. (home-page "http://jfs.sourceforge.net/home.html")
  633. (synopsis "Utilities for managing JFS file systems")
  634. (description
  635. "The JFSutils are a collection of utilities for managing the @acronym{JFS,
  636. Journaled File System}, a 64-bit journaling file system created by IBM and later
  637. ported to the kernel Linux. The following commands are available:
  638. @enumerate
  639. @item @command{fsck.jfs}: check and repair a JFS file system or replay its
  640. transaction log.
  641. @item @command{logdump}: dump the JFS journal log.
  642. @item @command{logredo}: replay the JFS journal log.
  643. @item @command{mkfs.jfs}: create a new JFS file system.
  644. @item @command{xchklog}: save a JFS fsck log to a file.
  645. @item @command{xchkdmp}: dump the contents of such a log file.
  646. @item @command{xpeek}: a JFS file system editor with a shell-like interface.
  647. @end enumerate\n")
  648. (license license:gpl3+))) ; no explicit version given
  649. (define-public jfsutils/static
  650. (static-package
  651. (package
  652. (inherit jfsutils)
  653. (name "jfsutils-static")
  654. (inputs
  655. `(("util-linux:static" ,util-linux "static")
  656. ,@(package-inputs jfsutils))))))
  657. (define-public jfs_fsck/static
  658. (package
  659. (name "jfs_fsck-static")
  660. (version (package-version jfsutils))
  661. (source #f)
  662. (build-system trivial-build-system)
  663. (arguments
  664. `(#:modules ((guix build utils))
  665. #:builder
  666. (begin
  667. (use-modules (guix build utils)
  668. (ice-9 ftw)
  669. (srfi srfi-26))
  670. (let* ((jfsutils (assoc-ref %build-inputs "jfsutils"))
  671. (fsck "jfs_fsck")
  672. (out (assoc-ref %outputs "out"))
  673. (sbin (string-append out "/sbin")))
  674. (mkdir-p sbin)
  675. (with-directory-excursion sbin
  676. (install-file (string-append jfsutils "/sbin/" fsck)
  677. ".")
  678. (remove-store-references fsck)
  679. (chmod fsck #o555))
  680. #t))))
  681. (inputs
  682. `(("jfsutils" ,jfsutils/static)))
  683. (home-page (package-home-page jfsutils))
  684. (synopsis "Statically-linked jfs_fsck command from jfsutils")
  685. (description "This package provides statically-linked jfs_fsck command taken
  686. from the jfsutils package. It is meant to be used in initrds.")
  687. (license (package-license jfsutils))))
  688. (define-public disorderfs
  689. (package
  690. (name "disorderfs")
  691. (version "0.5.11")
  692. (source
  693. (origin
  694. (method git-fetch)
  695. (uri (git-reference
  696. (url "https://salsa.debian.org/reproducible-builds/disorderfs.git")
  697. (commit version)))
  698. (file-name (git-file-name name version))
  699. (sha256
  700. (base32
  701. "1pnrj0h8sgqwgsc18vz3fkqsp6vhigdbi75vdj0si1r6wgslnr7z"))))
  702. (build-system gnu-build-system)
  703. (native-inputs
  704. `(("pkg-config" ,pkg-config)))
  705. (inputs
  706. `(("fuse" ,fuse)
  707. ("attr" ,attr)))
  708. (arguments
  709. `(#:phases (modify-phases %standard-phases
  710. (delete 'configure)) ; no configure script
  711. #:make-flags (let ((out (assoc-ref %outputs "out")))
  712. (list (string-append "PREFIX=" out)))
  713. #:test-target "test"
  714. ;; FIXME: Tests require 'run-parts' which is not in Guix yet.
  715. #:tests? #f))
  716. (home-page "https://salsa.debian.org/reproducible-builds/disorderfs")
  717. (synopsis "FUSE file system that introduces non-determinism")
  718. (description
  719. "An overlay FUSE file system that introduces non-determinism
  720. into file system metadata. For example, it can randomize the order
  721. in which directory entries are read. This is useful for detecting
  722. non-determinism in the build process.")
  723. (license license:gpl3+)))
  724. (define-public glusterfs
  725. (package
  726. (name "glusterfs")
  727. (version "7.0")
  728. (source
  729. (origin
  730. (method url-fetch)
  731. (uri (string-append "https://download.gluster.org/pub/gluster/glusterfs/"
  732. (version-major version) "/"
  733. (version-major+minor version) "/"
  734. "glusterfs-" version ".tar.gz"))
  735. (sha256
  736. (base32
  737. "0yzhx710ypj0j3m5dcgmmgvkp7p0rmmp2p7ld0axrm4vpwc2b1wa"))))
  738. (build-system gnu-build-system)
  739. (arguments
  740. `(#:configure-flags
  741. (let ((out (assoc-ref %outputs "out"))
  742. (p2 (assoc-ref %build-inputs "python-2")))
  743. (list (string-append "PYTHON=" p2 "/bin/python")
  744. (string-append "--with-initdir=" out "/etc/init.d")
  745. (string-append "--with-mountutildir=" out "/sbin")
  746. "--enable-cmocka" ; unit tests
  747. ;; "--enable-debug" ; debug build options
  748. ;; "--enable-asan" ; Address Sanitizer
  749. ;; "--enable-tsan" ; ThreadSanitizer
  750. ))
  751. #:phases
  752. (modify-phases %standard-phases
  753. (add-before 'configure 'autogen
  754. (lambda _ (invoke "./autogen.sh"))))))
  755. (native-inputs
  756. `(("pkg-config" ,pkg-config)
  757. ("libtirpc" ,libtirpc)
  758. ("rpcsvc-proto" ,rpcsvc-proto)
  759. ("python-2" ,python-2) ; must be version 2
  760. ("flex" ,flex)
  761. ("bison" ,bison)
  762. ("libtool" ,libtool)
  763. ("autoconf" ,autoconf)
  764. ("automake" ,automake)
  765. ("cmocka" ,cmocka)))
  766. (inputs
  767. `(("acl" ,acl)
  768. ("fuse" ,fuse)
  769. ("openssl" ,openssl)
  770. ("liburcu" ,liburcu)
  771. ("libuuid" ,util-linux "lib")
  772. ("libxml2" ,libxml2)
  773. ("readline" ,readline)
  774. ("zlib" ,zlib)
  775. ("libaio" ,libaio)
  776. ("rdma-core" ,rdma-core)))
  777. (home-page "https://www.gluster.org")
  778. (synopsis "Distributed file system")
  779. (description "GlusterFS is a distributed scalable network file system
  780. suitable for data-intensive tasks such as cloud storage and media streaming.
  781. It allows rapid provisioning of additional storage based on your storage
  782. consumption needs. It incorporates automatic failover as a primary feature.
  783. All of this is accomplished without a centralized metadata server.")
  784. ;; The user may choose either LGPLv3+ or GPLv2 only.
  785. (license (list license:lgpl3+ license:gpl2+))))
  786. (define-public curlftpfs
  787. (package
  788. (name "curlftpfs")
  789. (version "0.9.2")
  790. (source
  791. (origin
  792. (method url-fetch)
  793. (uri (string-append "mirror://sourceforge/curlftpfs/curlftpfs/" version
  794. "/curlftpfs-" version ".tar.gz"))
  795. (sha256
  796. (base32
  797. "0n397hmv21jsr1j7zx3m21i7ryscdhkdsyqpvvns12q7qwwlgd2f"))))
  798. (build-system gnu-build-system)
  799. (arguments
  800. `(#:phases
  801. (modify-phases %standard-phases
  802. (add-after 'unpack 'fix-test
  803. (lambda _
  804. ;; One of the 512-Byte block counts is definitely wrong.
  805. ;; See <https://sourceforge.net/p/curlftpfs/bugs/73/>.
  806. (substitute* "tests/ftpfs-ls_unittest.c"
  807. (("4426192") "12814800"))
  808. #t)))))
  809. (inputs
  810. `(("curl" ,curl)
  811. ("glib" ,glib)
  812. ("fuse" ,fuse)))
  813. (native-inputs
  814. `(("pkg-config" ,pkg-config)))
  815. (home-page "http://curlftpfs.sourceforge.net/")
  816. (synopsis "Mount remote file systems over FTP")
  817. (description
  818. "This is a file system client based on the FTP File Transfer Protocol.")
  819. (license license:gpl2+)))
  820. (define-public libeatmydata
  821. (package
  822. (name "libeatmydata")
  823. (version "129")
  824. (source
  825. (origin
  826. (method url-fetch)
  827. (uri (string-append "https://www.flamingspork.com/projects/libeatmydata/"
  828. "libeatmydata-" version ".tar.gz"))
  829. (sha256
  830. (base32 "1qycv1cvy6fr3v5rxilnsqxllwyfbqlcairlh31x2dnjsx28jnqf"))))
  831. (build-system gnu-build-system)
  832. (arguments
  833. ;; All tests pass---but only if the host kernel allows PTRACE_TRACEME.
  834. `(#:tests? #f
  835. #:configure-flags
  836. (list "--disable-static")
  837. #:phases
  838. (modify-phases %standard-phases
  839. (add-after 'unpack 'patch-file-names
  840. (lambda* (#:key inputs #:allow-other-keys)
  841. (substitute* (list "eatmydata.in" "eatmydata.sh.in")
  842. (("basename|readlink|uname" command)
  843. (search-input-file inputs
  844. (string-append "bin/" command))))))
  845. (add-before 'patch-file-names 'tighten-symlink-mode
  846. ;; When the ‘eatmydata’ helper detects that it's a symlink, it will
  847. ;; transparently invoke the command of the same name. However, it's
  848. ;; *always* a link in Guix profiles and doesn't handle that well.
  849. ;; Patch it to treat its own $name specially.
  850. (lambda _
  851. (substitute* "eatmydata.in"
  852. (("-L \"\\$0\"" match)
  853. (string-append match " ] && [ "
  854. "\"x$(basename \"$0\")\" != \"x$name\"")))))
  855. (add-after 'install 'install-debian-files
  856. (lambda* (#:key inputs outputs #:allow-other-keys)
  857. (let* ((debian (assoc-ref inputs "debian-files"))
  858. (out (assoc-ref outputs "out"))
  859. (share (string-append out "/share")))
  860. (invoke "tar" "xvf" debian)
  861. (with-directory-excursion "debian"
  862. (install-file "eatmydata.1" (string-append share "/man/man1"))
  863. (install-file "eatmydata.bash-completion"
  864. (string-append share "/bash-completion"
  865. "/completions")))))))))
  866. (native-inputs
  867. `(("debian-files" ; for the man page
  868. ,(origin
  869. (method url-fetch)
  870. (uri (string-append "https://deb.debian.org/debian/pool/main/"
  871. "libe/libeatmydata/libeatmydata_" version
  872. "-1.debian.tar.xz"))
  873. (sha256
  874. (base32 "0q6kx1bf870jj52a2vm5p5xlrr89g2zs8wyhlpn80pys9p28nikx"))))
  875. ;; For the test suite.
  876. ("strace" ,strace)
  877. ("which" ,which)))
  878. (inputs
  879. `(("coreutils" ,coreutils)))
  880. (home-page "https://www.flamingspork.com/projects/libeatmydata/")
  881. (synopsis "Transparently ignore calls to synchronize data safely to disk")
  882. (description
  883. "Libeatmydata transparently disables most ways a program might force data
  884. to be written to the file system, such as @code{fsync()} or @code{open(O_SYNC)}.
  885. Such synchronisation calls provide important data integrity guarantees but are
  886. expensive to perform and can significantly slow down software that (over)uses
  887. them.
  888. This price is worth paying if you care about the files being modified---which is
  889. typically the case---or when manipulating important components of your system.
  890. Please, @emph{do not} use something called ``eat my data'' in such cases!
  891. However, it does not make sense to accept this performance hit if the data is
  892. unimportant and you can afford to lose all of it in the event of a crash, for
  893. example when running a software test suite. Adding @code{}libeatmydata.so} to
  894. the @env{LD_PRELOAD} environment of such tasks will override all C library data
  895. synchronisation functions with custom @i{no-op} ones that do nothing and
  896. immediately return success.
  897. A simple @command{eatmydata} script is included that does this for you.")
  898. (license license:gpl3+)))
  899. (define-public libnfs
  900. (package
  901. (name "libnfs")
  902. (version "4.0.0")
  903. (source (origin
  904. (method git-fetch)
  905. (uri (git-reference
  906. (url "https://github.com/sahlberg/libnfs")
  907. (commit (string-append "libnfs-" version))))
  908. (file-name (git-file-name name version))
  909. (sha256
  910. (base32
  911. "0i27wd4zvhjz7620q043p4d4mkx8zv2yz9adm1byin47dynahyda"))))
  912. (build-system gnu-build-system)
  913. (home-page "https://github.com/sahlberg/libnfs")
  914. (native-inputs
  915. `(("autoconf" ,autoconf)
  916. ("automake" ,automake)
  917. ("libtool" ,libtool)
  918. ("pkg-config" ,pkg-config)))
  919. (synopsis "Client library for accessing NFS shares")
  920. (description "LIBNFS is a client library for accessing NFS shares over a
  921. network. LIBNFS offers three different APIs, for different use :
  922. @enumerate
  923. @item RAW, a fully asynchronous low level RPC library for NFS protocols. This
  924. API provides very flexible and precise control of the RPC issued.
  925. @item NFS ASYNC, a fully asynchronous library for high level vfs functions
  926. @item NFS SYNC, a synchronous library for high level vfs functions.
  927. @end enumerate\n")
  928. (license (list license:lgpl2.1+ ; library
  929. license:gpl3+ ; tests
  930. license:bsd-3 ; copied nsf4 files
  931. ))))
  932. (define-public apfs-fuse
  933. ;; Later versions require FUSE 3.
  934. (let ((commit "7b89418e8dc27103d3c4f8fa348086ffcd634c17")
  935. (revision "1"))
  936. (package
  937. (name "apfs-fuse")
  938. (version (git-version "0.0.0" revision commit))
  939. (source (origin
  940. (method git-fetch)
  941. (uri (git-reference
  942. (url "https://github.com/sgan81/apfs-fuse")
  943. (recursive? #t) ; for lzfse
  944. (commit commit)))
  945. (sha256
  946. (base32
  947. "0x2siy3cmnm9wsdfazg3xc8r3kbg73gijmnn1vjw33pp71ckylxr"))
  948. (file-name (git-file-name name version))))
  949. (build-system cmake-build-system)
  950. (arguments
  951. `(#:tests? #f ; No test suite
  952. #:configure-flags
  953. '("-DUSE_FUSE3=OFF") ; FUSE 3 is not packaged yet.
  954. #:phases
  955. (modify-phases %standard-phases
  956. ;; No 'install' target in CMakeLists.txt
  957. (replace 'install
  958. (lambda* (#:key outputs #:allow-other-keys)
  959. (let* ((out (assoc-ref outputs "out"))
  960. (bin (string-append out "/bin"))
  961. (lib (string-append out "/lib"))
  962. (doc (string-append out "/share/doc/"
  963. (string-append ,name "-" ,version))))
  964. (install-file "apfs-dump" bin)
  965. (install-file "apfs-dump-quick" bin)
  966. (install-file "apfs-fuse" bin)
  967. (install-file "libapfs.a" lib)
  968. (install-file "../source/README.md" doc)
  969. #t))))))
  970. (inputs
  971. `(("bzip2" ,bzip2)
  972. ("fuse" ,fuse)
  973. ("zlib" ,zlib)))
  974. (synopsis "Read-only FUSE driver for the APFS file system")
  975. (description "APFS-FUSE is a read-only FUSE driver for the @dfn{Apple File
  976. System} (APFS). It is currently in an experimental state — it may not be able
  977. to read all files, and it does not support all the compression methods in
  978. APFS.")
  979. (home-page "https://github.com/sgan81/apfs-fuse")
  980. (license license:gpl2+))))
  981. (define-public xfstests
  982. ;; The last release (1.1.0) is from 2011.
  983. (let ((revision "0")
  984. (commit "1c18b9ec2fcc94bd05ecdd136aa51c97bf3fa70d"))
  985. (package
  986. (name "xfstests")
  987. (version (git-version "1.1.0" revision commit))
  988. (source
  989. (origin
  990. (method git-fetch)
  991. (uri (git-reference
  992. (url "git://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git")
  993. (commit commit)))
  994. (file-name (git-file-name name version))
  995. (sha256
  996. (base32 "0rrv0rs9nhaza0jk5k0bj27w4lcd1s4a1ls8nr679qi02bgx630x"))))
  997. (build-system gnu-build-system)
  998. (arguments
  999. `(#:phases
  1000. (modify-phases %standard-phases
  1001. (add-after 'unpack 'patch-tool-locations
  1002. (lambda* (#:key inputs #:allow-other-keys)
  1003. (substitute* "common/config"
  1004. ;; Make absolute file names relative.
  1005. (("(MKFS_PROG=\").*(\")" _ pre post)
  1006. (string-append pre "mkfs" post)))
  1007. (for-each (lambda (file)
  1008. (substitute* file
  1009. (("( -s|#.|[= ])(/bin/sh|/bin/bash)" _ pre match)
  1010. (string-append pre
  1011. (assoc-ref inputs "bash")
  1012. match))
  1013. (("/bin/(rm|true)" match)
  1014. (search-input-file inputs match))
  1015. (("/usr(/bin/time)" _ match)
  1016. (search-input-file inputs match))))
  1017. (append (find-files "common" ".*")
  1018. (find-files "tests" ".*")
  1019. (find-files "tools" ".*")
  1020. (find-files "src" "\\.(c|sh)$")))))
  1021. (replace 'bootstrap
  1022. (lambda* (#:key make-flags #:allow-other-keys)
  1023. (substitute* "Makefile"
  1024. ;; Avoid a mysterious (to me) ‘permission denied’ error.
  1025. (("cp ") "cp -f "))
  1026. (substitute* "m4/package_utilies.m4"
  1027. ;; Fix the bogus hard-coded paths for every single binary.
  1028. (("(AC_PATH_PROG\\(.*, ).*(\\))" _ pre post)
  1029. (string-append pre (getenv "PATH") post)))
  1030. (apply invoke "make" "configure" make-flags)))
  1031. (add-after 'install 'wrap-xfstests/check
  1032. ;; Keep wrapping distinct from 'create-helper-script below: users
  1033. ;; must be able to invoke xfstests/check directly if they prefer.
  1034. (lambda* (#:key inputs outputs #:allow-other-keys)
  1035. (let* ((out (assoc-ref outputs "out")))
  1036. (wrap-program (string-append out "/xfstests/check")
  1037. ;; Prefix the user's PATH with the minimum required tools.
  1038. ;; The suite has many other optional dependencies and will
  1039. ;; automatically select tests based on the original PATH.
  1040. `("PATH" ":" prefix
  1041. ,(map (lambda (name)
  1042. (let ((input (assoc-ref inputs name)))
  1043. (string-append input "/bin:"
  1044. input "/sbin")))
  1045. (list "acl"
  1046. "attr"
  1047. "coreutils"
  1048. "inetutils"
  1049. "xfsprogs")))))))
  1050. (add-after 'install 'create-helper
  1051. ;; Upstream installs only a ‘check’ script that's not in $PATH and
  1052. ;; would try to write to the store without explaining how to change
  1053. ;; that. Install a simple helper script to make it discoverable.
  1054. (lambda* (#:key inputs outputs #:allow-other-keys)
  1055. (let* ((out (assoc-ref outputs "out"))
  1056. (check (string-append out "/xfstests/check"))
  1057. (bin (string-append out "/bin"))
  1058. (helper (string-append bin "/xfstests-check")))
  1059. (mkdir-p bin)
  1060. (with-output-to-file helper
  1061. (lambda _
  1062. (format #t "#!~a --no-auto-compile\n!#\n"
  1063. (search-input-file inputs "/bin/guile"))
  1064. (write
  1065. `(begin
  1066. (define (try proc dir)
  1067. "Try to PROC DIR. Return DIR on success, else #f."
  1068. (with-exception-handler (const #f)
  1069. (lambda _ (proc dir) dir)
  1070. #:unwind? #t))
  1071. (define args
  1072. (cdr (command-line)))
  1073. (when (or (member "--help" args)
  1074. (member "-h" args))
  1075. (format #t "Usage: ~a [OPTION]...
  1076. This Guix helper sets up a new writable RESULT_BASE if it's unset, then executes
  1077. xfstest's \"~a\" command (with any OPTIONs) as documented below.\n\n"
  1078. ,(basename helper)
  1079. ,(basename check)))
  1080. (let* ((gotenv-base (getenv "RESULT_BASE"))
  1081. (base (or gotenv-base
  1082. (let loop ((count 0))
  1083. (or (try mkdir
  1084. (format #f "xfstests.~a"
  1085. count))
  1086. (loop (+ 1 count))))))
  1087. (result-base (if (string-prefix? "/" base)
  1088. base
  1089. (string-append (getcwd) "/"
  1090. base))))
  1091. (setenv "RESULT_BASE" result-base)
  1092. ;; CHECK must run in its own directory or will fail.
  1093. (chdir ,(dirname check))
  1094. (let ((status
  1095. (status:exit-val (apply system* ,check args))))
  1096. (unless gotenv-base
  1097. (try rmdir result-base))
  1098. status))))))
  1099. (chmod helper #o755)))))))
  1100. (native-inputs
  1101. `(("autoconf" ,autoconf)
  1102. ("automake" ,automake)
  1103. ("libtool" ,libtool)))
  1104. (inputs
  1105. `(("acl" ,acl)
  1106. ("attr" ,attr)
  1107. ("guile" ,guile-3.0) ; for our xfstests-check helper script
  1108. ("inetutils" ,inetutils) ; for ‘hostname’
  1109. ("libuuid" ,util-linux "lib")
  1110. ("perl" ,perl) ; to automagically patch shebangs
  1111. ("time" ,time)
  1112. ("xfsprogs" ,xfsprogs)))
  1113. (home-page "https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git")
  1114. (synopsis "File system @acronym{QA, Quality Assurance} test suite")
  1115. (description
  1116. "The @acronym{FSQA, File System Quality Assurance} regression test suite,
  1117. more commonly known as xfstests, comprises over 1,500 tests that exercise
  1118. (@dfn{torture}) both the user- and kernel-space parts of many different file
  1119. systems.
  1120. As the package's name subtly implies, it was originally developed to test the
  1121. XFS file system. Today, xfstests is the primary test suite for all major file
  1122. systems supported by the kernel Linux including XFS, ext4, and Btrfs, but also
  1123. virtual and network file systems such as NFS, 9P, and the overlay file system.
  1124. The packaged @command{check} script is not in @env{PATH} but can be invoked
  1125. with the included @command{xfstests-check} helper.")
  1126. (license license:gpl2))))
  1127. (define-public zfs
  1128. (package
  1129. (name "zfs")
  1130. (version "2.1.1")
  1131. (outputs '("out" "module" "src"))
  1132. (source
  1133. (origin
  1134. (method url-fetch)
  1135. (uri (string-append "https://github.com/openzfs/zfs/releases"
  1136. "/download/zfs-" version
  1137. "/zfs-" version ".tar.gz"))
  1138. (sha256
  1139. (base32 "1zsc0zkz5cci6pxc0kwzn3xg72qv2fq65phb768y5dgk1784hkxx"))))
  1140. (build-system linux-module-build-system)
  1141. (arguments
  1142. `(;; The ZFS kernel module should not be downloaded since the license
  1143. ;; terms don't allow for distributing it, only building it locally.
  1144. #:substitutable? #f
  1145. ;; Tests cannot run in an unprivileged build environment.
  1146. #:tests? #f
  1147. #:phases
  1148. (modify-phases %standard-phases
  1149. (add-after 'configure 'really-configure
  1150. (lambda* (#:key outputs inputs #:allow-other-keys)
  1151. (let ((out (assoc-ref outputs "out")))
  1152. (substitute* "configure"
  1153. (("-/bin/sh") (string-append "-" (which "sh"))))
  1154. (invoke "./configure"
  1155. "--with-config=all"
  1156. (string-append "--prefix=" out)
  1157. (string-append "--with-dracutdir=" out "/lib/dracut")
  1158. (string-append "--with-udevdir=" out "/lib/udev")
  1159. (string-append "--with-mounthelperdir=" out "/sbin")
  1160. (string-append "--with-linux="
  1161. (assoc-ref inputs "linux-module-builder")
  1162. "/lib/modules/build")))))
  1163. (add-after 'unpack 'patch-source
  1164. (lambda* (#:key inputs outputs #:allow-other-keys)
  1165. (let ((out (assoc-ref outputs "out"))
  1166. (src (assoc-ref outputs "src"))
  1167. (util-linux (assoc-ref inputs "util-linux"))
  1168. (nfs-utils (assoc-ref inputs "nfs-utils"))
  1169. (kmod (assoc-ref inputs "kmod-runtime")))
  1170. ;; New feature "compatibility=" in 2.1.0.
  1171. ;; This feature looks up in two locations:
  1172. ;; /etc/zfs/compatibility.d/
  1173. ;; /usr/share/zfs/compatibility.d/
  1174. ;; The first is intended for system-specific compatibility
  1175. ;; sets, while the second is what is installed with the
  1176. ;; OpenZFS package, so use the absolute path for the first
  1177. ;; (which requires patching in the file) and the store path
  1178. ;; for the second (which it gets by default).
  1179. (substitute* "include/sys/fs/zfs.h"
  1180. (("#define\tZPOOL_SYSCONF_COMPAT_D.*$")
  1181. ; Use absolute path.
  1182. "#define\tZPOOL_SYSCONF_COMPAT_D\t\"/etc/zfs/compatibility.d\"\n"))
  1183. ;; Also update the manual, which uses absolute paths, so that
  1184. ;; /usr/share/zfs/compatibility.d/ is referred via the store.
  1185. (substitute* '("man/man7/zpoolprops.7"
  1186. "man/man7/zpool-features.7")
  1187. (("/usr/share/zfs/compatibility.d")
  1188. (string-append out "/share/zfs/compatibility.d")))
  1189. (substitute* "etc/Makefile.in"
  1190. ;; This just contains an example configuration file for
  1191. ;; configuring ZFS on traditional init systems, skip it
  1192. ;; since we cannot use it anyway; the install target becomes
  1193. ;; misdirected.
  1194. (("= default ") "= "))
  1195. (substitute* "lib/libzfs/os/linux/libzfs_util_os.c"
  1196. ;; Use path to /gnu/store/*-kmod in actual path that is exec'ed.
  1197. (("\"/sbin/modprobe\"")
  1198. (string-append "\"" kmod "/bin/modprobe" "\""))
  1199. ;; Just use 'modprobe' in message to user, since Guix
  1200. ;; does not have a traditional /sbin/
  1201. (("'/sbin/modprobe ") "'modprobe "))
  1202. (substitute* "contrib/Makefile.in"
  1203. ;; This is not configurable nor is its hard-coded /usr prefix.
  1204. ((" initramfs") ""))
  1205. (substitute* "module/os/linux/zfs/zfs_ctldir.c"
  1206. (("/usr/bin/env\", \"umount")
  1207. (string-append util-linux "/bin/umount\", \"-n"))
  1208. (("/usr/bin/env\", \"mount")
  1209. (string-append util-linux "/bin/mount\", \"-n")))
  1210. (substitute* "lib/libzfs/os/linux/libzfs_mount_os.c"
  1211. (("/bin/mount") (string-append util-linux "/bin/mount"))
  1212. (("/bin/umount") (string-append util-linux "/bin/umount")))
  1213. (substitute* "lib/libshare/os/linux/nfs.c"
  1214. (("/usr/sbin/exportfs")
  1215. (string-append nfs-utils "/sbin/exportfs")))
  1216. (substitute* "config/zfs-build.m4"
  1217. (("\\$sysconfdir/init.d") (string-append out "/etc/init.d")))
  1218. (substitute* '("etc/zfs/Makefile.am"
  1219. "cmd/zed/Makefile.am")
  1220. (("\\$\\(sysconfdir)") (string-append out "/etc")))
  1221. (substitute* "cmd/vdev_id/vdev_id"
  1222. (("PATH=/bin:/sbin:/usr/bin:/usr/sbin")
  1223. (string-append "PATH="
  1224. (dirname (which "chmod")) ":"
  1225. (dirname (which "grep")) ":"
  1226. (dirname (which "sed")) ":"
  1227. (dirname (which "gawk")))))
  1228. (substitute* "contrib/pyzfs/Makefile.in"
  1229. ((".*install-lib.*") ""))
  1230. (substitute* '("Makefile.am" "Makefile.in")
  1231. (("\\$\\(prefix)/src") (string-append src "/src")))
  1232. (substitute* (find-files "udev/rules.d/" ".rules.in$")
  1233. (("/sbin/modprobe") (string-append kmod "/bin/modprobe"))))))
  1234. (replace 'build
  1235. (lambda _ (invoke "make")))
  1236. (replace 'install
  1237. (lambda* (#:key outputs inputs native-inputs #:allow-other-keys)
  1238. (let* ((out (assoc-ref outputs "out"))
  1239. (moddir (assoc-ref outputs "module"))
  1240. (kmod (assoc-ref (or native-inputs inputs) "kmod")))
  1241. (invoke "make" "install"
  1242. (string-append "DEFAULT_INITCONF_DIR=" out "/etc/default")
  1243. (string-append "DEPMOD=" kmod "/bin/depmod")
  1244. (string-append "INSTALL_PATH=" out)
  1245. (string-append "INSTALL_MOD_PATH=" moddir)
  1246. "INSTALL_MOD_STRIP=1")
  1247. (install-file "contrib/bash_completion.d/zfs"
  1248. (string-append out
  1249. "/share/bash-completion/completions"))))))))
  1250. (native-inputs
  1251. `(("attr" ,attr)
  1252. ("kmod" ,kmod)
  1253. ("pkg-config" ,pkg-config)))
  1254. (inputs
  1255. `(("eudev" ,eudev)
  1256. ("kmod-runtime" ,kmod)
  1257. ("libaio" ,libaio)
  1258. ("libtirpc" ,libtirpc)
  1259. ("nfs-utils" ,nfs-utils)
  1260. ("openssl" ,openssl)
  1261. ("python" ,python)
  1262. ("python-cffi" ,python-cffi)
  1263. ("util-linux" ,util-linux)
  1264. ("util-linux:lib" ,util-linux "lib")
  1265. ("zlib" ,zlib)))
  1266. (home-page "https://zfsonlinux.org/")
  1267. (synopsis "OpenZFS on Linux")
  1268. (description
  1269. "OpenZFS is an advanced file system and volume manager which was
  1270. originally developed for Solaris and is now maintained by the OpenZFS
  1271. community.")
  1272. (license license:cddl1.0)))
  1273. (define-public zfs-auto-snapshot
  1274. (package
  1275. (name "zfs-auto-snapshot")
  1276. (version "1.2.4")
  1277. (source
  1278. (origin
  1279. (method git-fetch)
  1280. (uri (git-reference
  1281. (url
  1282. (string-append "https://github.com/zfsonlinux/" name))
  1283. (commit
  1284. (string-append "upstream/" version))))
  1285. (file-name (git-file-name name version))
  1286. (sha256
  1287. (base32 "0m4xw7h5qlbn5zdf9wb137pcr5l7hyrr7w2dgr16dfm5ay64vvfq"))))
  1288. (build-system gnu-build-system)
  1289. (inputs
  1290. ;; Note: if you are inheriting from the above zfs package in order
  1291. ;; to provide a specific stable kernel version, you should also
  1292. ;; inherit this package and replace the sole input below.
  1293. `(("zfs" ,zfs)))
  1294. (arguments
  1295. `(#:tests? #f ; No tests
  1296. #:phases
  1297. (modify-phases %standard-phases
  1298. (delete 'configure)
  1299. (delete 'build)
  1300. ;; Guix System may not have a traditional cron system, but
  1301. ;; the cron scripts installed by this package are convenient
  1302. ;; to use as targets for an mcron job specification, so make
  1303. ;; sure they can be run in-store.
  1304. (add-before 'install 'fix-scripts
  1305. (lambda* (#:key outputs inputs #:allow-other-keys)
  1306. (let* ((out (assoc-ref outputs "out"))
  1307. (zfs-auto-snapshot (string-append
  1308. out
  1309. "/sbin/zfs-auto-snapshot"))
  1310. (zfs-package (assoc-ref inputs "zfs"))
  1311. (zpool (string-append
  1312. zfs-package
  1313. "/sbin/zpool"))
  1314. (zfs (string-append
  1315. zfs-package
  1316. "/sbin/zfs")))
  1317. (substitute* '("etc/zfs-auto-snapshot.cron.daily"
  1318. "etc/zfs-auto-snapshot.cron.frequent"
  1319. "etc/zfs-auto-snapshot.cron.hourly"
  1320. "etc/zfs-auto-snapshot.cron.monthly"
  1321. "etc/zfs-auto-snapshot.cron.weekly")
  1322. (("zfs-auto-snapshot")
  1323. zfs-auto-snapshot))
  1324. (substitute* "src/zfs-auto-snapshot.sh"
  1325. (("LC_ALL=C zfs list")
  1326. (string-append "LC_ALL=C " zfs " list"))
  1327. (("LC_ALL=C zpool status")
  1328. (string-append "LC_ALL=C " zpool " status"))
  1329. (("zfs snapshot")
  1330. (string-append zfs " snapshot"))
  1331. (("zfs destroy")
  1332. (string-append zfs " destroy"))))))
  1333. ;; Provide DESTDIR and PREFIX on make command.
  1334. (replace 'install
  1335. (lambda* (#:key outputs #:allow-other-keys)
  1336. (let ((out (assoc-ref outputs "out")))
  1337. (invoke "make" "install"
  1338. "PREFIX="
  1339. (string-append "DESTDIR=" out)))
  1340. #t)))))
  1341. (home-page "https://github.com/zfsonlinux/zfs-auto-snapshot")
  1342. (synopsis "Automatically create, rotate and destroy ZFS snapshots")
  1343. (description "An alternative implementation of the zfs-auto-snapshot
  1344. service for Linux that is compatible with zfs-linux (now OpenZFS) and
  1345. zfs-fuse.
  1346. On Guix System, you will need to invoke the included shell scripts as
  1347. @code{job} definitions in your @code{operating-system} declaration.")
  1348. (license license:gpl2+)))
  1349. (define-public mergerfs
  1350. (package
  1351. (name "mergerfs")
  1352. (version "2.32.6")
  1353. (source
  1354. (origin
  1355. (method url-fetch)
  1356. (uri (string-append "https://github.com/trapexit/mergerfs/"
  1357. "releases/download/" version "/"
  1358. "mergerfs-" version ".tar.gz"))
  1359. (sha256
  1360. (base32 "08gwi094ll0b7nf2i44fyjxiyvr45rp766npbdyw0yzyigas8a2f"))))
  1361. (build-system gnu-build-system)
  1362. (arguments
  1363. `(#:make-flags
  1364. (list (string-append "CC=" ,(cc-for-target))
  1365. (string-append "CXX=" ,(cxx-for-target))
  1366. (string-append "PREFIX=" (assoc-ref %outputs "out")))
  1367. #:tests? #f ; all require a kernel with FUSE loaded
  1368. #:phases
  1369. (modify-phases %standard-phases
  1370. (delete 'configure) ; no configure script
  1371. (add-after 'unpack 'set-file-names
  1372. (lambda* (#:key inputs outputs #:allow-other-keys)
  1373. (substitute* "libfuse/Makefile"
  1374. (("/sbin") "$(EXEC_PREFIX)/sbin")
  1375. (("chown") "true") ; disallowed in the build environment
  1376. (("strip") "true")) ; breaks cross-compilation
  1377. ;; These were copied from the fuse package.
  1378. (substitute* '("libfuse/lib/mount_util.c"
  1379. "libfuse/util/mount_util.c")
  1380. (("/bin/(u?)mount" _ maybe-u)
  1381. (search-input-file inputs
  1382. (string-append "bin/" maybe-u
  1383. "mount"))))
  1384. (substitute* '("libfuse/util/mount.mergerfs.c")
  1385. (("/bin/sh" command)
  1386. (string-append (assoc-ref inputs "bash-minimal") command))))))))
  1387. ;; Mergerfs bundles a heavily modified copy of fuse.
  1388. (inputs
  1389. `(("bash-minimal" ,bash-minimal)
  1390. ("util-linux" ,util-linux)))
  1391. (home-page "https://github.com/trapexit/mergerfs")
  1392. (synopsis "Featureful union file system")
  1393. (description "mergerfs is a union file system geared towards simplifying
  1394. storage and management of files across numerous commodity storage devices. It
  1395. is similar to mhddfs, unionfs, and aufs.")
  1396. (license (list
  1397. license:isc ; mergerfs
  1398. license:gpl2 license:lgpl2.0 ; Imported libfuse code.
  1399. ))))
  1400. (define-public mergerfs-tools
  1401. (let ((commit "3b6fe008517aeda715c306eaf4914f6f537da88d")
  1402. (revision "3"))
  1403. (package
  1404. (name "mergerfs-tools")
  1405. ;; No released version exists.
  1406. (version (git-version "0.0.0" revision commit))
  1407. (source
  1408. (origin
  1409. (method git-fetch)
  1410. (uri (git-reference
  1411. (url "https://github.com/trapexit/mergerfs-tools")
  1412. (commit commit)))
  1413. (file-name (git-file-name name version))
  1414. (sha256
  1415. (base32 "15pgym6c4viy57ccgp28dnqwh12f3gr02axg86y578aqa2yaa0ad"))))
  1416. (build-system copy-build-system)
  1417. (inputs
  1418. `(("python" ,python)
  1419. ("python-xattr" ,python-xattr)
  1420. ("rsync" ,rsync)))
  1421. (arguments
  1422. '(#:install-plan
  1423. '(("src/" "bin/"))
  1424. #:phases
  1425. (modify-phases %standard-phases
  1426. (add-after 'unpack 'patch-paths
  1427. (lambda* (#:key inputs #:allow-other-keys)
  1428. (substitute* (find-files "src" "^mergerfs\\.")
  1429. (("'rsync'")
  1430. (string-append "'" (assoc-ref inputs "rsync") "/bin/rsync'"))
  1431. (("'rm'")
  1432. (string-append "'" (assoc-ref inputs "coreutils") "/bin/rm'")))
  1433. (substitute* "src/mergerfs.mktrash"
  1434. (("xattr")
  1435. (search-input-file inputs "/bin/xattr"))
  1436. (("mkdir")
  1437. (search-input-file inputs "/bin/mkdir"))))))))
  1438. (synopsis "Tools to help manage data in a mergerfs pool")
  1439. (description "mergerfs-tools is a suite of programs that can audit
  1440. permissions and ownership of files and directories on a mergerfs volume,
  1441. duplicates files and directories across branches in its pool, find and remove
  1442. duplicate files, balance pool drives, consolidate files in a single mergerfs
  1443. directory onto a single drive and create FreeDesktop.org Trash specification
  1444. compatible directories.")
  1445. (home-page "https://github.com/trapexit/mergerfs-tools")
  1446. (license license:isc))))
  1447. (define-public python-dropbox
  1448. (package
  1449. (name "python-dropbox")
  1450. (version "11.5.0")
  1451. (source
  1452. (origin
  1453. (method url-fetch)
  1454. (uri (pypi-uri "dropbox" version))
  1455. (sha256
  1456. (base32
  1457. "16bxx9xqx2s4d9khrw57a0bj4q7nc6kq355wl4pfddn9cqvh9rg2"))))
  1458. (build-system python-build-system)
  1459. (arguments '(#:tests? #f)) ; Tests require a network connection.
  1460. (native-inputs
  1461. `(("python-pytest" ,python-pytest)
  1462. ("python-pytest-runner" ,python-pytest-runner)))
  1463. (propagated-inputs
  1464. `(("python-certifi" ,python-certifi)
  1465. ("python-chardet" ,python-chardet)
  1466. ("python-requests" ,python-requests)
  1467. ("python-six" ,python-six)
  1468. ("python-stone" ,python-stone)
  1469. ("python-urllib3" ,python-urllib3)))
  1470. (home-page "https://www.dropbox.com/developers")
  1471. (synopsis "Official Dropbox API Client")
  1472. (description "This package provides a Python SDK for integrating with the
  1473. Dropbox API v2.")
  1474. (license license:expat)))
  1475. (define-public dbxfs
  1476. (package
  1477. (name "dbxfs")
  1478. (version "1.0.51")
  1479. (source
  1480. (origin
  1481. ;; Release tarball contains files not in git repository.
  1482. (method git-fetch)
  1483. (uri (git-reference
  1484. (url "https://thelig.ht/code/dbxfs")
  1485. (commit (string-append "v" version))))
  1486. (file-name (git-file-name name version))
  1487. (sha256
  1488. (base32
  1489. "0bidb1gg5lqa1561f20qnj7gy323q65qwzfrb8h8gs6dsl3g6yfg"))
  1490. (patches (search-patches "dbxfs-remove-sentry-sdk.patch"))))
  1491. (build-system python-build-system)
  1492. (arguments
  1493. '(#:tests? #f)) ; tests requires safefs
  1494. (propagated-inputs
  1495. `(("python-appdirs" ,python-appdirs)
  1496. ("python-block-tracing" ,python-block-tracing)
  1497. ("python-dropbox" ,python-dropbox)
  1498. ("python-keyring" ,python-keyring)
  1499. ("python-keyrings.alt" ,python-keyrings.alt)
  1500. ("python-privy" ,python-privy)
  1501. ("python-userspacefs" ,python-userspacefs)))
  1502. (home-page "https://thelig.ht/code/dbxfs/")
  1503. (synopsis "User-space file system for Dropbox")
  1504. (description
  1505. "@code{dbxfs} allows you to mount your Dropbox folder as if it were a
  1506. local file system using FUSE.")
  1507. (license license:gpl3+)))
  1508. (define-public go-github-com-hanwen-fuse
  1509. (package
  1510. (name "go-github-com-hanwen-fuse")
  1511. (version "2.0.3")
  1512. (source
  1513. (origin
  1514. (method git-fetch)
  1515. (uri (git-reference
  1516. (url "https://github.com/hanwen/go-fuse")
  1517. (commit (string-append "v" version))))
  1518. (file-name (git-file-name name version))
  1519. (sha256
  1520. (base32
  1521. "1y44d08fxyis99s6jxdr6dbbw5kv3wb8lkhq3xmr886i4w41lz03"))))
  1522. (build-system go-build-system)
  1523. (arguments
  1524. `(#:import-path "github.com/hanwen/go-fuse"))
  1525. (propagated-inputs
  1526. `(("go-golang-org-x-sys" ,go-golang-org-x-sys)))
  1527. (home-page "https://github.com/hanwen/go-fuse")
  1528. (synopsis "FUSE bindings for Go")
  1529. (description
  1530. "This package provides Go native bindings for the FUSE kernel module.")
  1531. (license license:bsd-3)))
  1532. (define-public rewritefs
  1533. (let ((revision "0")
  1534. ;; This is the last commit supporting our fuse@2.
  1535. (commit "31e2810b596028a12e49a08664567755f4b387b2"))
  1536. (package
  1537. (name "rewritefs")
  1538. (version (git-version "0.0.0" revision commit))
  1539. (source
  1540. (origin
  1541. (method git-fetch)
  1542. (uri (git-reference
  1543. (url "https://github.com/sloonz/rewritefs")
  1544. (commit commit)))
  1545. (file-name (git-file-name name version))
  1546. (sha256
  1547. (base32 "0k1aas2bdq2l3a6q3fvmngpakcxiws8qny2w6z7ffngyqxh33fv7"))))
  1548. (build-system gnu-build-system)
  1549. (arguments
  1550. `(#:modules ((srfi srfi-26)
  1551. ,@%gnu-build-system-modules)
  1552. #:make-flags
  1553. (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
  1554. #:test-target "test"
  1555. #:tests? #f ; all require a kernel with FUSE loaded
  1556. #:phases
  1557. (modify-phases %standard-phases
  1558. (delete 'configure) ; no configure script
  1559. (add-after 'install 'install-examples
  1560. (lambda* (#:key outputs #:allow-other-keys)
  1561. (let* ((out (assoc-ref outputs "out"))
  1562. (doc (string-append out "/share/doc/" ,name "-" ,version)))
  1563. (for-each (cut install-file <> (string-append doc "/examples"))
  1564. (find-files "." "^config\\."))))))))
  1565. (native-inputs
  1566. `(("pkg-config" ,pkg-config)))
  1567. (inputs
  1568. `(("fuse" ,fuse)
  1569. ("pcre" ,pcre)))
  1570. (home-page "https://github.com/sloonz/rewritefs")
  1571. (synopsis "FUSE file system that changes particular file names")
  1572. (description
  1573. "RewriteFS is a @acronym{FUSE, File system in USEr space} to change the
  1574. name of accessed files on the fly based on any number of regular expressions.
  1575. It's like the @code{rewrite} action of many Web servers, but for your file
  1576. system. For example, it can help keep your home directory tidy by transparently
  1577. rewriting the location of configuration files of software that doesn't follow
  1578. the XDG directory specification from @file{~/.@var{name}} to
  1579. @file{~/.config/@var{name}}.")
  1580. (license license:gpl2+))))
  1581. (define-public tmsu
  1582. (package
  1583. (name "tmsu")
  1584. (version "0.7.5")
  1585. (source
  1586. (origin
  1587. (method git-fetch)
  1588. (uri (git-reference
  1589. (url "https://github.com/oniony/TMSU")
  1590. (commit (string-append "v" version))))
  1591. (file-name (git-file-name name version))
  1592. (sha256
  1593. (base32
  1594. "0834hah7p6ad81w60ifnxyh9zn09ddfgrll04kwjxwp7ypbv38wq"))))
  1595. (build-system go-build-system)
  1596. (arguments
  1597. `(#:import-path "github.com/oniony/TMSU"
  1598. #:unpack-path ".."
  1599. #:install-source? #f
  1600. #:phases
  1601. (modify-phases %standard-phases
  1602. (add-after 'install 'post-install
  1603. (lambda* (#:key outputs #:allow-other-keys)
  1604. (let ((out (assoc-ref outputs "out")))
  1605. ;; The go build system produces /bin/TMSU -> install as /bin/tmsu
  1606. (rename-file (string-append out "/bin/TMSU")
  1607. (string-append out "/bin/tmsu"))))))))
  1608. (inputs
  1609. `(("go-github-com-mattn-go-sqlite3" ,go-github-com-mattn-go-sqlite3)
  1610. ("go-github-com-hanwen-fuse" ,go-github-com-hanwen-fuse)))
  1611. (home-page "https://github.com/oniony/TMSU")
  1612. (synopsis "Tag files and access them through a virtual file system")
  1613. (description
  1614. "TMSU is a tool for tagging your files. It provides a simple
  1615. command-line utility for applying tags and a virtual file system to give you a
  1616. tag-based view of your files from any other program. TMSU does not alter your
  1617. files in any way: they remain unchanged on disk, or on the network, wherever
  1618. your put them. TMSU maintains its own database and you simply gain an
  1619. additional view, which you can mount where you like, based upon the tags you
  1620. set up.")
  1621. (license license:gpl3+)))
  1622. (define-public udftools
  1623. (package
  1624. (name "udftools")
  1625. (version "2.3")
  1626. (source (origin
  1627. (method git-fetch)
  1628. (uri (git-reference
  1629. (url "https://github.com/pali/udftools")
  1630. (commit version)))
  1631. (sha256
  1632. (base32
  1633. "1nl2s61znyzaap23zhbdg3znj6l6akr313fchn5wwvjzj8k70is9"))
  1634. (file-name (git-file-name name version))))
  1635. (build-system gnu-build-system)
  1636. (arguments
  1637. `(#:configure-flags
  1638. (list (string-append "--docdir=" (assoc-ref %outputs "out")
  1639. "/share/doc/" ,name "-" ,version))))
  1640. (native-inputs
  1641. `(("automake" ,automake)
  1642. ("autoconf" ,autoconf)
  1643. ("libtool" ,libtool)
  1644. ("pkg-config" ,pkg-config)))
  1645. (home-page "https://github.com/pali/udftools")
  1646. (synopsis "Tools to manage UDF file systems and DVD/CD-R(W) drives")
  1647. (description "@code{udftools} is a set of programs for reading
  1648. and modifying @acronym{UDF, Universal Disk Format} file systems.
  1649. @acronym{UDF, Universal Disk Format} is a file system mostly used for DVDs
  1650. and other optical media. It supports read-only media (DVD/CD-R)
  1651. and rewritable media that wears out (DVD/CD-RW).")
  1652. (license license:gpl2+)))