;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012, 2013 Nikita Karetnikov ;;; Copyright © 2015 Mathieu Lirzin ;;; Copyright © 2015 Mark H Weaver ;;; Copyright © 2016, 2018–2022 Tobias Geerinckx-Rice ;;; Copyright © 2016, 2019, 2020, 2021 Efraim Flashner ;;; Copyright © 2016 Jan Nieuwenhuizen ;;; Copyright © 2016 Roel Janssen ;;; Copyright © 2016, 2017 Marius Bakke ;;; Copyright © 2017 Hartmut Goebel ;;; Copyright © 2017 Stefan Reichör ;;; Copyright © 2018 Vasile Dumitrascu ;;; Copyright © 2018 Eric Bavier ;;; Copyright © 2018 Rutger Helling ;;; Copyright © 2018, 2019, 2020 Pierre Neidhardt ;;; Copyright © 2019, 2021 Leo Famulari ;;; Copyright © 2019 Pierre Langlois ;;; Copyright © 2020 Pkill -9 ;;; Copyright © 2020 Vincent Legoll ;;; Copyright © 2020 Raghav Gururajan ;;; Copyright © 2021 Michael Rohleder ;;; Copyright © 2021 Mathieu Othacehe ;;; Copyright © 2021 Brice Waegeneire ;;; Copyright © 2021 Justin Veilleux ;;; Copyright © 2014, 2022 Ludovic Courtès ;;; Copyright © 2022 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (gnu packages disk) #:use-module (gnu packages) #:use-module (gnu packages autotools) #:use-module (gnu packages base) #:use-module (gnu packages bash) #:use-module (gnu packages build-tools) #:use-module (gnu packages c) #:use-module (gnu packages check) #:use-module (gnu packages compression) #:use-module (gnu packages crypto) #:use-module (gnu packages cryptsetup) #:use-module (gnu packages databases) #:use-module (gnu packages docbook) #:use-module (gnu packages documentation) #:use-module (gnu packages elf) #:use-module (gnu packages file-systems) #:use-module (gnu packages file) #:use-module (gnu packages fontutils) #:use-module (gnu packages gettext) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) #:use-module (gnu packages gnupg) #:use-module (gnu packages golang) #:use-module (gnu packages graphics) #:use-module (gnu packages gtk) #:use-module (gnu packages guile) #:use-module (gnu packages image) #:use-module (gnu packages linux) #:use-module (gnu packages ncurses) #:use-module (gnu packages nss) #:use-module (gnu packages perl) #:use-module (gnu packages perl-web) #:use-module (gnu packages pkg-config) #:use-module (gnu packages popt) #:use-module (gnu packages python) #:use-module (gnu packages python-xyz) #:use-module (gnu packages qt) #:use-module (gnu packages readline) #:use-module (gnu packages samba) #:use-module (gnu packages serialization) #:use-module (gnu packages sphinx) #:use-module (gnu packages sqlite) #:use-module (gnu packages swig) #:use-module (gnu packages terminals) #:use-module (gnu packages textutils) #:use-module (gnu packages tls) #:use-module (gnu packages vim) #:use-module (gnu packages w3m) #:use-module (gnu packages web) #:use-module (gnu packages xml) #:use-module (gnu packages xorg) #:use-module (guix build-system gnu) #:use-module (guix build-system glib-or-gtk) #:use-module (guix build-system go) #:use-module (guix build-system meson) #:use-module (guix build-system python) #:use-module (guix build-system trivial) #:use-module (guix build-system scons) #:use-module (guix download) #:use-module (guix gexp) #:use-module (guix git-download) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix utils)) (define-public bcache-tools ;; The 1.1 release is a year old and missing new features & documentation. (let ((commit "096d205a9f1be8540cbc5a468c0da8203023de70") (revision "0")) (package (name "bcache-tools") (version (git-version "1.1" revision commit)) (source (origin (method git-fetch) (uri (git-reference (url (string-append "https://git.kernel.org/pub/scm/" "linux/kernel/git/colyli/bcache-tools.git")) (commit commit))) (file-name (git-file-name name version)) (sha256 (base32 "0r0vwg4vacz5zgsafk360xn7gi2scy01c79mkmjrdyxjfij5z3iy")))) (build-system gnu-build-system) (arguments `(#:tests? #f ; no test suite #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")) (string-append "UDEVLIBDIR=" (assoc-ref %outputs "out") "/lib/udev") (string-append "DRACUTLIBDIR=" (assoc-ref %outputs "out") "/lib/dracut") (string-append "CC=" ,(cc-for-target))) #:phases (modify-phases %standard-phases (delete 'configure) ; no configure script (add-before 'install 'fix-hard-coded-file-names (lambda _ ;; Some rules still hard-code /usr. (substitute* "Makefile" (("/usr") "${PREFIX}")) #t)) (add-before 'install 'create-target-directories (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out"))) (for-each (lambda (dir) (mkdir-p (string-append out dir))) (list "/lib/udev/rules.d" "/sbin" "/share/man/man8")) #t)))))) (native-inputs (list pkg-config)) (inputs `(("util-linux:lib" ,util-linux "lib"))) ; libblkid (home-page "https://bcache.evilpiepirate.org") (synopsis "Tools for the Linux kernel block layer cache") (description "This package contains user-space utilities to create and inspect bcache partitions. It's rather minimal as bcache is designed to work well without configuration on any system. Linux's @acronym{bcache, block layer cache} lets one or more fast block devices, such as flash-based @acronym{SSDs, solid state drives}, to act as a cache for one or more slower (and inexpensive) devices, such as hard disk drives or redundant storage arrays. In fact, bcache intends to be a superior alternative to battery-backed RAID controllers. Bcache is designed around the performance characteristics of SSDs and tries to minimize write inflation. It's file-system agnostic and does both write-through and write-back caching.") (license license:gpl2)))) (define-public udevil (package (name "udevil") (version "0.4.4") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/IgnorantGuru/udevil") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "0x9mjr9abvbxzfa9mrip5264iz1qxvsl01k3ybz95q4a7xl4jcb3")))) (build-system gnu-build-system) (arguments `(#:configure-flags (list "--disable-systemd" (string-append "--sysconfdir=" (assoc-ref %outputs "out") "/etc") ;; udevil expects these programs to be run with uid set as root. ;; user has to manually add these programs to setuid-programs. ;; mount and umount are default setuid-programs in guix system. "--with-mount-prog=/run/setuid-programs/mount" "--with-umount-prog=/run/setuid-programs/umount" "--with-losetup-prog=/run/setuid-programs/losetup" "--with-setfacl-prog=/run/setuid-programs/setfacl") #:phases (modify-phases %standard-phases (add-after 'unpack 'remove-root-reference (lambda _ (substitute* "src/Makefile.in" (("-o root -g root") "")) #t)) (add-after 'unpack 'patch-udevil-reference ;; udevil expects itself to be run with uid set as root. ;; devmon also expects udevil to be run with uid set as root. ;; user has to manually add udevil to setuid-programs. (lambda _ (substitute* "src/udevil.c" (("/usr/bin/udevil") "/run/setuid-programs/udevil")) (substitute* "src/devmon" (("`which udevil 2>/dev/null`") "/run/setuid-programs/udevil")) #t))))) (native-inputs (list intltool pkg-config)) (inputs (list cifs-utils curlftpfs eudev fakeroot glib sshfs)) (synopsis "Device and file system manager") (description "udevil is a command line program that mounts and unmounts removable devices without a password, shows device info, and monitors device changes. It can also mount ISO files, NFS, SMB, FTP, SSH and WebDAV URLs, and tmpfs/ramfs filesystems.") (home-page "https://ignorantguru.github.io/udevil/") (license license:gpl3+))) (define-public parted (package (name "parted") (version "3.5") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/parted/parted-" version ".tar.xz")) (sha256 (base32 "18h51i3x5cbqhlj5rm23m9sfw63gaaby5czln5w6qpqj3ifdsf29")))) (build-system gnu-build-system) (arguments (list #:phases #~(modify-phases %standard-phases (add-after 'unpack 'fix-locales-and-python (lambda _ (substitute* "tests/t0251-gpt-unicode.sh" (("C.UTF-8") "en_US.utf8")) ;not in Glibc locales (substitute* "tests/msdos-overlap" (("/usr/bin/python") (which "python")))))))) (inputs (list lvm2 readline `(,util-linux "lib"))) (native-inputs (list gettext-minimal ;; For the tests. e2fsprogs perl python-wrapper util-linux)) (home-page "https://www.gnu.org/software/parted/") (synopsis "Disk partition editor") (description "GNU Parted is a package for creating and manipulating disk partition tables. It includes a library and command-line utility.") (license license:gpl3+))) (define-public parted-3.4 (package (inherit parted) (version "3.4") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/parted/parted-" version ".tar.xz")) (sha256 (base32 "0hjkv84x1bs2qqyx1fnzjqyyqrhv7kpdbq9bgydmi99d8wi80ag1")))))) (define-public fdisk (package (name "fdisk") (version "2.0.0a1") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/fdisk/gnufdisk-" version ".tar.gz")) (sha256 (base32 "1d8za79kw8ihnp2br084rgyjv9whkwp7957rzw815i0izx6xhqy9")))) (build-system gnu-build-system) (inputs `(("gettext" ,gettext-minimal) ("guile" ,guile-1.8) ("util-linux" ,util-linux "lib") ("parted" ,parted))) ;; The build neglects to look for its own headers in its own tree. A next ;; release should fix this, but may never come: GNU fdisk looks abandoned. (arguments `(#:phases (modify-phases %standard-phases (add-after 'unpack 'skip-broken-header-probes (lambda _ (substitute* "backend/configure" (("gnufdisk-common.h .*") "\n")) #t))) #:make-flags (list (string-append "CPPFLAGS=" " -I../common/include " " -I../debug/include " " -I../exception/include")))) (home-page "https://www.gnu.org/software/fdisk/") (synopsis "Low-level disk partitioning and formatting") (description "GNU fdisk provides a GNU version of the common disk partitioning tool fdisk. fdisk is used for the creation and manipulation of disk partition tables, and it understands a variety of different formats.") (license license:gpl3+))) (define-public gpart ;; The latest (0.3) release is from 2015 and is missing a crash fix. (let ((commit "ec03350a01ad69708b5a3e2d47b8e002b0eba6c9") (revision "0")) (package (name "gpart") (version (git-version "0.3" revision commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/baruch/gpart") (commit commit))) (file-name (git-file-name name version)) (sha256 (base32 "1dasss2017-05-21. #:parallel-build? #f #:phases (modify-phases %standard-phases (add-before 'configure 'change-directory (lambda _ (chdir (string-append ,version "/dmraid")) (substitute* "make.tmpl.in" (("/bin/sh") (which "sh"))) #t))) #:configure-flags (list ;; Make sure programs such as 'dmevent_tool' can ;; find libdmraid.so. (string-append "LDFLAGS=-Wl,-rpath=" (assoc-ref %outputs "out") "/lib")))) (home-page "https://people.redhat.com/~heinzm/sw/dmraid/") (synopsis "Device mapper RAID interface") (description "This software supports RAID device discovery, RAID set activation, creation, removal, rebuild and display of properties for ATARAID/DDF1 metadata. @command{dmraid} uses @file{libdevmapper} and the device-mapper kernel runtime to create devices with respective mappings for the ATARAID sets discovered.") (license license:gpl2+))) (define-public libblockdev (package (name "libblockdev") (version "2.27") (source (origin (method url-fetch) (uri (string-append "https://github.com/storaged-project/" "libblockdev/releases/download/" version "-1/libblockdev-" version ".tar.gz")) (sha256 (base32 "05rm9h8v30rahr245jcw6if6b5g16mb5hnz7wl1shzip0wky3k3d")))) (build-system gnu-build-system) (arguments `(#:phases (modify-phases %standard-phases (add-after 'unpack 'patch-configuration-directory (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (substitute* "src/lib/blockdev.c" (("/etc/libblockdev/conf.d/" path) (string-append out path))))))))) (native-inputs (list gobject-introspection pkg-config python-wrapper util-linux)) (inputs (list btrfs-progs cryptsetup dosfstools dmraid eudev glib kmod libbytesize libyaml lvm2 mdadm ndctl nss parted volume-key xfsprogs)) (home-page "https://github.com/storaged-project/libblockdev") (synopsis "Library for manipulating block devices") (description "libblockdev is a C library supporting GObject introspection for manipulation of block devices. It has a plugin-based architecture where each technology (like LVM, Btrfs, MD RAID, Swap...) is implemented in a separate plugin, possibly with multiple implementations (e.g. using LVM CLI or the new LVM D-Bus API).") (license license:lgpl2.1+))) (define-public rmlint (package (name "rmlint") (version "2.10.1") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/sahib/rmlint") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "15xfkcw1bkfyf3z8kl23k3rlv702m0h7ghqxvhniynvlwbgh6j2x")))) (build-system scons-build-system) (arguments `(#:scons ,scons-python2 #:scons-flags (list (string-append "--prefix=" %output) (string-append "--actual-prefix=" %output)) #:tests? #f ; No tests? #:phases (modify-phases %standard-phases (add-after 'unpack 'scons-propagate-environment (lambda* (#:key inputs #:allow-other-keys) ;; TODO: `rmlint --gui` fails with ;; "Failed to load shredder: No module named 'shredder'". ;; The GUI might also need extra dependencies, such as ;; python-gobject, python-cairo, dconf, librsvg, gtksourceview3. (substitute* "lib/cmdline.c" (("const char \\*commands\\[\\] = \\{\"python3\", \"python\", NULL\\};") (string-append "const char *commands[] = {\"" (assoc-ref inputs "python") "/bin/python" "\", \"python\", NULL};"))) ;; By design, SCons does not, by default, propagate ;; environment variables to subprocesses. See: ;; ;; Here, we modify the SConstruct file to arrange for ;; environment variables to be propagated. (substitute* "SConstruct" (("^env = Environment\\(.*\\)" all) (string-append all "\nenv['ENV']=os.environ")))))))) (native-inputs `(("pkg-config" ,pkg-config) ("glib:bin" ,glib "bin") ("python-sphinx" ,python-sphinx))) (inputs `(("python" ,python-wrapper) ("glib" ,glib) ("libelf" ,libelf) ("elfutils" ,elfutils) ("json-glib" ,json-glib) ("libblkid" ,util-linux "lib"))) (home-page "https://rmlint.rtfd.org") (synopsis "Remove duplicates and other lint from the file system") (description "@command{rmlint} finds space waste and other broken things on your file system and offers to remove it. @command{rmlint} can find: @itemize @item duplicate files and duplicate directories, @item non-stripped binaries (i.e. binaries with debug symbols), @item broken symbolic links, @item empty files and directories, @item files with broken user and/or group ID. @end itemize\n") (license license:gpl3+))) (define-public lf (package (name "lf") (version "27") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/gokcehan/lf") (commit (string-append "r" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1piym8za0iw2s8yryh39y072f90mzisv89ffvn1jzb71f71mbfqa")))) (build-system go-build-system) (native-inputs (list go-github.com-mattn-go-runewidth go-golang-org-x-term go-gopkg-in-djherbis-times-v1 go-github-com-gdamore-tcell-v2)) (arguments `(#:import-path "github.com/gokcehan/lf")) (home-page "https://github.com/gokcehan/lf") (synopsis "Console file browser similar to Ranger") (description "lf (as in \"list files\") is a terminal file manager written in Go. It is heavily inspired by ranger with some missing and extra features. Some of the missing features are deliberately omitted since they are better handled by external tools.") (license license:expat))) (define-public xfe (package (name "xfe") (version "1.44") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/xfe/xfe/" version "/" "xfe-" version ".tar.xz")) (sha256 (base32 "1dihq03jqjllb69r78d9ihjjadi39v7sgzdf68qpxz5xhp8i8k2r")))) (build-system gnu-build-system) (arguments `(#:phases (modify-phases %standard-phases (add-after 'unpack 'patch-potfiles (lambda _ ;; To add missing entry 'intl/plural.c' to potfiles list. ;; Refer to https://sourceforge.net/p/xfe/bugs/257/ (substitute* "po/POTFILES.in" (("src/help.h") (string-append "src/help.h\n" "intl/plural.c"))))) (add-after 'unpack 'patch-bin-dirs (lambda* (#:key inputs #:allow-other-keys) (let* ((bash (assoc-ref inputs "bash")) (coreutils (assoc-ref inputs "coreutils")) (findutils (assoc-ref inputs "findutils")) (file-prog (assoc-ref inputs "file"))) (with-directory-excursion "src" (substitute* '("FilePanel.cpp" "help.h" "SearchPanel.cpp" "startupnotification.cpp" "xfeutils.cpp" "../st/config.h") (("/bin/sh" file) (string-append bash file)) (("/bin/ls" file) (string-append coreutils file)) (("/usr(/bin/du)" _ file) (string-append coreutils file)) (("/usr(/bin/sort)" _ file) (string-append coreutils file)) (("/usr(/bin/cut)" _ file) (string-append coreutils file)) (("/usr(/bin/xargs)" _ file) (string-append findutils file)) (("/usr(/bin/file)" _ file) (string-append file-prog file)))) #t))) (add-after 'unpack 'patch-share-dirs (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (share (string-append out "/share")) (xfe (string-append share "/xfe"))) (with-directory-excursion "src" (substitute* '("foxhacks.cpp" "help.h" "xfedefs.h" "XFileExplorer.cpp") (("/(usr|opt)(/local)?/share") share) (("~/.config/xfe") xfe))) #t)))))) (native-inputs (list intltool pkg-config)) (inputs `(("bash" ,bash) ("coreutils" ,coreutils) ("file" ,file) ("findutils" ,findutils) ("fox" ,fox) ("freetype" ,freetype) ("x11" ,libx11) ("xcb" ,libxcb) ("xcb-util" ,xcb-util) ("xft" ,libxft) ("xrandr" ,libxrandr))) (synopsis "File Manager for X-Based Graphical Systems") (description "XFE (X File Explorer) is a file manager for X. It is based on the popular but discontinued, X Win Commander. It aims to be the file manager of choice for all light thinking Unix addicts!") (home-page "http://roland65.free.fr/xfe/") (license license:gpl2+))) (define-public hddtemp (package (name "hddtemp") ;; advertises the project as ;; ‘orphaned/unmaintained’. Use a maintained fork/continuation. (version "0.4.3") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/vitlav/hddtemp") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "04kylb2ka0jimi238zpfq1yii2caidpmj3ck51rvxz03y5lpq8fw")))) (build-system gnu-build-system) (arguments `(#:configure-flags (list (string-append "--with-db-path=" (assoc-ref %outputs "out") "/share/hddtemp/hddtemp.db")) #:phases (modify-phases %standard-phases (add-before 'bootstrap 'delete-autogen.sh (lambda _ ;; The default 'bootstrap phase works better. (delete-file "autogen.sh"))) (add-after 'install 'install-db (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (install-file "data/hddtemp.db" (string-append out "/share/hddtemp")))))))) (native-inputs `(("autoconf" ,autoconf) ("automake" ,automake) ("gettext" ,gettext-minimal))) (home-page "https://github.com/vitlav/hddtemp") (synopsis "Report the temperature of hard drives from S.M.A.R.T. information") (description "@command{hddtemp} is a small utility that gives you the temperature of your hard drive by reading S.M.A.R.T. information (for drives that support this feature).") (license license:gpl2+))) (define-public memkind (package (name "memkind") (version "1.13.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/memkind/memkind") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0zbil6xqmsrnh773ihxyfna6pvvxv3kczdb3g863ssflwwvv7h4w")))) (build-system gnu-build-system) (inputs (list ;; memkind patched jemalloc to add je_arenalookupx, ;; je_check_reallocatex--i.e. they forked jemalloc. ;("jemalloc" ,jemalloc) ndctl numactl)) (native-inputs (list autoconf automake libtool)) (arguments `(#:configure-flags (list (string-append "--docdir=" (assoc-ref %outputs "out") "/share/doc/" ,name "-" ,version)) #:tests? #f ; Tests require a NUMA-enabled system. #:phases (modify-phases %standard-phases (add-before 'build 'autogen-jemalloc (lambda _ (with-directory-excursion "jemalloc" (substitute* "Makefile.in" (("/bin/sh") (which "sh"))) (invoke "autoconf") (substitute* "configure" (("/bin/sh") (which "sh"))))))))) (home-page "https://github.com/memkind/memkind") (synopsis "Heap manager with memory kinds (for NUMA)") (description "This package provides a user-extensible heap manager built on top of jemalloc which enables control of memory characteristics and a partitioning of the heap between kinds of memory (for NUMA).") (license license:bsd-3))) (define-public mmc-utils (let ((commit "3969aa4804edb8aed7bcb3c958e49d0c7388b067") (revision "1")) (package (name "mmc-utils") (version (git-version "0.1" revision commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://git.kernel.org/pub/scm/utils/mmc/mmc-utils.git") (commit commit))) (file-name (git-file-name name version)) (sha256 (base32 "0pvcm685x63afvp8795jd4vn4zs8psh8bs6j2yvk1kgrawpyk10g")))) (build-system gnu-build-system) (arguments `(#:tests? #f ; No test suite #:make-flags (list (string-append "prefix=" (assoc-ref %outputs "out")) (string-append "CC=" ,(cc-for-target))) #:phases (modify-phases %standard-phases ;; No ./configure script (delete 'configure) ;; The Makefile's "install-man" target is a no-op. (add-after 'install 'install-doc (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (man1 (string-append out "/share/man/man1"))) (install-file "man/mmc.1" man1))))))) (home-page "https://www.kernel.org/doc/html/latest/driver-api/mmc/mmc-tools.html") (synopsis "Configure MMC storage devices from userspace") (description "mmc-utils is a command-line tool for configuring and inspecting MMC storage devices from userspace.") (license license:gpl2)))) (define-public bmaptools (package (name "bmaptools") (version "3.6") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/intel/bmap-tools") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "01xzrv5nvd2nvj91lz4x9s91y9825j9pj96z0ap6yvy3w2dgvkkl")))) (build-system python-build-system) (arguments '(#:phases (modify-phases %standard-phases (replace 'check (lambda _ ;; XXX: Remove failing test. (invoke "nosetests" "-v" "--exclude" "test_bmap_helpers")))))) (native-inputs (list python-mock python-nose)) (propagated-inputs (list python-six)) (home-page "https://github.com/intel/bmap-tools") (synopsis "Create block map for a file or copy a file using block map") (description "Bmaptool is a tool for creating the block map (bmap) for a file and copying files using the block map. The idea is that large files, like raw system image files, can be copied or flashed a lot faster and more reliably with @code{bmaptool} than with traditional tools, like @code{dd} or @code{cp}.") (license license:gpl2))) (define-public duc (package (name "duc") (version "1.4.5") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/zevv/duc") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "0sglcn38rgn6y3m5ahngizyn3x2rzhqjphs7g0ppnlinkz56rcv4")))) (build-system gnu-build-system) (arguments `(#:phases (modify-phases %standard-phases (add-after 'unpack 'patch (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out"))) (substitute* "src/duc/cmd-ui.c" (("ncursesw/ncurses.h") "ncurses.h")) (substitute* "examples/index.cgi" (("/usr/local/bin/duc") (string-append out "/bin/duc")))))) (add-after 'install 'install-examples (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (doc (string-append out "/share/doc/" ,name "-" ,version))) (copy-recursively "examples" (string-append doc "/examples"))))) (replace 'check (lambda* (#:key tests? #:allow-other-keys) (substitute* "test.sh" ;; Keep the test logs where --keep-failed can see them. (("^(DUC_TEST_DIR=).*" _ assign) (format #f "~a~a/test-directory~%" assign (getcwd))) ;; XXX ‘actual size’ differed on my system (a consistent 348160 ;; bytes where the tests expect 540672). However, the ‘apparent ;; size’ matches, as does the actual test output. Good enough…? ((" [0-9]*B actual") " [0-9]*B actual")) (when tests? (invoke "./test.sh"))))))) ; no ‘check’ target (native-inputs (list autoconf automake libtool pkg-config)) (inputs (list cairo pango tokyocabinet ncurses)) (home-page "http://duc.zevv.nl") (synopsis "Library and suite of tools for inspecting disk usage") (description "Duc maintains a database of accumulated sizes of directories of the file system, and allows you to query this database with some tools, or create fancy graphs showing you where your bytes are. Duc comes with console utilities, ncurses and X11 user interfaces and a CGI wrapper for disk usage querying and visualisation.") (license license:lgpl3+))) (define-public qdirstat (package (name "qdirstat") (version "1.8.1") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/shundhammer/qdirstat") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "04vpdlwk01kgmc4r5rnrmrgd4sf2kfh1rjzb2rjkfxdd4pbghsy9")))) (arguments `(#:phases (modify-phases %standard-phases (replace 'configure (lambda* (#:key outputs #:allow-other-keys) (system* "qmake" (string-append "INSTALL_PREFIX=" (assoc-ref outputs "out"))))) (add-after 'install 'wrap (lambda* (#:key inputs outputs #:allow-other-keys) (wrap-program (string-append (assoc-ref outputs "out") "/bin/qdirstat-cache-writer") `("PERL5LIB" ":" prefix (,(string-append (assoc-ref inputs "perl-uri-escape") "/lib/perl5/site_perl"))))))))) (build-system gnu-build-system) (inputs (list bash-minimal perl perl-uri-escape qtbase-5 zlib)) (synopsis "Storage utilisation visualization tool") (description "QDirStat is a graphical application to show where your disk space has gone and to help you to clean it up.") (home-page "https://github.com/shundhammer/qdirstat") (license license:gpl2)))