file-systems.scm 71 KB

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