about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/filesystems
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/filesystems')
-rw-r--r--nixpkgs/pkgs/tools/filesystems/9pfs/default.nix32
-rw-r--r--nixpkgs/pkgs/tools/filesystems/aefs/default.nix42
-rw-r--r--nixpkgs/pkgs/tools/filesystems/afpfs-ng/default.nix30
-rw-r--r--nixpkgs/pkgs/tools/filesystems/afsctool/default.nix33
-rw-r--r--nixpkgs/pkgs/tools/filesystems/android-file-transfer/darwin-dont-vendor-dependencies.patch21
-rw-r--r--nixpkgs/pkgs/tools/filesystems/android-file-transfer/default.nix41
-rw-r--r--nixpkgs/pkgs/tools/filesystems/apfs-fuse/default.nix44
-rw-r--r--nixpkgs/pkgs/tools/filesystems/apfsprogs/default.nix45
-rw-r--r--nixpkgs/pkgs/tools/filesystems/archivemount/default.nix20
-rw-r--r--nixpkgs/pkgs/tools/filesystems/avfs/default.nix26
-rw-r--r--nixpkgs/pkgs/tools/filesystems/bashmount/default.nix37
-rw-r--r--nixpkgs/pkgs/tools/filesystems/bcache-tools/bcache-udev-modern.patch52
-rw-r--r--nixpkgs/pkgs/tools/filesystems/bcache-tools/default.nix63
-rw-r--r--nixpkgs/pkgs/tools/filesystems/bcache-tools/fix-static.patch22
-rw-r--r--nixpkgs/pkgs/tools/filesystems/bcachefs-tools/Cargo.lock998
-rw-r--r--nixpkgs/pkgs/tools/filesystems/bcachefs-tools/default.nix106
-rwxr-xr-xnixpkgs/pkgs/tools/filesystems/bees/bees-service-wrapper227
-rw-r--r--nixpkgs/pkgs/tools/filesystems/bees/default.nix82
-rw-r--r--nixpkgs/pkgs/tools/filesystems/bindfs/default.nix36
-rw-r--r--nixpkgs/pkgs/tools/filesystems/blobfuse/default.nix32
-rw-r--r--nixpkgs/pkgs/tools/filesystems/blobfuse/install-adls.patch14
-rw-r--r--nixpkgs/pkgs/tools/filesystems/bonnie/default.nix22
-rw-r--r--nixpkgs/pkgs/tools/filesystems/boxfs/default.nix63
-rw-r--r--nixpkgs/pkgs/tools/filesystems/boxfs/work-around-API-borkage.patch15
-rw-r--r--nixpkgs/pkgs/tools/filesystems/btrfs-heatmap/default.nix42
-rw-r--r--nixpkgs/pkgs/tools/filesystems/btrfs-progs/default.nix72
-rw-r--r--nixpkgs/pkgs/tools/filesystems/btrfs-snap/default.nix32
-rw-r--r--nixpkgs/pkgs/tools/filesystems/catcli/default.nix40
-rw-r--r--nixpkgs/pkgs/tools/filesystems/ceph-csi/default.nix33
-rw-r--r--nixpkgs/pkgs/tools/filesystems/ceph/default.nix393
-rw-r--r--nixpkgs/pkgs/tools/filesystems/chunkfs/default.nix30
-rw-r--r--nixpkgs/pkgs/tools/filesystems/ciopfs/default.nix23
-rw-r--r--nixpkgs/pkgs/tools/filesystems/convoy/default.nix26
-rw-r--r--nixpkgs/pkgs/tools/filesystems/cpcfs/default.nix41
-rw-r--r--nixpkgs/pkgs/tools/filesystems/cryfs/default.nix81
-rw-r--r--nixpkgs/pkgs/tools/filesystems/curlftpfs/default.nix42
-rw-r--r--nixpkgs/pkgs/tools/filesystems/curlftpfs/fix-rpl_malloc.patch13
-rw-r--r--nixpkgs/pkgs/tools/filesystems/curlftpfs/suse-bug-580609.patch10
-rw-r--r--nixpkgs/pkgs/tools/filesystems/curlftpfs/suse-bug-955687.patch11
-rw-r--r--nixpkgs/pkgs/tools/filesystems/darling-dmg/default.nix30
-rw-r--r--nixpkgs/pkgs/tools/filesystems/davfs2/0001-umount_davfs-substitute-ps-command.patch25
-rw-r--r--nixpkgs/pkgs/tools/filesystems/davfs2/0002-Make-sure-that-the-setuid-wrapped-umount-is-invoked.patch26
-rw-r--r--nixpkgs/pkgs/tools/filesystems/davfs2/default.nix62
-rw-r--r--nixpkgs/pkgs/tools/filesystems/davfs2/disable-suid.patch9
-rw-r--r--nixpkgs/pkgs/tools/filesystems/davfs2/fix-sysconfdir.patch30
-rw-r--r--nixpkgs/pkgs/tools/filesystems/davfs2/isdir.patch30
-rw-r--r--nixpkgs/pkgs/tools/filesystems/dduper/default.nix50
-rw-r--r--nixpkgs/pkgs/tools/filesystems/disk-inventory-x/default.nix35
-rw-r--r--nixpkgs/pkgs/tools/filesystems/dislocker/default.nix45
-rw-r--r--nixpkgs/pkgs/tools/filesystems/disorderfs/default.nix24
-rw-r--r--nixpkgs/pkgs/tools/filesystems/djmount/default.nix35
-rw-r--r--nixpkgs/pkgs/tools/filesystems/dosfstools/default.nix54
-rw-r--r--nixpkgs/pkgs/tools/filesystems/duff/default.nix40
-rw-r--r--nixpkgs/pkgs/tools/filesystems/dupe-krill/Cargo.lock339
-rw-r--r--nixpkgs/pkgs/tools/filesystems/dupe-krill/default.nix25
-rw-r--r--nixpkgs/pkgs/tools/filesystems/duperemove/default.nix62
-rw-r--r--nixpkgs/pkgs/tools/filesystems/dwarfs/default.nix101
-rw-r--r--nixpkgs/pkgs/tools/filesystems/dwarfs/version_info.patch58
-rw-r--r--nixpkgs/pkgs/tools/filesystems/dysk/default.nix36
-rw-r--r--nixpkgs/pkgs/tools/filesystems/e2fsprogs/default.nix95
-rw-r--r--nixpkgs/pkgs/tools/filesystems/e2tools/default.nix26
-rw-r--r--nixpkgs/pkgs/tools/filesystems/eiciel/default.nix56
-rw-r--r--nixpkgs/pkgs/tools/filesystems/encfs/default.nix32
-rw-r--r--nixpkgs/pkgs/tools/filesystems/envfs/default.nix28
-rw-r--r--nixpkgs/pkgs/tools/filesystems/erofs-utils/default.nix35
-rw-r--r--nixpkgs/pkgs/tools/filesystems/exfat/default.nix24
-rw-r--r--nixpkgs/pkgs/tools/filesystems/exfatprogs/default.nix23
-rw-r--r--nixpkgs/pkgs/tools/filesystems/ext4magic/default.nix40
-rw-r--r--nixpkgs/pkgs/tools/filesystems/ext4magic/glibc-fix.patch12
-rw-r--r--nixpkgs/pkgs/tools/filesystems/extundelete/default.nix29
-rw-r--r--nixpkgs/pkgs/tools/filesystems/f2fs-tools/default.nix25
-rw-r--r--nixpkgs/pkgs/tools/filesystems/f2fs-tools/f2fs-tools-cross-fix.patch29
-rw-r--r--nixpkgs/pkgs/tools/filesystems/f3/default.nix57
-rw-r--r--nixpkgs/pkgs/tools/filesystems/fatresize/default.nix26
-rw-r--r--nixpkgs/pkgs/tools/filesystems/fatsort/default.nix43
-rw-r--r--nixpkgs/pkgs/tools/filesystems/file-rename/default.nix30
-rw-r--r--nixpkgs/pkgs/tools/filesystems/fuse-7z-ng/default.nix48
-rw-r--r--nixpkgs/pkgs/tools/filesystems/fuse-7z-ng/no-pthread.patch11
-rw-r--r--nixpkgs/pkgs/tools/filesystems/fuse-7z-ng/zero-init-fuse-operations.patch13
-rw-r--r--nixpkgs/pkgs/tools/filesystems/fuse-archive/default.nix44
-rw-r--r--nixpkgs/pkgs/tools/filesystems/fuse-overlayfs/default.nix31
-rw-r--r--nixpkgs/pkgs/tools/filesystems/fuseiso/default.nix55
-rw-r--r--nixpkgs/pkgs/tools/filesystems/fwanalyzer/default.nix39
-rw-r--r--nixpkgs/pkgs/tools/filesystems/garage/default.nix108
-rw-r--r--nixpkgs/pkgs/tools/filesystems/gcsfuse/default.nix47
-rw-r--r--nixpkgs/pkgs/tools/filesystems/genext2fs/default.nix35
-rw-r--r--nixpkgs/pkgs/tools/filesystems/genimage/default.nix31
-rw-r--r--nixpkgs/pkgs/tools/filesystems/genromfs/default.nix25
-rw-r--r--nixpkgs/pkgs/tools/filesystems/gfs2-utils/default.nix46
-rw-r--r--nixpkgs/pkgs/tools/filesystems/gitfs/default.nix43
-rw-r--r--nixpkgs/pkgs/tools/filesystems/glusterfs/default.nix207
-rw-r--r--nixpkgs/pkgs/tools/filesystems/glusterfs/ssl_cert_path.patch23
-rw-r--r--nixpkgs/pkgs/tools/filesystems/go-mtpfs/default.nix34
-rw-r--r--nixpkgs/pkgs/tools/filesystems/gocryptfs/default.nix68
-rw-r--r--nixpkgs/pkgs/tools/filesystems/goofys/default.nix36
-rw-r--r--nixpkgs/pkgs/tools/filesystems/gpart/default.nix33
-rw-r--r--nixpkgs/pkgs/tools/filesystems/grive2/default.nix46
-rw-r--r--nixpkgs/pkgs/tools/filesystems/hfsprogs/default.nix58
-rw-r--r--nixpkgs/pkgs/tools/filesystems/httm/Cargo.lock1332
-rw-r--r--nixpkgs/pkgs/tools/filesystems/httm/default.nix41
-rw-r--r--nixpkgs/pkgs/tools/filesystems/httpdirfs/default.nix26
-rw-r--r--nixpkgs/pkgs/tools/filesystems/httpfs/default.nix37
-rw-r--r--nixpkgs/pkgs/tools/filesystems/hubicfuse/default.nix44
-rw-r--r--nixpkgs/pkgs/tools/filesystems/idsk/default.nix35
-rw-r--r--nixpkgs/pkgs/tools/filesystems/ifuse/default.nix46
-rw-r--r--nixpkgs/pkgs/tools/filesystems/ioztat/default.nix58
-rw-r--r--nixpkgs/pkgs/tools/filesystems/irods/common.nix57
-rw-r--r--nixpkgs/pkgs/tools/filesystems/irods/default.nix89
-rw-r--r--nixpkgs/pkgs/tools/filesystems/jefferson/default.nix41
-rw-r--r--nixpkgs/pkgs/tools/filesystems/jfsutils/ar-fix.patch10
-rw-r--r--nixpkgs/pkgs/tools/filesystems/jfsutils/default.nix54
-rw-r--r--nixpkgs/pkgs/tools/filesystems/jfsutils/hardening-format.patch37
-rw-r--r--nixpkgs/pkgs/tools/filesystems/jfsutils/types.patch12
-rw-r--r--nixpkgs/pkgs/tools/filesystems/jmtpfs/default.nix32
-rw-r--r--nixpkgs/pkgs/tools/filesystems/juicefs/default.nix40
-rw-r--r--nixpkgs/pkgs/tools/filesystems/kdiskmark/default.nix54
-rw-r--r--nixpkgs/pkgs/tools/filesystems/kio-fuse/default.nix31
-rw-r--r--nixpkgs/pkgs/tools/filesystems/littlefs-fuse/default.nix26
-rw-r--r--nixpkgs/pkgs/tools/filesystems/lizardfs/default.nix50
-rw-r--r--nixpkgs/pkgs/tools/filesystems/mergerfs/default.nix41
-rw-r--r--nixpkgs/pkgs/tools/filesystems/mergerfs/tools.nix36
-rw-r--r--nixpkgs/pkgs/tools/filesystems/mhddfs/default.nix35
-rw-r--r--nixpkgs/pkgs/tools/filesystems/mhddfs/fix-format-security-error.patch12
-rw-r--r--nixpkgs/pkgs/tools/filesystems/mkspiffs/default.nix32
-rw-r--r--nixpkgs/pkgs/tools/filesystems/mkspiffs/presets.nix20
-rw-r--r--nixpkgs/pkgs/tools/filesystems/moosefs/default.nix57
-rw-r--r--nixpkgs/pkgs/tools/filesystems/mount-zip/default.nix32
-rw-r--r--nixpkgs/pkgs/tools/filesystems/mountain-duck/default.nix35
-rw-r--r--nixpkgs/pkgs/tools/filesystems/mp3fs/default.nix50
-rw-r--r--nixpkgs/pkgs/tools/filesystems/mtdutils/default.nix45
-rw-r--r--nixpkgs/pkgs/tools/filesystems/mtools/UNUSED-darwin.patch11
-rw-r--r--nixpkgs/pkgs/tools/filesystems/mtools/default.nix31
-rwxr-xr-xnixpkgs/pkgs/tools/filesystems/mtools/update.sh6
-rw-r--r--nixpkgs/pkgs/tools/filesystems/mtpfs/default.nix23
-rw-r--r--nixpkgs/pkgs/tools/filesystems/netatalk/000-no-suid.patch11
-rw-r--r--nixpkgs/pkgs/tools/filesystems/netatalk/001-omit-localstatedir-creation.patch19
-rw-r--r--nixpkgs/pkgs/tools/filesystems/netatalk/default.nix73
-rw-r--r--nixpkgs/pkgs/tools/filesystems/nilfs-utils/default.nix51
-rw-r--r--nixpkgs/pkgs/tools/filesystems/ntfs-3g/autoconf-sbin-helpers.patch98
-rw-r--r--nixpkgs/pkgs/tools/filesystems/ntfs-3g/consistent-sbindir-usage.patch48
-rw-r--r--nixpkgs/pkgs/tools/filesystems/ntfs-3g/default.nix65
-rw-r--r--nixpkgs/pkgs/tools/filesystems/orangefs/default.nix70
-rw-r--r--nixpkgs/pkgs/tools/filesystems/rar2fs/default.nix40
-rw-r--r--nixpkgs/pkgs/tools/filesystems/rdfind/default.nix29
-rw-r--r--nixpkgs/pkgs/tools/filesystems/reiser4progs/default.nix37
-rw-r--r--nixpkgs/pkgs/tools/filesystems/reiserfsprogs/default.nix24
-rw-r--r--nixpkgs/pkgs/tools/filesystems/rmfuse/default.nix49
-rw-r--r--nixpkgs/pkgs/tools/filesystems/rmount/default.nix32
-rw-r--r--nixpkgs/pkgs/tools/filesystems/rnm/default.nix33
-rw-r--r--nixpkgs/pkgs/tools/filesystems/romdirfs/default.nix24
-rw-r--r--nixpkgs/pkgs/tools/filesystems/s3backer/default.nix37
-rw-r--r--nixpkgs/pkgs/tools/filesystems/s3backer/fix-darwin-builds.patch25
-rw-r--r--nixpkgs/pkgs/tools/filesystems/s3fs/default.nix33
-rw-r--r--nixpkgs/pkgs/tools/filesystems/sandboxfs/default.nix34
-rw-r--r--nixpkgs/pkgs/tools/filesystems/sasquatch/default.nix75
-rw-r--r--nixpkgs/pkgs/tools/filesystems/sdat2img/default.nix26
-rw-r--r--nixpkgs/pkgs/tools/filesystems/securefs/default.nix39
-rw-r--r--nixpkgs/pkgs/tools/filesystems/sftpman/default.nix25
-rw-r--r--nixpkgs/pkgs/tools/filesystems/simg2img/default.nix25
-rw-r--r--nixpkgs/pkgs/tools/filesystems/simple-mtpfs/default.nix31
-rw-r--r--nixpkgs/pkgs/tools/filesystems/smbnetfs/default.nix22
-rw-r--r--nixpkgs/pkgs/tools/filesystems/snapraid/default.nix28
-rw-r--r--nixpkgs/pkgs/tools/filesystems/squashfs-tools-ng/default.nix25
-rw-r--r--nixpkgs/pkgs/tools/filesystems/squashfs/4k-align.patch100
-rw-r--r--nixpkgs/pkgs/tools/filesystems/squashfs/default.nix66
-rw-r--r--nixpkgs/pkgs/tools/filesystems/squashfuse/default.nix26
-rw-r--r--nixpkgs/pkgs/tools/filesystems/ssdfs-utils/default.nix47
-rwxr-xr-xnixpkgs/pkgs/tools/filesystems/ssdfs-utils/update.sh14
-rw-r--r--nixpkgs/pkgs/tools/filesystems/sshfs-fuse/common.nix62
-rw-r--r--nixpkgs/pkgs/tools/filesystems/sshfs-fuse/default.nix28
-rw-r--r--nixpkgs/pkgs/tools/filesystems/sshfs-fuse/fix-fuse-darwin-h.patch14
-rw-r--r--nixpkgs/pkgs/tools/filesystems/stratis-cli/default.nix48
-rw-r--r--nixpkgs/pkgs/tools/filesystems/stratisd/Cargo.lock1641
-rw-r--r--nixpkgs/pkgs/tools/filesystems/stratisd/default.nix123
-rw-r--r--nixpkgs/pkgs/tools/filesystems/stuffbin/default.nix25
-rw-r--r--nixpkgs/pkgs/tools/filesystems/supertag/cargo-lock-update-lexical-core.patch27
-rw-r--r--nixpkgs/pkgs/tools/filesystems/supertag/default.nix43
-rw-r--r--nixpkgs/pkgs/tools/filesystems/svnfs/default.nix44
-rw-r--r--nixpkgs/pkgs/tools/filesystems/tar2ext4/default.nix22
-rw-r--r--nixpkgs/pkgs/tools/filesystems/tmsu/default.nix42
-rw-r--r--nixpkgs/pkgs/tools/filesystems/tmsu/deps.nix39
-rw-r--r--nixpkgs/pkgs/tools/filesystems/u3-tool/default.nix21
-rw-r--r--nixpkgs/pkgs/tools/filesystems/ubi_reader/default.nix29
-rw-r--r--nixpkgs/pkgs/tools/filesystems/ubidump/default.nix41
-rw-r--r--nixpkgs/pkgs/tools/filesystems/udftools/default.nix42
-rw-r--r--nixpkgs/pkgs/tools/filesystems/unionfs-fuse/default.nix51
-rw-r--r--nixpkgs/pkgs/tools/filesystems/unionfs-fuse/prevent-kill-on-shutdown.patch14
-rw-r--r--nixpkgs/pkgs/tools/filesystems/upspin/default.nix26
-rw-r--r--nixpkgs/pkgs/tools/filesystems/vmfs-tools/default.nix39
-rw-r--r--nixpkgs/pkgs/tools/filesystems/wdfs/default.nix27
-rw-r--r--nixpkgs/pkgs/tools/filesystems/wiimms-iso-tools/default.nix48
-rw-r--r--nixpkgs/pkgs/tools/filesystems/wiimms-iso-tools/fix-paths.diff12
-rw-r--r--nixpkgs/pkgs/tools/filesystems/wipefreespace/default.nix53
-rw-r--r--nixpkgs/pkgs/tools/filesystems/xfsdump/default.nix59
-rw-r--r--nixpkgs/pkgs/tools/filesystems/xfsprogs/default.nix63
-rw-r--r--nixpkgs/pkgs/tools/filesystems/xtreemfs/default.nix113
-rw-r--r--nixpkgs/pkgs/tools/filesystems/yandex-disk/default.nix71
-rw-r--r--nixpkgs/pkgs/tools/filesystems/zerofree/default.nix33
-rw-r--r--nixpkgs/pkgs/tools/filesystems/zfstools/default.nix41
-rw-r--r--nixpkgs/pkgs/tools/filesystems/zkfuse/default.nix41
-rw-r--r--nixpkgs/pkgs/tools/filesystems/zpool-auto-expand-partitions/default.nix45
-rw-r--r--nixpkgs/pkgs/tools/filesystems/zpool-iostat-viz/default.nix41
202 files changed, 12866 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/filesystems/9pfs/default.nix b/nixpkgs/pkgs/tools/filesystems/9pfs/default.nix
new file mode 100644
index 000000000000..7b652bd68aa0
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/9pfs/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, fuse, gitUpdater }:
+
+stdenv.mkDerivation rec {
+  pname = "9pfs";
+  version = "0.3";
+
+  src = fetchFromGitHub {
+    owner = "ftrvxmtrx";
+    repo = "9pfs";
+    rev = version;
+    sha256 = "sha256-ywWG/H2ilt36mjlDSgIzYpardCFXpmbLiml6wy47XuA=";
+  };
+
+  postPatch = ''
+    substituteInPlace Makefile --replace "pkg-config" "$PKG_CONFIG"
+  '';
+
+  makeFlags = [ "BIN=$(out)/bin" "MAN=$(out)/share/man/man1" ];
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ fuse ];
+  enableParallelBuilding = true;
+
+  passthru.updateScript = gitUpdater { };
+
+  meta = {
+    homepage = "https://github.com/ftrvxmtrx/9pfs";
+    description = "FUSE-based client of the 9P network filesystem protocol";
+    maintainers = [ lib.maintainers.eelco ];
+    platforms = lib.platforms.unix;
+    license = with lib.licenses; [ lpl-102 bsd2 ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/aefs/default.nix b/nixpkgs/pkgs/tools/filesystems/aefs/default.nix
new file mode 100644
index 000000000000..5364b62c29cc
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/aefs/default.nix
@@ -0,0 +1,42 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, fuse
+, git
+}:
+
+stdenv.mkDerivation {
+  pname = "aefs";
+  version = "unstable-2015-05-06";
+
+  src = fetchFromGitHub {
+    owner = "edolstra";
+    repo = "aefs";
+    rev = "e7a9bf8cfa9166668fe1514cc1afd31fc4e10e9a";
+    hash = "sha256-a3YQWxJ7+bYhf1W1kdIykV8U1R4dcDZJ7K3NvNxbF0s=";
+  };
+
+  # autoconf's AC_CHECK_HEADERS and AC_CHECK_LIBS fail to detect libfuse on
+  # Darwin if FUSE_USE_VERSION isn't set at configure time.
+  #
+  # NOTE: Make sure the value of FUSE_USE_VERSION specified here matches the
+  # actual version used in the source code:
+  #
+  #     $ tar xf "$(nix-build -A aefs.src)"
+  #     $ grep -R FUSE_USE_VERSION
+  configureFlags = lib.optional stdenv.isDarwin "CPPFLAGS=-DFUSE_USE_VERSION=26";
+
+  nativeBuildInputs = [ autoreconfHook git ];
+
+  buildInputs = [ fuse ];
+
+  meta = with lib; {
+    homepage = "https://github.com/edolstra/aefs";
+    description = "A cryptographic filesystem implemented in userspace using FUSE";
+    maintainers = [ maintainers.eelco ];
+    license = licenses.gpl2Plus;
+    platforms = platforms.unix;
+    broken = stdenv.isDarwin;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/afpfs-ng/default.nix b/nixpkgs/pkgs/tools/filesystems/afpfs-ng/default.nix
new file mode 100644
index 000000000000..02dd1a7aafe0
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/afpfs-ng/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitHub, fuse, readline, libgcrypt, gmp }:
+
+stdenv.mkDerivation {
+  pname = "afpfs-ng";
+  version = "0.8.2";
+
+  src = fetchFromGitHub {
+    owner  = "simonvetter";
+    repo   = "afpfs-ng";
+    rev    = "f6e24eb73c9283732c3b5d9cb101a1e2e4fade3e";
+    sha256 = "125jx1rsqkiifcffyjb05b2s36rllckdgjaf1bay15k9gzhwwldz";
+  };
+
+  # Add workaround for -fno-common toolchains like upstream gcc-10 to
+  # avoid build failures like:
+  #   ld: afpcmd-cmdline_main.o:/build/source/cmdline/cmdline_afp.h:4: multiple definition of
+  #    `full_url'; afpcmd-cmdline_afp.o:/build/source/cmdline/cmdline_afp.c:27: first defined here
+  env.NIX_CFLAGS_COMPILE = "-fcommon";
+
+  buildInputs = [ fuse readline libgcrypt gmp ];
+
+  meta = with lib; {
+    homepage    = "https://github.com/simonvetter/afpfs-ng";
+    description = "A client implementation of the Apple Filing Protocol";
+    license     = licenses.gpl2;
+    maintainers = with maintainers; [ rnhmjoj ];
+    platforms   = platforms.linux;
+  };
+
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/afsctool/default.nix b/nixpkgs/pkgs/tools/filesystems/afsctool/default.nix
new file mode 100644
index 000000000000..303ec05bf834
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/afsctool/default.nix
@@ -0,0 +1,33 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, pkg-config
+, cmake
+, git
+, zlib
+, sparsehash
+, CoreServices
+}:
+
+stdenv.mkDerivation rec {
+  pname = "afsctool";
+  version = "1.7.0";
+
+  src = fetchFromGitHub {
+    owner = "RJVB";
+    repo = pname;
+    rev = version;
+    hash = "sha256-rqca7gpH46hk4MEPMHqYnteYJnGpLS/gu4XP7xWqDzo=";
+  };
+
+  nativeBuildInputs = [ pkg-config cmake git ];
+  buildInputs = [ zlib sparsehash CoreServices ];
+
+  meta = with lib; {
+    description = "Utility that allows end-users to leverage HFS+/APFS compression";
+    license = licenses.unfree;
+    maintainers = [ maintainers.viraptor ];
+    platforms = platforms.darwin;
+    homepage = "https://github.com/RJVB/afsctool";
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/android-file-transfer/darwin-dont-vendor-dependencies.patch b/nixpkgs/pkgs/tools/filesystems/android-file-transfer/darwin-dont-vendor-dependencies.patch
new file mode 100644
index 000000000000..6e0f38582cc7
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/android-file-transfer/darwin-dont-vendor-dependencies.patch
@@ -0,0 +1,21 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8b05ab0..81e31f5 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -236,16 +236,6 @@ endif()
+
+ if (''${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+ 	set(MACOSX_BUNDLE_LIBS)
+-	if (OPENSSL_FOUND)
+-		list(APPEND MACOSX_BUNDLE_LIBS /usr/local/opt/openssl@1.1/lib/libcrypto.1.1.dylib)
+-	endif()
+-	if (TAGLIB_FOUND)
+-		list(APPEND MACOSX_BUNDLE_LIBS /usr/local/opt/taglib/lib/libtag.1.dylib)
+-	endif()
+-	if (FUSE_FOUND)
+-		list(APPEND MACOSX_BUNDLE_LIBS /usr/local/lib/libosxfuse.2.dylib)
+-	endif()
+-
+ 	set(MACOSX_BUNDLE_LIBS_INSTALL)
+ 	set(MACOSX_BUNDLE_ROOT_DIR "''${CMAKE_INSTALL_PREFIX}/''${CMAKE_PROJECT_NAME}.app")
+ 	message(STATUS "bundle root dir: ''${MACOSX_BUNDLE_ROOT_DIR}")
diff --git a/nixpkgs/pkgs/tools/filesystems/android-file-transfer/default.nix b/nixpkgs/pkgs/tools/filesystems/android-file-transfer/default.nix
new file mode 100644
index 000000000000..b355b0eb6864
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/android-file-transfer/default.nix
@@ -0,0 +1,41 @@
+{ lib
+, stdenv
+, mkDerivation
+, fetchFromGitHub
+, cmake
+, fuse
+, readline
+, pkg-config
+, qtbase
+, qttools
+, wrapQtAppsHook }:
+
+mkDerivation rec {
+  pname = "android-file-transfer";
+  version = "4.2";
+
+  src = fetchFromGitHub {
+    owner = "whoozle";
+    repo = "android-file-transfer-linux";
+    rev = "v${version}";
+    sha256 = "125rq8ji83nw6chfw43i0h9c38hjqh1qjibb0gnf9wrigar9zc8b";
+  };
+
+  patches = [ ./darwin-dont-vendor-dependencies.patch ];
+
+  nativeBuildInputs = [ cmake readline pkg-config wrapQtAppsHook ];
+  buildInputs = [ fuse qtbase qttools ];
+
+  postInstall = lib.optionalString stdenv.isDarwin ''
+    mkdir $out/Applications
+    mv $out/*.app $out/Applications
+  '';
+
+  meta = with lib; {
+    description = "Reliable MTP client with minimalistic UI";
+    homepage = "https://whoozle.github.io/android-file-transfer-linux/";
+    license = licenses.lgpl21Plus;
+    maintainers = [ maintainers.xaverdh ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/apfs-fuse/default.nix b/nixpkgs/pkgs/tools/filesystems/apfs-fuse/default.nix
new file mode 100644
index 000000000000..0beffca1a54e
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/apfs-fuse/default.nix
@@ -0,0 +1,44 @@
+{ lib, stdenv, fetchFromGitHub, fuse, fuse3, bzip2, zlib, attr, cmake }:
+
+stdenv.mkDerivation {
+  pname = "apfs-fuse-unstable";
+  version = "2023-01-04";
+
+  src = fetchFromGitHub {
+    owner  = "sgan81";
+    repo   = "apfs-fuse";
+    rev    = "1f041d7af5df5423832e54e9f358fd9234773fcc";
+    hash = "sha256-EmhCvIwyVJvib/ZHzCsULh8bOjhzKRu47LojX+L40qQ=";
+    fetchSubmodules = true;
+  };
+
+  postPatch = lib.optionalString stdenv.isDarwin ''
+    substituteInPlace CMakeLists.txt \
+      --replace "/usr/local/lib/libosxfuse.dylib" "fuse"
+  '';
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [
+    (if stdenv.isDarwin then fuse else fuse3)
+    bzip2
+    zlib
+  ] ++ lib.optional stdenv.isLinux attr;
+
+  cmakeFlags = lib.optional stdenv.isDarwin "-DUSE_FUSE3=OFF";
+
+  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-DUSE_FUSE2";
+
+  postFixup = ''
+    ln -s $out/bin/apfs-fuse $out/bin/mount.fuse.apfs-fuse
+  '';
+
+  meta = with lib; {
+    homepage    = "https://github.com/sgan81/apfs-fuse";
+    description = "FUSE driver for APFS (Apple File System)";
+    license     = licenses.gpl2Plus;
+    maintainers = with maintainers; [ ealasu ];
+    platforms   = platforms.unix;
+  };
+
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/apfsprogs/default.nix b/nixpkgs/pkgs/tools/filesystems/apfsprogs/default.nix
new file mode 100644
index 000000000000..015bb0b88d1b
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/apfsprogs/default.nix
@@ -0,0 +1,45 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, nixosTests
+}:
+
+stdenv.mkDerivation {
+  pname = "apfsprogs";
+  version = "unstable-2023-06-06";
+
+  src = fetchFromGitHub {
+    owner = "linux-apfs";
+    repo = "apfsprogs";
+    rev = "91827679dfb1d6f5719fbe22fa67e89c17adb133";
+    hash = "sha256-gF7bOozAGGpuVP23mnPW81qH2gnVUdT9cxukzGJ+ydI=";
+  };
+
+  buildPhase = ''
+    runHook preBuild
+    make -C apfs-snap $makeFlags
+    make -C apfsck $makeFlags
+    make -C mkapfs $makeFlags
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+    make -C apfs-snap install DESTDIR="$out" $installFlags
+    make -C apfsck install DESTDIR="$out" $installFlags
+    make -C mkapfs install DESTDIR="$out" $installFlags
+    runHook postInstall
+  '';
+
+  passthru.tests = {
+    apfs = nixosTests.apfs;
+  };
+
+  meta = with lib; {
+    description = "Experimental APFS tools for linux";
+    homepage = "https://github.com/linux-apfs/apfsprogs";
+    license = licenses.gpl2Only;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ Luflosi ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/archivemount/default.nix b/nixpkgs/pkgs/tools/filesystems/archivemount/default.nix
new file mode 100644
index 000000000000..22e41611aef8
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/archivemount/default.nix
@@ -0,0 +1,20 @@
+{ lib, stdenv, fetchurl, pkg-config, fuse, libarchive }:
+
+stdenv.mkDerivation rec {
+  pname = "archivemount";
+  version = "0.9.1";
+
+  src = fetchurl {
+    url = "https://www.cybernoia.de/software/archivemount/archivemount-${version}.tar.gz";
+    sha256 = "1cy5b6qril9c3ry6fv7ir87s8iyy5vxxmbyx90dm86fbra0vjaf5";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ fuse libarchive ];
+
+  meta = {
+    description = "Gateway between FUSE and libarchive: allows mounting of cpio, .tar.gz, .tar.bz2 archives";
+    license = lib.licenses.gpl2;
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/avfs/default.nix b/nixpkgs/pkgs/tools/filesystems/avfs/default.nix
new file mode 100644
index 000000000000..a59c2695c20a
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/avfs/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchurl, pkg-config, fuse, xz }:
+
+stdenv.mkDerivation rec {
+  pname = "avfs";
+  version = "1.1.5";
+  src = fetchurl {
+    url = "mirror://sourceforge/avf/${version}/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-rZ87ZBBNYAmgWMcPZwiPeZMJv4UZsUsVSvrSJqRScs8=";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ fuse xz ];
+
+  configureFlags = [
+    "--enable-library"
+    "--enable-fuse"
+  ];
+
+  meta = {
+    homepage = "https://avf.sourceforge.net/";
+    description = "Virtual filesystem that allows browsing of compressed files";
+    platforms = lib.platforms.unix;
+    license = lib.licenses.gpl2Only;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/bashmount/default.nix b/nixpkgs/pkgs/tools/filesystems/bashmount/default.nix
new file mode 100644
index 000000000000..ef7bfd492e37
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/bashmount/default.nix
@@ -0,0 +1,37 @@
+{lib, stdenv, fetchFromGitHub}:
+
+stdenv.mkDerivation rec {
+  pname = "bashmount";
+  version = "4.3.2";
+
+  src = fetchFromGitHub {
+    owner = "jamielinux";
+    repo = "bashmount";
+    rev = version;
+    sha256 = "1irw47s6i1qwxd20cymzlfw5sv579cw877l27j3p66qfhgadwxrl";
+  };
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp bashmount $out/bin
+
+    mkdir -p $out/etc
+    cp bashmount.conf $out/etc
+
+    mkdir -p $out/share/man/man1
+    gzip -c -9 bashmount.1 > bashmount.1.gz
+    cp bashmount.1.gz $out/share/man/man1
+
+    mkdir -p $out/share/doc/bashmount
+    cp COPYING $out/share/doc/bashmount
+    cp NEWS    $out/share/doc/bashmount
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/jamielinux/bashmount";
+    description = "A menu-driven bash script for the management of removable media with udisks";
+    maintainers = [ maintainers.koral ];
+    license = licenses.gpl2;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/bcache-tools/bcache-udev-modern.patch b/nixpkgs/pkgs/tools/filesystems/bcache-tools/bcache-udev-modern.patch
new file mode 100644
index 000000000000..c6cf79785b73
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/bcache-tools/bcache-udev-modern.patch
@@ -0,0 +1,52 @@
+This patch does two things:
+1) Drops probe-bcache, so now new util-linux detecting functionality is used.
+2) Drops bcache-register, using kmod (built in udev) and moving registering device
+   into rule using 'sh'.
+This reduces things that need to be present in initrd, replacing them with already
+existing functionality and reducing overall initrd size.
+
+diff --git a/69-bcache.rules b/69-bcache.rules
+index 5d28e70..6a52893 100644
+--- a/69-bcache.rules
++++ b/69-bcache.rules
+@@ -10,15 +10,11 @@ KERNEL=="fd*|sr*", GOTO="bcache_end"
+ # It recognised bcache (util-linux 2.24+)
+ ENV{ID_FS_TYPE}=="bcache", GOTO="bcache_backing_found"
+ # It recognised something else; bail
+-ENV{ID_FS_TYPE}=="?*", GOTO="bcache_backing_end"
+-
+-# Backing devices: scan, symlink, register
+-IMPORT{program}="probe-bcache -o udev $tempnode"
+-ENV{ID_FS_TYPE}!="bcache", GOTO="bcache_backing_end"
+-ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
++GOTO="bcache_backing_end"
+ 
+ LABEL="bcache_backing_found"
+-RUN+="bcache-register $tempnode"
++RUN{builtin}+="kmod load bcache"
++RUN+="/bin/sh -c 'echo $tempnode > /sys/fs/bcache/register_quiet'"
+ LABEL="bcache_backing_end"
+ 
+ # Cached devices: symlink
+diff --git a/Makefile b/Makefile
+index 3f8d87b..15638a7 100644
+--- a/Makefile
++++ b/Makefile
+@@ -9,7 +9,7 @@ all: make-bcache probe-bcache bcache-super-show
+ 
+ install: make-bcache probe-bcache bcache-super-show
+ 	$(INSTALL) -m0755 make-bcache bcache-super-show	$(DESTDIR)${PREFIX}/sbin/
+-	$(INSTALL) -m0755 probe-bcache bcache-register		$(DESTDIR)$(UDEVLIBDIR)/
++#	$(INSTALL) -m0755 probe-bcache bcache-register		$(DESTDIR)$(UDEVLIBDIR)/
+ 	$(INSTALL) -m0644 69-bcache.rules	$(DESTDIR)$(UDEVLIBDIR)/rules.d/
+ 	$(INSTALL) -m0644 -- *.8 $(DESTDIR)${PREFIX}/share/man/man8/
+ 	$(INSTALL) -D -m0755 initramfs/hook	$(DESTDIR)/usr/share/initramfs-tools/hooks/bcache
+diff --git a/bcache-register b/bcache-register
+index 9b592bc..75b4faf 100755
+--- a/bcache-register
++++ b/bcache-register
+@@ -1,4 +1,3 @@
+ #!/bin/sh
+-/sbin/modprobe -qba bcache
+ test -f /sys/fs/bcache/register_quiet && echo "$1" > /sys/fs/bcache/register_quiet
+ 
diff --git a/nixpkgs/pkgs/tools/filesystems/bcache-tools/default.nix b/nixpkgs/pkgs/tools/filesystems/bcache-tools/default.nix
new file mode 100644
index 000000000000..f6dfdd84d8c4
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/bcache-tools/default.nix
@@ -0,0 +1,63 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, util-linux, bash }:
+
+stdenv.mkDerivation rec {
+  pname = "bcache-tools";
+  version = "1.0.7";
+
+  src = fetchFromGitHub {
+    owner = "g2p";
+    repo = "bcache-tools";
+    rev = "v${version}";
+    hash = "sha256-Ors2xXRrVTf8Cq3BYnSVSfJy/nyGjT5BGLSNpxOcHR4=";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ util-linux ];
+
+  # * Remove broken install rules (they ignore $PREFIX) for stuff we don't need
+  #   anyway (it's distro specific stuff).
+  # * Fixup absolute path to modprobe.
+  prePatch = ''
+    sed -e "/INSTALL.*initramfs\/hook/d" \
+        -e "/INSTALL.*initcpio\/install/d" \
+        -e "/INSTALL.*dracut\/module-setup.sh/d" \
+        -e "s/pkg-config/$PKG_CONFIG/" \
+        -i Makefile
+  '';
+
+  patches = [
+    ./bcache-udev-modern.patch
+    ./fix-static.patch
+  ];
+
+  makeFlags = [
+    "PREFIX=${placeholder "out"}"
+    "UDEVLIBDIR=${placeholder "out"}/lib/udev/"
+  ];
+
+  preBuild = ''
+    sed -e "s|/bin/sh|${bash}/bin/sh|" -i *.rules
+  '';
+
+  preInstall = ''
+    mkdir -p "$out/sbin" "$out/lib/udev/rules.d" "$out/share/man/man8"
+  '';
+
+  meta = with lib; {
+    description = "User-space tools required for bcache (Linux block layer cache)";
+    longDescription = ''
+      Bcache is a Linux kernel block layer cache. It allows one or more fast
+      disk drives such as flash-based solid state drives (SSDs) to act as a
+      cache for one or more slower hard disk drives.
+
+      This package contains the required user-space tools.
+
+      User documentation is in Documentation/bcache.txt in the Linux kernel
+      tree.
+    '';
+    homepage = "https://bcache.evilpiepirate.org/";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.bjornfor ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/bcache-tools/fix-static.patch b/nixpkgs/pkgs/tools/filesystems/bcache-tools/fix-static.patch
new file mode 100644
index 000000000000..e5dd2df5299d
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/bcache-tools/fix-static.patch
@@ -0,0 +1,22 @@
+diff --git a/bcache.c b/bcache.c
+index 8f37445..79806d8 100644
+--- a/bcache.c
++++ b/bcache.c
+@@ -26,7 +26,7 @@
+  * x^7 + x^4 + x + 1
+ */
+ 
+-static const uint64_t crc_table[256] = {
++const uint64_t crc_table[256] = {
+ 	0x0000000000000000ULL, 0x42F0E1EBA9EA3693ULL, 0x85E1C3D753D46D26ULL,
+ 	0xC711223CFA3E5BB5ULL, 0x493366450E42ECDFULL, 0x0BC387AEA7A8DA4CULL,
+ 	0xCCD2A5925D9681F9ULL, 0x8E224479F47CB76AULL, 0x9266CC8A1C85D9BEULL,
+@@ -115,7 +115,7 @@ static const uint64_t crc_table[256] = {
+ 	0x9AFCE626CE85B507ULL
+ };
+ 
+-inline uint64_t crc64(const void *_data, size_t len)
++uint64_t crc64(const void *_data, size_t len)
+ {
+ 	uint64_t crc = 0xFFFFFFFFFFFFFFFFULL;
+ 	const unsigned char *data = _data;
diff --git a/nixpkgs/pkgs/tools/filesystems/bcachefs-tools/Cargo.lock b/nixpkgs/pkgs/tools/filesystems/bcachefs-tools/Cargo.lock
new file mode 100644
index 000000000000..c4dd7f58c704
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/bcachefs-tools/Cargo.lock
@@ -0,0 +1,998 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "aho-corasick"
+version = "0.7.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "android_system_properties"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "anyhow"
+version = "1.0.68"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2cb2f989d18dd141ab8ae82f64d1a8cdd37e0840f73a406896cf5e99502fab61"
+
+[[package]]
+name = "atty"
+version = "0.2.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
+dependencies = [
+ "hermit-abi 0.1.19",
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "autocfg"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
+
+[[package]]
+name = "bcachefs-rust"
+version = "0.3.1"
+dependencies = [
+ "anyhow",
+ "atty",
+ "bch_bindgen",
+ "byteorder",
+ "chrono",
+ "clap",
+ "colored",
+ "either",
+ "errno",
+ "gag",
+ "getset",
+ "itertools",
+ "libc",
+ "log",
+ "parse-display",
+ "rpassword",
+ "udev",
+ "uuid",
+]
+
+[[package]]
+name = "bch_bindgen"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "bindgen",
+ "bitfield",
+ "bitflags",
+ "byteorder",
+ "chrono",
+ "colored",
+ "gag",
+ "libc",
+ "memoffset",
+ "paste",
+ "pkg-config",
+ "udev",
+ "uuid",
+]
+
+[[package]]
+name = "bindgen"
+version = "0.64.0"
+source = "git+https://evilpiepirate.org/git/rust-bindgen.git#f773267b090bf16b9e8375fcbdcd8ba5e88806a8"
+dependencies = [
+ "bitflags",
+ "cexpr",
+ "clang-sys",
+ "lazy_static",
+ "lazycell",
+ "peeking_take_while",
+ "proc-macro2",
+ "quote",
+ "regex",
+ "rustc-hash",
+ "shlex",
+ "syn",
+]
+
+[[package]]
+name = "bitfield"
+version = "0.14.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2d7e60934ceec538daadb9d8432424ed043a904d8e0243f3c6446bce549a46ac"
+
+[[package]]
+name = "bitflags"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
+
+[[package]]
+name = "bumpalo"
+version = "3.12.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535"
+
+[[package]]
+name = "byteorder"
+version = "1.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
+
+[[package]]
+name = "cc"
+version = "1.0.79"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f"
+
+[[package]]
+name = "cexpr"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"
+dependencies = [
+ "nom",
+]
+
+[[package]]
+name = "cfg-if"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+
+[[package]]
+name = "chrono"
+version = "0.4.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f"
+dependencies = [
+ "iana-time-zone",
+ "js-sys",
+ "num-integer",
+ "num-traits",
+ "time",
+ "wasm-bindgen",
+ "winapi",
+]
+
+[[package]]
+name = "clang-sys"
+version = "1.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "77ed9a53e5d4d9c573ae844bfac6872b159cb1d1585a83b29e7a64b7eef7332a"
+dependencies = [
+ "glob",
+ "libc",
+]
+
+[[package]]
+name = "clap"
+version = "4.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f13b9c79b5d1dd500d20ef541215a6423c75829ef43117e1b4d17fd8af0b5d76"
+dependencies = [
+ "bitflags",
+ "clap_derive",
+ "clap_lex",
+ "is-terminal",
+ "once_cell",
+ "strsim",
+ "termcolor",
+ "terminal_size",
+]
+
+[[package]]
+name = "clap_derive"
+version = "4.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "684a277d672e91966334af371f1a7b5833f9aa00b07c84e92fbce95e00208ce8"
+dependencies = [
+ "heck",
+ "proc-macro-error",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "clap_lex"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "783fe232adfca04f90f56201b26d79682d4cd2625e0bc7290b95123afe558ade"
+dependencies = [
+ "os_str_bytes",
+]
+
+[[package]]
+name = "codespan-reporting"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e"
+dependencies = [
+ "termcolor",
+ "unicode-width",
+]
+
+[[package]]
+name = "colored"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b3616f750b84d8f0de8a58bda93e08e2a81ad3f523089b05f1dffecab48c6cbd"
+dependencies = [
+ "atty",
+ "lazy_static",
+ "winapi",
+]
+
+[[package]]
+name = "core-foundation-sys"
+version = "0.8.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc"
+
+[[package]]
+name = "cxx"
+version = "1.0.89"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bc831ee6a32dd495436e317595e639a587aa9907bef96fe6e6abc290ab6204e9"
+dependencies = [
+ "cc",
+ "cxxbridge-flags",
+ "cxxbridge-macro",
+ "link-cplusplus",
+]
+
+[[package]]
+name = "cxx-build"
+version = "1.0.89"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "94331d54f1b1a8895cd81049f7eaaaef9d05a7dcb4d1fd08bf3ff0806246789d"
+dependencies = [
+ "cc",
+ "codespan-reporting",
+ "once_cell",
+ "proc-macro2",
+ "quote",
+ "scratch",
+ "syn",
+]
+
+[[package]]
+name = "cxxbridge-flags"
+version = "1.0.89"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "48dcd35ba14ca9b40d6e4b4b39961f23d835dbb8eed74565ded361d93e1feb8a"
+
+[[package]]
+name = "cxxbridge-macro"
+version = "1.0.89"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "81bbeb29798b407ccd82a3324ade1a7286e0d29851475990b612670f6f5124d2"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "either"
+version = "1.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91"
+
+[[package]]
+name = "errno"
+version = "0.2.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1"
+dependencies = [
+ "errno-dragonfly",
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "errno-dragonfly"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf"
+dependencies = [
+ "cc",
+ "libc",
+]
+
+[[package]]
+name = "fastrand"
+version = "1.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499"
+dependencies = [
+ "instant",
+]
+
+[[package]]
+name = "filedescriptor"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7199d965852c3bac31f779ef99cbb4537f80e952e2d6aa0ffeb30cce00f4f46e"
+dependencies = [
+ "libc",
+ "thiserror",
+ "winapi",
+]
+
+[[package]]
+name = "gag"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a713bee13966e9fbffdf7193af71d54a6b35a0bb34997cd6c9519ebeb5005972"
+dependencies = [
+ "filedescriptor",
+ "tempfile",
+]
+
+[[package]]
+name = "getset"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e45727250e75cc04ff2846a66397da8ef2b3db8e40e0cef4df67950a07621eb9"
+dependencies = [
+ "proc-macro-error",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "glob"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
+
+[[package]]
+name = "heck"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
+
+[[package]]
+name = "hermit-abi"
+version = "0.1.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "hermit-abi"
+version = "0.2.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "iana-time-zone"
+version = "0.1.53"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765"
+dependencies = [
+ "android_system_properties",
+ "core-foundation-sys",
+ "iana-time-zone-haiku",
+ "js-sys",
+ "wasm-bindgen",
+ "winapi",
+]
+
+[[package]]
+name = "iana-time-zone-haiku"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca"
+dependencies = [
+ "cxx",
+ "cxx-build",
+]
+
+[[package]]
+name = "instant"
+version = "0.1.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "io-lifetimes"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e7d6c6f8c91b4b9ed43484ad1a938e393caf35960fce7f82a040497207bd8e9e"
+dependencies = [
+ "libc",
+ "windows-sys",
+]
+
+[[package]]
+name = "is-terminal"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "28dfb6c8100ccc63462345b67d1bbc3679177c75ee4bf59bf29c8b1d110b8189"
+dependencies = [
+ "hermit-abi 0.2.6",
+ "io-lifetimes",
+ "rustix",
+ "windows-sys",
+]
+
+[[package]]
+name = "itertools"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b"
+dependencies = [
+ "either",
+]
+
+[[package]]
+name = "js-sys"
+version = "0.3.61"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730"
+dependencies = [
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "lazy_static"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
+
+[[package]]
+name = "lazycell"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
+
+[[package]]
+name = "libc"
+version = "0.2.139"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79"
+
+[[package]]
+name = "libudev-sys"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3c8469b4a23b962c1396b9b451dda50ef5b283e8dd309d69033475fa9b334324"
+dependencies = [
+ "libc",
+ "pkg-config",
+]
+
+[[package]]
+name = "link-cplusplus"
+version = "1.0.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5"
+dependencies = [
+ "cc",
+]
+
+[[package]]
+name = "linux-raw-sys"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4"
+
+[[package]]
+name = "log"
+version = "0.4.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "memchr"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
+
+[[package]]
+name = "memoffset"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "minimal-lexical"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
+
+[[package]]
+name = "nom"
+version = "7.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
+dependencies = [
+ "memchr",
+ "minimal-lexical",
+]
+
+[[package]]
+name = "num-integer"
+version = "0.1.45"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9"
+dependencies = [
+ "autocfg",
+ "num-traits",
+]
+
+[[package]]
+name = "num-traits"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "once_cell"
+version = "1.17.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66"
+
+[[package]]
+name = "os_str_bytes"
+version = "6.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee"
+
+[[package]]
+name = "parse-display"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bd87725635cbae7fe960f91f55a114ed104e637790317cc8d9197ea16b058010"
+dependencies = [
+ "lazy_static",
+ "parse-display-derive",
+ "regex",
+]
+
+[[package]]
+name = "parse-display-derive"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cc52b391380aa8550348736a356bf028f5469391d580533a566e97543f55e813"
+dependencies = [
+ "lazy_static",
+ "proc-macro2",
+ "quote",
+ "regex",
+ "regex-syntax",
+ "syn",
+]
+
+[[package]]
+name = "paste"
+version = "1.0.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d01a5bd0424d00070b0098dd17ebca6f961a959dead1dbcbbbc1d1cd8d3deeba"
+
+[[package]]
+name = "peeking_take_while"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
+
+[[package]]
+name = "pkg-config"
+version = "0.3.26"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160"
+
+[[package]]
+name = "proc-macro-error"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
+dependencies = [
+ "proc-macro-error-attr",
+ "proc-macro2",
+ "quote",
+ "syn",
+ "version_check",
+]
+
+[[package]]
+name = "proc-macro-error-attr"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "version_check",
+]
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.50"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "redox_syscall"
+version = "0.2.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
+dependencies = [
+ "bitflags",
+]
+
+[[package]]
+name = "regex"
+version = "1.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-syntax"
+version = "0.6.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848"
+
+[[package]]
+name = "remove_dir_all"
+version = "0.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "rpassword"
+version = "4.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "99371657d3c8e4d816fb6221db98fa408242b0b53bac08f8676a41f8554fe99f"
+dependencies = [
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "rustc-hash"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
+
+[[package]]
+name = "rustix"
+version = "0.36.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d4fdebc4b395b7fbb9ab11e462e20ed9051e7b16e42d24042c776eca0ac81b03"
+dependencies = [
+ "bitflags",
+ "errno",
+ "io-lifetimes",
+ "libc",
+ "linux-raw-sys",
+ "windows-sys",
+]
+
+[[package]]
+name = "scratch"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ddccb15bcce173023b3fedd9436f882a0739b8dfb45e4f6b6002bee5929f61b2"
+
+[[package]]
+name = "shlex"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3"
+
+[[package]]
+name = "strsim"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
+
+[[package]]
+name = "syn"
+version = "1.0.107"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "tempfile"
+version = "3.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4"
+dependencies = [
+ "cfg-if",
+ "fastrand",
+ "libc",
+ "redox_syscall",
+ "remove_dir_all",
+ "winapi",
+]
+
+[[package]]
+name = "termcolor"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6"
+dependencies = [
+ "winapi-util",
+]
+
+[[package]]
+name = "terminal_size"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cb20089a8ba2b69debd491f8d2d023761cbf196e999218c591fa1e7e15a21907"
+dependencies = [
+ "rustix",
+ "windows-sys",
+]
+
+[[package]]
+name = "thiserror"
+version = "1.0.38"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0"
+dependencies = [
+ "thiserror-impl",
+]
+
+[[package]]
+name = "thiserror-impl"
+version = "1.0.38"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "time"
+version = "0.1.45"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a"
+dependencies = [
+ "libc",
+ "wasi",
+ "winapi",
+]
+
+[[package]]
+name = "udev"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4ebdbbd670373442a12fe9ef7aeb53aec4147a5a27a00bbc3ab639f08f48191a"
+dependencies = [
+ "libc",
+ "libudev-sys",
+ "pkg-config",
+]
+
+[[package]]
+name = "unicode-ident"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc"
+
+[[package]]
+name = "unicode-width"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b"
+
+[[package]]
+name = "uuid"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1674845326ee10d37ca60470760d4288a6f80f304007d92e5c53bab78c9cfd79"
+
+[[package]]
+name = "version_check"
+version = "0.9.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
+
+[[package]]
+name = "wasi"
+version = "0.10.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
+
+[[package]]
+name = "wasm-bindgen"
+version = "0.2.84"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b"
+dependencies = [
+ "cfg-if",
+ "wasm-bindgen-macro",
+]
+
+[[package]]
+name = "wasm-bindgen-backend"
+version = "0.2.84"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9"
+dependencies = [
+ "bumpalo",
+ "log",
+ "once_cell",
+ "proc-macro2",
+ "quote",
+ "syn",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-macro"
+version = "0.2.84"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5"
+dependencies = [
+ "quote",
+ "wasm-bindgen-macro-support",
+]
+
+[[package]]
+name = "wasm-bindgen-macro-support"
+version = "0.2.84"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+ "wasm-bindgen-backend",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-shared"
+version = "0.2.84"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d"
+
+[[package]]
+name = "winapi"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
+dependencies = [
+ "winapi-i686-pc-windows-gnu",
+ "winapi-x86_64-pc-windows-gnu",
+]
+
+[[package]]
+name = "winapi-i686-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+
+[[package]]
+name = "winapi-util"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "winapi-x86_64-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+
+[[package]]
+name = "windows-sys"
+version = "0.42.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7"
+dependencies = [
+ "windows_aarch64_gnullvm",
+ "windows_aarch64_msvc",
+ "windows_i686_gnu",
+ "windows_i686_msvc",
+ "windows_x86_64_gnu",
+ "windows_x86_64_gnullvm",
+ "windows_x86_64_msvc",
+]
+
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.42.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608"
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.42.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.42.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.42.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.42.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45"
+
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.42.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.42.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd"
diff --git a/nixpkgs/pkgs/tools/filesystems/bcachefs-tools/default.nix b/nixpkgs/pkgs/tools/filesystems/bcachefs-tools/default.nix
new file mode 100644
index 000000000000..7df877f102f6
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/bcachefs-tools/default.nix
@@ -0,0 +1,106 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, pkg-config
+, libuuid
+, libsodium
+, keyutils
+, liburcu
+, zlib
+, libaio
+, zstd
+, lz4
+, attr
+, udev
+, valgrind
+, nixosTests
+, fuse3
+, cargo
+, rustc
+, coreutils
+, rustPlatform
+, makeWrapper
+, fuseSupport ? false
+}:
+let
+  version = "1.3.1";
+in
+stdenv.mkDerivation {
+  pname = "bcachefs-tools";
+  inherit version;
+
+  src = fetchFromGitHub {
+    owner = "koverstreet";
+    repo = "bcachefs-tools";
+    rev = "v${version}";
+    hash = "sha256-4TmH6YOW6ktISVA6RLo7JRl8/SnRzGMrdbyCr+mDkqY=";
+  };
+
+  # errors on fsck_err function. Maybe miss-detection?
+  NIX_CFLAGS_COMPILE = "-Wno-error=format-security";
+
+  nativeBuildInputs = [
+    pkg-config
+    cargo
+    rustc
+    rustPlatform.cargoSetupHook
+    rustPlatform.bindgenHook
+    makeWrapper
+  ];
+
+  cargoRoot = "rust-src";
+  cargoDeps = rustPlatform.importCargoLock {
+    lockFile = ./Cargo.lock;
+    outputHashes = {
+      "bindgen-0.64.0" = "sha256-GNG8as33HLRYJGYe0nw6qBzq86aHiGonyynEM7gaEE4=";
+    };
+  };
+
+  buildInputs = [
+    libaio
+    keyutils
+    lz4
+
+    libsodium
+    liburcu
+    libuuid
+    zstd
+    zlib
+    attr
+    udev
+  ] ++ lib.optional fuseSupport fuse3;
+
+  doCheck = false; # needs bcachefs module loaded on builder
+  checkFlags = [ "BCACHEFS_TEST_USE_VALGRIND=no" ];
+  nativeCheckInputs = [ valgrind ];
+
+  makeFlags = [
+    "PREFIX=${placeholder "out"}"
+    "VERSION=${version}"
+    "INITRAMFS_DIR=${placeholder "out"}/etc/initramfs-tools"
+  ];
+
+  preCheck = lib.optionalString fuseSupport ''
+    rm tests/test_fuse.py
+  '';
+
+  passthru.tests = {
+    smoke-test = nixosTests.bcachefs;
+    inherit (nixosTests.installer) bcachefsSimple bcachefsEncrypted bcachefsMulti;
+  };
+
+  postFixup = ''
+    wrapProgram $out/bin/mount.bcachefs \
+      --prefix PATH : ${lib.makeBinPath [ coreutils ]}
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Tool for managing bcachefs filesystems";
+    homepage = "https://bcachefs.org/";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ davidak Madouura ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/bees/bees-service-wrapper b/nixpkgs/pkgs/tools/filesystems/bees/bees-service-wrapper
new file mode 100755
index 000000000000..67c95e8f8031
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/bees/bees-service-wrapper
@@ -0,0 +1,227 @@
+#!@bash@/bin/bash
+PATH=@bash@/bin:@coreutils@/bin:@utillinux@/bin:@btrfsProgs@/bin:$PATH
+beesd_bin=@bees@/lib/bees/bees
+# PLEASE KEEP NIX-ISMS ABOVE THIS LINE TO EASE UPSTREAM MERGE
+#!/usr/bin/env bash
+
+shopt -s extglob
+
+# Upstream wrapper requires UUID to be used for configuration.
+
+# However, when declaratively describing a host, we may not know its UUID, and
+# shouldn't need to persist something that will differ between hosts built from
+# the same configuration template.
+
+# Thus, for using bees from NixOS, we have our own wrapper, which supports not
+# just UUID but any specification permitted by findmnt
+
+[[ $bees_debug ]] && { PS4=':${BASH_SOURCE##*/}:$LINENO+'; set -x; }
+
+usage() {
+  cat >&2 <<EOF
+Usage: ${BASH_SOURCE##*/} run|cleanup config-name|fsSpec [idxSizeMB=...] [verbosity=...] [workDir=...] [-- daemon-options...]
+
+  fsSpec should be in a format recognized by findmnt. Alternately,
+  "config-name" may refer to a file that exists in ${bees_config_dir:-/etc/bees}
+  with a .conf extension; if that file does not specify UUID, findmnt will be
+  used in addition.
+
+  Note that while config files may presently use shell arithmetic, use of this
+  functionality is not encouraged going forward: Setting ''idxSizeMB=4096'' is
+  preferred over ''DB_SIZE=$((1024*1024*1024*4))'' or ''DB_SIZE=$(( AL16M * 256 ))'',
+  although both of these are presently supported.
+
+  If fsSpec contains a /, it assumed to be a mount point to be looked up by
+  findmnt, not a config file name.
+
+  daemon-options are passed directly through to the daemon on startup, as
+  documented at https://github.com/Zygo/bees/blob/master/docs/options.md.
+EOF
+  exit 1
+}
+
+die() { echo "$*" >&2; exit 1; }
+
+allConfigNames=( blockdev fsSpec home idxSize idxSizeMB mntDir runDir status verbosity workDir )
+
+# Alternate names for configuration values; "bees_" will always be prepended
+declare -A altConfigNames=(
+  # from original bees wrapper
+  [BEESHOME]=home
+  [BEESSTATUS]=status
+  [MNT_DIR]=mntDir
+  [UUID]=uuid
+  [WORK_DIR]=runDir
+  [DB_SIZE]=idxSize
+)
+
+# legacy bees config files can be arbitrary shell scripts, so we need to actually evaluate them
+sandboxedConfigFileEval() {
+  bash_exe=$(type -P bash) || exit
+  PATH=/var/empty ENV='' BASH_ENV='' AL128K="$((128*1024))" AL16M="$((16*1024*1024))" "$bash_exe" -r ${bees_debug+-x} \
+    -c 'eval "$(</dev/stdin)" >&2; for var; do [[ ${!var} ]] && printf "%q=%s\\0" "$var" "${!var}"; done' \
+    "${!altConfigNames[@]}" "${allConfigNames[@]}" \
+    <"$1"
+}
+
+readConfigFileIfExists() {
+  local line
+  [[ -s $1 ]] || return 1
+  while IFS= read -r -d '' line; do
+    line=${line%%+([[:space:]])"#"*}
+    [[ $line ]] || continue
+    [[ $line = *=* ]] || {
+      printf 'WARNING: Config file line not recognized: %q\n' "$line" >&2
+      continue
+    }
+    set_option "$line"
+  done < <(sandboxedConfigFileEval "$1")
+}
+
+set_option() {
+  local k v
+  k="${1%%=*}" v="${1#*=}"
+  [[ ${altConfigNames[$k]} ]] && k=${altConfigNames[$k]}
+  printf -v "bees_$k" %s "$v"
+}
+
+uuid_re='^[[:xdigit:]]{8}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{12}$'
+
+# Shared code for setting configuration used by other operations.
+#
+# Reads from global associative array "opts" containing options passed in as
+# key=value pairs on the command line, looks for config-file overrides, and
+# sets individual global variables.
+_setup() {
+  declare fstype
+  bees_fsSpec=$1; shift
+
+  # Look for file-based configuration, additional to honoring configuration on the command line
+  bees_config_dir="${bees_config_dir:-/etc/bees}"
+  if [[ $bees_fsSpec =~ $uuid_re ]]; then
+    bees_uuid=$bees_fsSpec
+    # If our spec looks like a bare UUID, and no config file exists in the new
+    # format, fall back to legacy config file search mechanism (grep; ewww).
+    if ! readConfigFileIfExists "$bees_config_dir/UUID=$bees_fsSpec.conf"; then
+      # Legacy approach to finding a config file: Grep for a *.conf file
+      # containing the UUID within its text. Permitting spaces around the "="
+      # appears to be a bug, but is retained for compatibility with the
+      # original upstream script.
+      allConfFiles=( "$bees_config_dir"/*.conf )
+      if (( ${#allConfFiles[@]} )); then
+        # in read or readarray with -d '', the NUL terminating the empty string is used as delimiter character.
+        readarray -d '' -t matchingConfFiles < <(grep -E -l -Z "^[^#]*UUID[[:space:]]*=[[:space:]]*" "${allConfFiles[@]}")
+      else
+        matchingConfFiles=( )
+      fi
+      if (( ${#matchingConfFiles[@]} == 1 )); then
+        # Exactly one configuration file exists in our target directory with a reference to the UUID given.
+        bees_config_file=${matchingConfFiles[0]}
+        readConfigFileIfExists "$bees_config_file"
+        echo "NOTE: Please consider renaming $bees_config_file to $bees_config_dir/UUID=$bees_fsSpec" >&2
+        echo "      ...and passing UUID=$bees_fsSpec on startup." >&2
+      elif (( ${#matchingConfFiles[@]} > 1 )); then
+        # The legacy wrapper would silently use the first file and ignore
+        # others, but... no.
+        echo "ERROR: Passed a bare UUID, but multiple configuration files match it:" >&2
+        printf ' - %q\n' "${matchingConfFiles[@]}" >&2
+        die "Unable to continue."
+      fi
+    fi
+  else
+    # For a non-UUID fsSpec that is not a path, look only for a config file
+    # exactly matching its text.
+    #
+    # (Passing a mount point as a fsSpec is only supported with the new
+    # wrapper; all key=value pairs can be passed on the command line in this
+    # mode, so config file support is not needed).
+    [[ $bees_fsSpec = */* ]] || readConfigFileIfExists "$bees_config_dir/$bees_fsSpec.conf"
+  fi
+
+  [[ $bees_uuid ]] || {
+    # if bees_uuid is not in our .conf file, look it up with findmnt
+    for findmnt_mode in --kernel --mtab --fstab; do
+      read -r bees_uuid fstype < <(findmnt "$findmnt_mode" -n -o uuid,fstype "$bees_fsSpec") ||:
+      [[ $bees_uuid && $fstype ]] && break
+    done
+    [[ $bees_uuid ]] || die "Unable to identify a device matching $bees_fsSpec with findmnt"
+    [[ $fstype = btrfs ]] || die "Device type is $fstype, not btrfs"
+  }
+
+  [[ $bees_uuid = */* ]] || readConfigFileIfExists "$bees_config_dir/UUID=$bees_uuid.conf"
+
+  # Honor any values read from config files above; otherwise, set defaults.
+  bees_workDir="${bees_workDir:-.beeshome}"
+  bees_runDir="${bees_runDir:-/run/bees}"
+  bees_mntDir="${bees_mntDir:-$bees_runDir/mnt/$bees_uuid}"
+  bees_home="${bees_home:-$bees_mntDir/$bees_workDir}"
+  bees_status="${bees_status:-${bees_runDir}/$bees_uuid.status}"
+  bees_verbosity="${bees_verbosity:-6}"
+  bees_idxSizeMB="${bees_idxSizeMB:-1024}"
+  bees_idxSize=${bees_idxSize:-"$(( bees_idxSizeMB * 1024 * 1024 ))"}
+  bees_blockdev=${bees_blockdev:-"/dev/disk/by-uuid/$bees_uuid"}
+
+  [[ -b $bees_blockdev ]] || die "Block device $bees_blockdev missing"
+  (( bees_idxSize % (16 * 1024 * 1024) == 0 )) || die "DB size must be divisible by 16MB"
+}
+
+do_run() {
+  local db old_db_size
+
+  _setup "$1"; shift
+  mkdir -p -- "$bees_mntDir" || exit
+
+  # subvol id 5 is reserved for the root subvolume of a btrfs filesystem.
+  mountpoint -q "$bees_mntDir" || mount -osubvolid=5 -- "$bees_blockdev" "$bees_mntDir" || exit
+  if [[ -d $bees_home ]]; then
+    btrfs subvolume show "$bees_home" >/dev/null 2>&1 || die "$bees_home exists but is not a subvolume"
+  else
+    btrfs subvolume create "$bees_home" || exit
+    sync # workaround for Zygo/bees#93
+  fi
+  db=$bees_home/beeshash.dat
+  touch -- "$db"
+
+  old_db_size=$(stat -c %s -- "$db")
+  new_db_size=$bees_idxSize
+
+  if (( old_db_size != new_db_size )); then
+    rm -f -- "$bees_home"/beescrawl."$bees_uuid".dat
+    truncate -s "$new_db_size" -- "$db" || exit
+  fi
+  chmod 700 -- "$bees_home"
+
+  # BEESSTATUS and BEESHOME are the only variables handled by the legacy
+  # wrapper for which getenv() is called in C code.
+  BEESSTATUS=$bees_status BEESHOME=$bees_home exec "${beesd_bin:-/lib/bees/bees}" \
+    --verbose "$bees_verbosity" \
+    "$@" "$bees_mntDir" || exit
+}
+
+do_cleanup() {
+  _setup "$1"; shift
+  mountpoint -q "$bees_mntDir" && umount -l -- "$bees_mntDir" || exit
+}
+
+(( $# >= 2 )) || usage
+declare -f "do_$1" >/dev/null 2>&1 || usage
+mode=$1; shift # must be a do_* function; currently "run" or "cleanup"
+
+declare -a args=( "$1" ); shift  # pass first argument (config-name|fsSpec) through literally
+
+# parse other arguments as key=value pairs, or pass them through literally if they do not match that form.
+# similarly, any option after "--" will be passed through literally.
+while (( $# )); do
+  if [[ $1 = *=* ]]; then
+    set_option "$1"
+  elif [[ $1 = -- ]]; then
+    shift
+    args+=( "$@" )
+    break
+  else
+    args+=( "$1" )
+  fi
+  shift
+done
+
+"do_$mode" "${args[@]}"
diff --git a/nixpkgs/pkgs/tools/filesystems/bees/default.nix b/nixpkgs/pkgs/tools/filesystems/bees/default.nix
new file mode 100644
index 000000000000..fd1166e1a301
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/bees/default.nix
@@ -0,0 +1,82 @@
+{ lib
+, stdenv
+, runCommand
+, fetchFromGitHub
+, bash
+, btrfs-progs
+, coreutils
+, python3Packages
+, util-linux
+, nixosTests
+}:
+
+let
+
+  bees = stdenv.mkDerivation rec {
+    pname = "bees";
+    version = "0.9.3";
+
+    src = fetchFromGitHub {
+      owner = "Zygo";
+      repo = "bees";
+      rev = "v${version}";
+      sha256 = "sha256-krG8TzfOz3m7h3GfkBU+NJz7EdlXiWOOXY8bQRq9z4Q=";
+    };
+
+    buildInputs = [
+      btrfs-progs # for btrfs/ioctl.h
+      util-linux # for uuid.h
+    ];
+
+    nativeBuildInputs = [
+      python3Packages.markdown # documentation build
+    ];
+
+    preBuild = ''
+      git() { if [[ $1 = describe ]]; then echo ${version}; else command git "$@"; fi; }
+      export -f git
+    '';
+
+    postBuild = ''
+      unset -f git
+    '';
+
+    buildFlags = [
+      "ETC_PREFIX=/var/run/bees/configs"
+    ];
+
+    makeFlags = [
+      "SHELL=bash"
+      "PREFIX=$(out)"
+      "ETC_PREFIX=$(out)/etc"
+      "BEES_VERSION=${version}"
+      "SYSTEMD_SYSTEM_UNIT_DIR=$(out)/etc/systemd/system"
+    ];
+
+    meta = with lib; {
+      homepage = "https://github.com/Zygo/bees";
+      description = "Block-oriented BTRFS deduplication service";
+      longDescription = "Best-Effort Extent-Same: bees finds not just identical files, but also identical extents within files that differ";
+      license = licenses.gpl3;
+      platforms = platforms.linux;
+      maintainers = with maintainers; [ chaduffy ];
+    };
+  };
+
+in
+
+(runCommand "bees-service"
+  {
+    inherit bash bees coreutils;
+    utillinux = util-linux; # needs to be a valid shell variable name
+    btrfsProgs = btrfs-progs; # needs to be a valid shell variable name
+  } ''
+  mkdir -p -- "$out/bin"
+  substituteAll ${./bees-service-wrapper} "$out"/bin/bees-service-wrapper
+  chmod +x "$out"/bin/bees-service-wrapper
+  ln -s ${bees}/bin/beesd "$out"/bin/beesd
+'').overrideAttrs {
+  passthru.tests = {
+    smoke-test = nixosTests.bees;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/bindfs/default.nix b/nixpkgs/pkgs/tools/filesystems/bindfs/default.nix
new file mode 100644
index 000000000000..dfcf6aba9e08
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/bindfs/default.nix
@@ -0,0 +1,36 @@
+{ lib
+, stdenv
+, fetchurl
+, pkg-config
+, fuse
+, fuse3
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  version = "1.17.4";
+  pname = "bindfs";
+
+  src = fetchurl {
+    url = "https://bindfs.org/downloads/bindfs-${finalAttrs.version}.tar.gz";
+    hash = "sha256-b9Svm6LsK9tgPvjuoqnRLbLl/py+UrhkC0FXNKWfPcw=";
+  };
+
+  nativeBuildInputs = [
+    pkg-config
+  ];
+
+  buildInputs = if stdenv.isDarwin then [ fuse ] else [ fuse3 ];
+
+  postFixup = ''
+    ln -s $out/bin/bindfs $out/bin/mount.fuse.bindfs
+  '';
+
+  meta = {
+    changelog = "https://github.com/mpartel/bindfs/raw/${finalAttrs.version}/ChangeLog";
+    description = "A FUSE filesystem for mounting a directory to another location";
+    homepage = "https://bindfs.org";
+    license = lib.licenses.gpl2Only;
+    maintainers = with lib.maintainers; [ lovek323 lovesegfault ];
+    platforms = lib.platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/tools/filesystems/blobfuse/default.nix b/nixpkgs/pkgs/tools/filesystems/blobfuse/default.nix
new file mode 100644
index 000000000000..6fbd6b805570
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/blobfuse/default.nix
@@ -0,0 +1,32 @@
+{ lib, buildGoModule, fetchFromGitHub, fuse3, testers, blobfuse }:
+
+let
+  version = "2.1.0";
+  src = fetchFromGitHub {
+    owner = "Azure";
+    repo = "azure-storage-fuse";
+    rev = "blobfuse2-${version}";
+    sha256 = "sha256-+MnqIwLuR+YBTowgIQokV0kFzfYtMBdhd/+m9MOrF1Y=";
+  };
+in buildGoModule {
+  pname = "blobfuse";
+  inherit version src;
+
+  vendorHash = "sha256-WfVFV/6Owx51rHXyfMp7CRW7aQ3R5BFyfHronQ58Gik=";
+
+  buildInputs = [ fuse3 ];
+
+  # Many tests depend on network or needs to be configured to pass. See the link below for a starting point
+  # https://github.com/NixOS/nixpkgs/pull/201196/files#diff-e669dbe391f8856f4564f26023fe147a7b720aeefe6869ab7a218f02a8247302R20
+  doCheck = false;
+
+  passthru.tests.version = testers.testVersion { package = blobfuse; };
+
+  meta = with lib; {
+    description = "Mount an Azure Blob storage as filesystem through FUSE";
+    license = licenses.mit;
+    maintainers = with maintainers; [ jbgi ];
+    platforms = platforms.linux;
+    mainProgram = "azure-storage-fuse";
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/blobfuse/install-adls.patch b/nixpkgs/pkgs/tools/filesystems/blobfuse/install-adls.patch
new file mode 100644
index 000000000000..e48f4d592f68
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/blobfuse/install-adls.patch
@@ -0,0 +1,14 @@
+diff --git a/adls/CMakeLists.txt b/adls/CMakeLists.txt
+index 1fb7146..22e663a 100644
+--- a/adls/CMakeLists.txt
++++ b/adls/CMakeLists.txt
+@@ -50,3 +50,9 @@ if(BUILD_TESTS)
+   string(REGEX REPLACE "([^;]+)" "${CMAKE_CURRENT_SOURCE_DIR}/\\1" AZURE_STORAGE_ADLS_TEST_SOURCES "${AZURE_STORAGE_ADLS_TEST_SOURCES}")
+   set(AZURE_STORAGE_ADLS_TEST_SOURCES ${AZURE_STORAGE_ADLS_TEST_SOURCES} PARENT_SCOPE)
+ endif()
++
++install(TARGETS azure-storage-adls
++        ARCHIVE DESTINATION lib
++        LIBRARY DESTINATION lib
++        RUNTIME DESTINATION bin)
++
diff --git a/nixpkgs/pkgs/tools/filesystems/bonnie/default.nix b/nixpkgs/pkgs/tools/filesystems/bonnie/default.nix
new file mode 100644
index 000000000000..429617e5eae2
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/bonnie/default.nix
@@ -0,0 +1,22 @@
+{ lib, stdenv, fetchurl, perl }:
+
+stdenv.mkDerivation rec {
+  pname = "bonnie++";
+  version = "2.00a";
+
+  src = fetchurl {
+    url = "https://www.coker.com.au/bonnie++/bonnie++-${version}.tgz";
+    sha256 = "sha256-qNM7vYG8frVZzlv25YS5tT+uo5zPtK6S5Y8nJX5Gjw4=";
+  };
+
+  enableParallelBuilding = true;
+
+  buildInputs = [ perl ];
+
+  meta = {
+    homepage = "http://www.coker.com.au/bonnie++/";
+    description = "Hard drive and file system benchmark suite";
+    license = lib.licenses.gpl2;
+    platforms = lib.platforms.linux ++ lib.platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/boxfs/default.nix b/nixpkgs/pkgs/tools/filesystems/boxfs/default.nix
new file mode 100644
index 000000000000..ef611afd5d09
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/boxfs/default.nix
@@ -0,0 +1,63 @@
+{ lib, stdenv, fetchFromGitHub, curl, fuse, libxml2, pkg-config }:
+
+let
+  srcs = {
+    boxfs2 = fetchFromGitHub {
+      sha256 = "10af1l3sjnh25shmq5gdnpyqk4vrq7i1zklv4csf1n2nrahln8j8";
+      rev = "d7018b0546d2dae956ae3da3fb95d2f63fa6d3ff";
+      repo = "boxfs2";
+      owner = "drotiro";
+    };
+    libapp = fetchFromGitHub {
+      sha256 = "1p2sbxiranan2n2xsfjkp3c6r2vcs57ds6qvjv4crs1yhxr7cp00";
+      rev = "febebe2bc0fb88d57bdf4eb4a2a54c9eeda3f3d8";
+      repo = "libapp";
+      owner = "drotiro";
+    };
+    libjson = fetchFromGitHub {
+      sha256 = "1vhss3gq44nl61fbnh1l3qzwvz623gwhfgykf1lf1p31rjr7273w";
+      rev = "75a7f50fca2c667bc5f32cdd6dd98f2b673f6657";
+      repo = "libjson";
+      owner = "vincenthz";
+    };
+  };
+in stdenv.mkDerivation {
+  pname = "boxfs";
+  version = "2-20150109";
+
+  src = srcs.boxfs2;
+
+  prePatch = with srcs; ''
+    substituteInPlace Makefile --replace "git pull" "true"
+    cp -a --no-preserve=mode ${libapp} libapp
+    cp -a --no-preserve=mode ${libjson} libjson
+  '';
+  patches = [ ./work-around-API-borkage.patch ];
+
+  buildInputs = [ curl fuse libxml2 ];
+  nativeBuildInputs = [ pkg-config ];
+
+  buildFlags = [
+    "static"
+    "CC=${stdenv.cc.targetPrefix}cc"
+  ] ++ lib.optional stdenv.isDarwin "CFLAGS=-D_BSD_SOURCE";
+
+  installPhase = ''
+    mkdir -p $out/bin
+    install boxfs boxfs-init $out/bin
+  '';
+
+  meta = with lib; {
+    description = "FUSE file system for box.com accounts";
+    longDescription = ''
+      Store files on box.com (an account is required). The first time you run
+      boxfs, you will need to complete the authentication (oauth2) process and
+      grant access to your box.com account. Just follow the instructions on
+      the terminal and in your browser. When you've done using your files,
+      unmount the file system with `fusermount -u mountpoint`.
+    '';
+    homepage = "https://github.com/drotiro/boxfs2";
+    license = licenses.gpl3;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/boxfs/work-around-API-borkage.patch b/nixpkgs/pkgs/tools/filesystems/boxfs/work-around-API-borkage.patch
new file mode 100644
index 000000000000..b74e7f324665
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/boxfs/work-around-API-borkage.patch
@@ -0,0 +1,15 @@
+diff --git a/boxapi.c b/boxapi.c
+index 4964273..1a32e0d 100644
+--- a/boxapi.c
++++ b/boxapi.c
+@@ -38,8 +38,8 @@
+ //    AUTH
+ #define API_KEY_VAL "f9ss11y2w0hg5r04jsidxlhk4pil28cf"
+ #define API_SECRET  "r3ZHAIhsOL2FoHjgERI9xf74W5skIM0w"
+-#define API_OAUTH_URL "https://app.box.com/api/oauth2/" //"https://www.box.com/api/oauth2/"
+-#define API_OAUTH_AUTHORIZE API_OAUTH_URL "authorize?response_type=code&client_id=" API_KEY_VAL /*"&redirect_uri=http%3A//localhost"*/
++#define API_OAUTH_URL "https://api.box.com/oauth2/" //"https://www.box.com/api/oauth2/"
++#define API_OAUTH_AUTHORIZE "https://app.box.com/api/oauth2/authorize?response_type=code&client_id=" API_KEY_VAL /*"&redirect_uri=http%3A//localhost"*/
+ #define API_OAUTH_TOKEN     API_OAUTH_URL "token"
+ //    CALLS
+ #define API_ENDPOINT	"https://api.box.com/2.0/"
diff --git a/nixpkgs/pkgs/tools/filesystems/btrfs-heatmap/default.nix b/nixpkgs/pkgs/tools/filesystems/btrfs-heatmap/default.nix
new file mode 100644
index 000000000000..9de91738e74d
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/btrfs-heatmap/default.nix
@@ -0,0 +1,42 @@
+{ stdenv, lib
+, fetchFromGitHub
+, python3
+, installShellFiles
+}:
+
+stdenv.mkDerivation rec {
+  pname = "btrfs-heatmap";
+  version = "9";
+
+  src = fetchFromGitHub {
+    owner = "knorrie";
+    repo = "btrfs-heatmap";
+    rev = "v${version}";
+    sha256 = "sha256-yCkuZqWwxrs2eS7EXY6pAOVVVSq7dAMxJtf581gX8vg=";
+  };
+
+  buildInputs = [ python3 ];
+  nativeBuildInputs = [ python3.pkgs.wrapPython installShellFiles ];
+
+  outputs = [ "out" "man" ];
+
+  installPhase = ''
+    runHook preInstall
+
+    install -Dm 0755 btrfs-heatmap $out/sbin/btrfs-heatmap
+    installManPage man/btrfs-heatmap.1
+
+    buildPythonPath ${python3.pkgs.btrfs}
+    patchPythonScript $out/sbin/btrfs-heatmap
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Visualize the layout of a mounted btrfs";
+    homepage = "https://github.com/knorrie/btrfs-heatmap";
+    license = licenses.mit;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.evils ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/btrfs-progs/default.nix b/nixpkgs/pkgs/tools/filesystems/btrfs-progs/default.nix
new file mode 100644
index 000000000000..d9beb8f12fcb
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/btrfs-progs/default.nix
@@ -0,0 +1,72 @@
+{ lib, stdenv, fetchurl
+, pkg-config, sphinx
+, zstd
+, acl, attr, e2fsprogs, libuuid, lzo, udev, zlib
+, runCommand, btrfs-progs
+, gitUpdater
+, udevSupport ? true
+}:
+
+stdenv.mkDerivation rec {
+  pname = "btrfs-progs";
+  version = "6.6.1";
+
+  src = fetchurl {
+    url = "mirror://kernel/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v${version}.tar.xz";
+    hash = "sha256-PpLLbYO93mEjGP2ARt1u/0fHhuWdVt1Ozph5RdUTfJ4=";
+  };
+
+  nativeBuildInputs = [
+    pkg-config
+  ] ++ [
+    sphinx
+  ];
+
+  buildInputs = [ acl attr e2fsprogs libuuid lzo udev zlib zstd ];
+
+  # gcc bug with -O1 on ARM with gcc 4.8
+  # This should be fine on all platforms so apply universally
+  postPatch = "sed -i s/-O1/-O2/ configure";
+
+  postInstall = ''
+    install -v -m 444 -D btrfs-completion $out/share/bash-completion/completions/btrfs
+  '';
+
+  configureFlags = [
+    # Built separately, see python3Packages.btrfsutil
+    "--disable-python"
+  ] ++ lib.optionals stdenv.hostPlatform.isMusl [
+    "--disable-backtrace"
+  ] ++ lib.optionals (!udevSupport) [
+    "--disable-libudev"
+  ];
+
+  makeFlags = [ "udevruledir=$(out)/lib/udev/rules.d" ];
+
+  enableParallelBuilding = true;
+
+  passthru.tests = {
+    simple-filesystem = runCommand "btrfs-progs-create-fs" {} ''
+      mkdir -p $out
+      truncate -s110M $out/disc
+      ${btrfs-progs}/bin/mkfs.btrfs $out/disc | tee $out/success
+      ${btrfs-progs}/bin/btrfs check $out/disc | tee $out/success
+      [ -e $out/success ]
+    '';
+  };
+
+  passthru.updateScript = gitUpdater {
+    # No nicer place to find latest release.
+    url = "https://github.com/kdave/btrfs-progs.git";
+    rev-prefix = "v";
+  };
+
+  meta = with lib; {
+    description = "Utilities for the btrfs filesystem";
+    homepage = "https://btrfs.readthedocs.io/en/latest/";
+    changelog = "https://github.com/kdave/btrfs-progs/raw/v${version}/CHANGES";
+    license = licenses.gpl2Only;
+    maintainers = with maintainers; [ raskin ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/btrfs-snap/default.nix b/nixpkgs/pkgs/tools/filesystems/btrfs-snap/default.nix
new file mode 100644
index 000000000000..e43380e6792e
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/btrfs-snap/default.nix
@@ -0,0 +1,32 @@
+{ bash, btrfs-progs, coreutils, fetchFromGitHub, gnugrep, lib, makeWrapper, stdenvNoCC, util-linuxMinimal }:
+stdenvNoCC.mkDerivation rec {
+  pname = "btrfs-snap";
+  version = "1.7.3";
+  src = fetchFromGitHub {
+    owner = "jf647";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-SDzLjgNRuR9XpmcYCD9T10MLS+//+pWFGDiTAb8NiLQ=";
+  };
+  buildInputs = [ bash ];
+  nativeBuildInputs = [ makeWrapper ];
+  dontConfigure = true;
+  dontBuild = true;
+  installPhase = ''
+    mkdir -p $out/bin
+    cp btrfs-snap $out/bin/
+    wrapProgram $out/bin/btrfs-snap --prefix PATH : ${lib.makeBinPath [
+      btrfs-progs       # btrfs
+      coreutils         # cut, date, head, ls, mkdir, readlink, stat, tail, touch, test, [
+      gnugrep           # grep
+      util-linuxMinimal # logger, mount
+    ]}
+  '';
+  meta = with lib; {
+    description = "btrfs-snap creates and maintains the history of snapshots of btrfs filesystems.";
+    homepage = "https://github.com/jf647/btrfs-snap";
+    license = licenses.gpl3Only;
+    maintainers = with maintainers; [ lionello ];
+    platforms = platforms.linux;
+ };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/catcli/default.nix b/nixpkgs/pkgs/tools/filesystems/catcli/default.nix
new file mode 100644
index 000000000000..a2f5402dca25
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/catcli/default.nix
@@ -0,0 +1,40 @@
+{ lib
+, fetchFromGitHub
+, python3
+}:
+
+python3.pkgs.buildPythonApplication rec {
+  pname = "catcli";
+  version = "0.9.6";
+  format = "setuptools";
+
+  src = fetchFromGitHub {
+    owner = "deadc0de6";
+    repo = pname;
+    rev = "refs/tags/v${version}";
+    hash = "sha256-+/kd7oPT6msojPj25bzG9HwVqPj47gIUg9LngbDc3y8=";
+  };
+
+  postPatch = "patchShebangs . ";
+
+  propagatedBuildInputs = with python3.pkgs; [
+    anytree
+    docopt
+    fusepy
+    pyfzf
+    types-docopt
+  ];
+
+  nativeCheckInputs = with python3.pkgs; [
+    pytestCheckHook
+  ];
+
+  meta = with lib; {
+    description = "The command line catalog tool for your offline data";
+    homepage = "https://github.com/deadc0de6/catcli";
+    changelog = "https://github.com/deadc0de6/catcli/releases/tag/v${version}";
+    license = licenses.gpl3Only;
+    maintainers = with maintainers; [ petersjt014 ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/ceph-csi/default.nix b/nixpkgs/pkgs/tools/filesystems/ceph-csi/default.nix
new file mode 100644
index 000000000000..5ca2e416a1d4
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/ceph-csi/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, lib, go, ceph, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "ceph-csi";
+  version = "3.9.0";
+
+  nativeBuildInputs = [ go ];
+  buildInputs = [ ceph ];
+
+  src = fetchFromGitHub {
+    owner = "ceph";
+    repo = "ceph-csi";
+    rev = "v${version}";
+    sha256 = "sha256-dKn79EIveepeMzFPweQ3BE3YMCg7mj8EycMbBH8J8PQ=";
+  };
+
+  preConfigure = ''
+    export GOCACHE=$(pwd)/.cache
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp ./_output/* $out/bin
+  '';
+
+  meta = with lib; {
+    homepage = "https://ceph.com/";
+    description = "Container Storage Interface (CSI) driver for Ceph RBD and CephFS";
+    license = [ licenses.asl20 ];
+    maintainers = with maintainers; [ johanot ];
+    platforms = [ "x86_64-linux" "aarch64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/ceph/default.nix b/nixpkgs/pkgs/tools/filesystems/ceph/default.nix
new file mode 100644
index 000000000000..241bf71985a0
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/ceph/default.nix
@@ -0,0 +1,393 @@
+{ lib
+, stdenv
+, runCommand
+, fetchurl
+, fetchFromGitHub
+, fetchPypi
+
+# Build time
+, cmake
+, ensureNewerSourcesHook
+, fmt
+, git
+, makeWrapper
+, nasm
+, pkg-config
+, which
+
+# Tests
+, nixosTests
+
+# Runtime dependencies
+, arrow-cpp
+, babeltrace
+, boost179
+, bzip2
+, cryptsetup
+, cunit
+, doxygen
+, gperf
+, graphviz
+, gtest
+, icu
+, libcap
+, libcap_ng
+, libnl
+, libxml2
+, lttng-ust
+, lua
+, lz4
+, oath-toolkit
+, openldap
+, python310
+, rdkafka
+, rocksdb
+, snappy
+, sqlite
+, utf8proc
+, zlib
+, zstd
+
+# Optional Dependencies
+, curl ? null
+, expat ? null
+, fuse ? null
+, libatomic_ops ? null
+, libedit ? null
+, libs3 ? null
+, yasm ? null
+
+# Mallocs
+, gperftools ? null
+, jemalloc ? null
+
+# Crypto Dependencies
+, cryptopp ? null
+, nspr ? null
+, nss ? null
+
+# Linux Only Dependencies
+, linuxHeaders
+, util-linux
+, libuuid
+, udev
+, keyutils
+, rdma-core
+, rabbitmq-c
+, libaio ? null
+, libxfs ? null
+, liburing ? null
+, zfs ? null
+, ...
+}:
+
+# We must have one crypto library
+assert cryptopp != null || (nss != null && nspr != null);
+
+let
+  shouldUsePkg = pkg: if pkg != null && lib.meta.availableOn stdenv.hostPlatform pkg then pkg else null;
+
+  optYasm = shouldUsePkg yasm;
+  optExpat = shouldUsePkg expat;
+  optCurl = shouldUsePkg curl;
+  optFuse = shouldUsePkg fuse;
+  optLibedit = shouldUsePkg libedit;
+  optLibatomic_ops = shouldUsePkg libatomic_ops;
+  optLibs3 = shouldUsePkg libs3;
+
+  optJemalloc = shouldUsePkg jemalloc;
+  optGperftools = shouldUsePkg gperftools;
+
+  optCryptopp = shouldUsePkg cryptopp;
+  optNss = shouldUsePkg nss;
+  optNspr = shouldUsePkg nspr;
+
+  optLibaio = shouldUsePkg libaio;
+  optLibxfs = shouldUsePkg libxfs;
+  optZfs = shouldUsePkg zfs;
+
+  # Downgrade rocksdb, 7.10 breaks ceph
+  rocksdb' = rocksdb.overrideAttrs {
+    version = "7.9.2";
+    src = fetchFromGitHub {
+      owner = "facebook";
+      repo = "rocksdb";
+      rev = "refs/tags/v7.9.2";
+      hash = "sha256-5P7IqJ14EZzDkbjaBvbix04ceGGdlWBuVFH/5dpD5VM=";
+    };
+  };
+
+  hasRadosgw = optExpat != null && optCurl != null && optLibedit != null;
+
+  # Malloc implementation (can be jemalloc, tcmalloc or null)
+  malloc = if optJemalloc != null then optJemalloc else optGperftools;
+
+  # We prefer nss over cryptopp
+  cryptoStr = if optNss != null && optNspr != null then "nss" else
+    if optCryptopp != null then "cryptopp" else "none";
+
+  cryptoLibsMap = {
+    nss = [ optNss optNspr ];
+    cryptopp = [ optCryptopp ];
+    none = [ ];
+  };
+
+  getMeta = description: with lib; {
+     homepage = "https://ceph.io/en/";
+     inherit description;
+     license = with licenses; [ lgpl21 gpl2 bsd3 mit publicDomain ];
+     maintainers = with maintainers; [ adev ak johanot krav ];
+     platforms = [ "x86_64-linux" "aarch64-linux" ];
+   };
+
+  ceph-common = with python.pkgs; buildPythonPackage {
+    pname = "ceph-common";
+    inherit src version;
+
+    sourceRoot = "ceph-${version}/src/python-common";
+
+    propagatedBuildInputs = [
+      pyyaml
+    ];
+
+    nativeCheckInputs = [
+      pytestCheckHook
+    ];
+
+    disabledTests = [
+      # requires network access
+      "test_valid_addr"
+    ];
+
+    meta = getMeta "Ceph common module for code shared by manager modules";
+  };
+
+  # Watch out for python <> boost compatibility
+  python = python310.override {
+    packageOverrides = self: super: {
+    };
+  };
+
+  boost = boost179.override {
+    enablePython = true;
+    inherit python;
+  };
+
+  # TODO: split this off in build and runtime environment
+  ceph-python-env = python.withPackages (ps: with ps; [
+    ceph-common
+
+    # build time
+    cython
+
+    # debian/control
+    bcrypt
+    cherrypy
+    influxdb
+    jinja2
+    kubernetes
+    natsort
+    numpy
+    pecan
+    prettytable
+    pyjwt
+    pyopenssl
+    python-dateutil
+    pyyaml
+    requests
+    routes
+    scikit-learn
+    scipy
+    setuptools
+    sphinx
+    virtualenv
+    werkzeug
+
+    # src/pybind/mgr/requirements-required.txt
+    cryptography
+    jsonpatch
+
+    # src/tools/cephfs/shell/setup.py
+    cmd2
+    colorama
+  ]);
+  inherit (ceph-python-env.python) sitePackages;
+
+  version = "18.2.0";
+  src = fetchurl {
+    url = "https://download.ceph.com/tarballs/ceph-${version}.tar.gz";
+    hash = "sha256:0k9nl6xi5brva51rr14m7ig27mmmd7vrpchcmqc40q3c2khn6ns9";
+  };
+in rec {
+  ceph = stdenv.mkDerivation {
+    pname = "ceph";
+    inherit src version;
+
+    nativeBuildInputs = [
+      cmake
+      fmt
+      git
+      makeWrapper
+      nasm
+      pkg-config
+      python
+      python.pkgs.python # for the toPythonPath function
+      python.pkgs.wrapPython
+      which
+      (ensureNewerSourcesHook { year = "1980"; })
+      # for building docs/man-pages presumably
+      doxygen
+      graphviz
+    ];
+
+    enableParallelBuilding = true;
+
+    buildInputs = cryptoLibsMap.${cryptoStr} ++ [
+      arrow-cpp
+      babeltrace
+      boost
+      bzip2
+      ceph-python-env
+      cryptsetup
+      cunit
+      gperf
+      gtest
+      icu
+      libcap
+      libnl
+      libxml2
+      lttng-ust
+      lua
+      lz4
+      malloc
+      oath-toolkit
+      openldap
+      optLibatomic_ops
+      optLibs3
+      optYasm
+      rdkafka
+      rocksdb'
+      snappy
+      sqlite
+      utf8proc
+      zlib
+      zstd
+    ] ++ lib.optionals stdenv.isLinux [
+      keyutils
+      libcap_ng
+      liburing
+      libuuid
+      linuxHeaders
+      optLibaio
+      optLibxfs
+      optZfs
+      rabbitmq-c
+      rdma-core
+      udev
+      util-linux
+    ] ++ lib.optionals hasRadosgw [
+      optCurl
+      optExpat
+      optFuse
+      optLibedit
+    ];
+
+    pythonPath = [ ceph-python-env "${placeholder "out"}/${ceph-python-env.sitePackages}" ];
+
+    preConfigure =''
+      substituteInPlace src/common/module.c --replace "/sbin/modinfo"  "modinfo"
+      substituteInPlace src/common/module.c --replace "/sbin/modprobe" "modprobe"
+      substituteInPlace src/common/module.c --replace "/bin/grep" "grep"
+
+      # install target needs to be in PYTHONPATH for "*.pth support" check to succeed
+      # set PYTHONPATH, so the build system doesn't silently skip installing ceph-volume and others
+      export PYTHONPATH=${ceph-python-env}/${sitePackages}:$lib/${sitePackages}:$out/${sitePackages}
+      patchShebangs src/
+    '';
+
+    cmakeFlags = [
+      "-DCMAKE_INSTALL_DATADIR=${placeholder "lib"}/lib"
+
+      "-DWITH_CEPHFS_SHELL:BOOL=ON"
+      "-DWITH_SYSTEMD:BOOL=OFF"
+      # `WITH_JAEGER` requires `thrift` as a depenedncy (fine), but the build fails with:
+      #     CMake Error at src/opentelemetry-cpp-stamp/opentelemetry-cpp-build-Release.cmake:49 (message):
+      #     Command failed: 2
+      #
+      #        'make' 'opentelemetry_trace' 'opentelemetry_exporter_jaeger_trace'
+      #
+      #     See also
+      #
+      #        /build/ceph-18.2.0/build/src/opentelemetry-cpp/src/opentelemetry-cpp-stamp/opentelemetry-cpp-build-*.log
+      # and that file contains:
+      #     /build/ceph-18.2.0/src/jaegertracing/opentelemetry-cpp/exporters/jaeger/src/TUDPTransport.cc: In member function 'virtual void opentelemetry::v1::exporter::jaeger::TUDPTransport::close()':
+      #     /build/ceph-18.2.0/src/jaegertracing/opentelemetry-cpp/exporters/jaeger/src/TUDPTransport.cc:71:7: error: '::close' has not been declared; did you mean 'pclose'?
+      #       71 |     ::THRIFT_CLOSESOCKET(socket_);
+      #          |       ^~~~~~~~~~~~~~~~~~
+      # Looks like `close()` is somehow not included.
+      # But the relevant code is already removed in `open-telemetry` 1.10: https://github.com/open-telemetry/opentelemetry-cpp/pull/2031
+      # So it's proably not worth trying to fix that for this Ceph version,
+      # and instead just disable Ceph's Jaeger support.
+      "-DWITH_JAEGER:BOOL=OFF"
+      "-DWITH_TESTS:BOOL=OFF"
+
+      # Use our own libraries, where possible
+      "-DWITH_SYSTEM_ARROW:BOOL=ON" # Only used if other options enable Arrow support.
+      "-DWITH_SYSTEM_BOOST:BOOL=ON"
+      "-DWITH_SYSTEM_GTEST:BOOL=ON"
+      "-DWITH_SYSTEM_ROCKSDB:BOOL=ON"
+      "-DWITH_SYSTEM_UTF8PROC:BOOL=ON"
+      "-DWITH_SYSTEM_ZSTD:BOOL=ON"
+
+      # TODO breaks with sandbox, tries to download stuff with npm
+      "-DWITH_MGR_DASHBOARD_FRONTEND:BOOL=OFF"
+      # WITH_XFS has been set default ON from Ceph 16, keeping it optional in nixpkgs for now
+      ''-DWITH_XFS=${if optLibxfs != null then "ON" else "OFF"}''
+    ] ++ lib.optional stdenv.isLinux "-DWITH_SYSTEM_LIBURING=ON";
+
+    postFixup = ''
+      wrapPythonPrograms
+      wrapProgram $out/bin/ceph-mgr --prefix PYTHONPATH ":" "$(toPythonPath ${placeholder "out"}):$(toPythonPath ${ceph-python-env})"
+
+      # Test that ceph-volume exists since the build system has a tendency to
+      # silently drop it with misconfigurations.
+      test -f $out/bin/ceph-volume
+    '';
+
+    outputs = [ "out" "lib" "dev" "doc" "man" ];
+
+    doCheck = false; # uses pip to install things from the internet
+
+    # Takes 7+h to build with 2 cores.
+    requiredSystemFeatures = [ "big-parallel" ];
+
+    meta = getMeta "Distributed storage system";
+
+    passthru = {
+      inherit version;
+      tests = {
+        inherit (nixosTests)
+          ceph-multi-node
+          ceph-single-node
+          ceph-single-node-bluestore;
+      };
+    };
+  };
+
+  ceph-client = runCommand "ceph-client-${version}" {
+      meta = getMeta "Tools needed to mount Ceph's RADOS Block Devices/Cephfs";
+    } ''
+      mkdir -p $out/{bin,etc,${sitePackages},share/bash-completion/completions}
+      cp -r ${ceph}/bin/{ceph,.ceph-wrapped,rados,rbd,rbdmap} $out/bin
+      cp -r ${ceph}/bin/ceph-{authtool,conf,dencoder,rbdnamer,syn} $out/bin
+      cp -r ${ceph}/bin/rbd-replay* $out/bin
+      cp -r ${ceph}/sbin/mount.ceph $out/bin
+      cp -r ${ceph}/sbin/mount.fuse.ceph $out/bin
+      ln -s bin $out/sbin
+      cp -r ${ceph}/${sitePackages}/* $out/${sitePackages}
+      cp -r ${ceph}/etc/bash_completion.d $out/share/bash-completion/completions
+      # wrapPythonPrograms modifies .ceph-wrapped, so lets just update its paths
+      substituteInPlace $out/bin/ceph          --replace ${ceph} $out
+      substituteInPlace $out/bin/.ceph-wrapped --replace ${ceph} $out
+   '';
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/chunkfs/default.nix b/nixpkgs/pkgs/tools/filesystems/chunkfs/default.nix
new file mode 100644
index 000000000000..e4a20e3da5a0
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/chunkfs/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchurl, perl, fuse }:
+
+stdenv.mkDerivation rec {
+  version = "0.7";
+  pname = "chunkfs";
+
+  src = fetchurl {
+    url = "https://chunkfs.florz.de/chunkfs_${version}.tar.gz";
+    sha256 = "4c168fc2b265a6ba34afc565707ea738f34375325763c0596f2cfa1c9b8d40f1";
+  };
+
+  buildInputs = [perl fuse];
+
+  makeFlags = [
+    "DESTDIR=$(out)"
+    "PREFIX="
+  ];
+
+  preInstall = ''
+    mkdir -p $out/bin
+    mkdir -p $out/share/man/man1
+  '';
+
+  meta = {
+    description = "FUSE filesystems for viewing chunksync-style directory trees as a block device and vice versa";
+    homepage = "http://chunkfs.florz.de/";
+    license = lib.licenses.gpl2;
+    platforms = with lib.platforms; linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/ciopfs/default.nix b/nixpkgs/pkgs/tools/filesystems/ciopfs/default.nix
new file mode 100644
index 000000000000..31311756ab47
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/ciopfs/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchurl, pkg-config, fuse, glib, attr }:
+
+stdenv.mkDerivation rec {
+  pname = "ciopfs";
+  version = "0.4";
+
+  src = fetchurl {
+    url = "http://www.brain-dump.org/projects/ciopfs/ciopfs-${version}.tar.gz";
+    sha256 = "0sr9i9b3qfwbfvzvk00yrrg3x2xqk1njadbldkvn7hwwa4z5bm9l";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ fuse glib attr ];
+
+  makeFlags = [ "DESTDIR=$(out)" "PREFIX=" ];
+
+  meta = {
+    homepage = "https://www.brain-dump.org/projects/ciopfs/";
+    description = "A case-insensitive filesystem layered on top of any other filesystem";
+    license = lib.licenses.gpl2;
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/convoy/default.nix b/nixpkgs/pkgs/tools/filesystems/convoy/default.nix
new file mode 100644
index 000000000000..774568fdde17
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/convoy/default.nix
@@ -0,0 +1,26 @@
+# This file was generated by go2nix.
+{ lib, buildGoPackage, fetchFromGitHub, lvm2 }:
+
+buildGoPackage rec {
+  pname = "convoy";
+  version = "0.5.2";
+
+  goPackagePath = "github.com/rancher/convoy";
+
+  src = fetchFromGitHub {
+    rev = "v${version}";
+    owner = "rancher";
+    repo = "convoy";
+    sha256 = "09nygrxd5hril4xcfsvgjg74xxhhimznqq4sdk0f360c5ra0dbhj";
+  };
+
+  buildInputs = [lvm2];
+
+  meta = with lib; {
+    homepage = "https://github.com/rancher/convoy";
+    description = "A Docker volume plugin, managing persistent container volumes";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ offline ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/cpcfs/default.nix b/nixpkgs/pkgs/tools/filesystems/cpcfs/default.nix
new file mode 100644
index 000000000000..93bfdd8d23fa
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/cpcfs/default.nix
@@ -0,0 +1,41 @@
+{ lib, stdenv, fetchFromGitHub, makeWrapper, ncurses, readline, ronn }:
+
+stdenv.mkDerivation rec {
+
+  pname = "cpcfs";
+  version = "0.85.4";
+
+  src = fetchFromGitHub {
+    owner = "derikz";
+    repo = "cpcfs";
+    rev = "v${version}";
+    sha256 = "0rfbry0qy8mv746mzk9zdfffkdgq4w7invgb5cszjma2cp83q3i2";
+  };
+
+  sourceRoot = "${src.name}/src";
+
+  nativeBuildInputs = [ makeWrapper ncurses readline ronn ];
+
+  postPatch = ''
+    substituteInPlace Makefile \
+      --replace '-ltermcap' '-lncurses' \
+      --replace '-L /usr/lib/termcap' ' '
+  '';
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $out/bin
+    mkdir -p $out/man/man1
+    cp cpcfs $out/bin
+    ronn --roff ../template.doc --pipe > $out/man/man1/cpcfs.1
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Manipulating CPC dsk images and files";
+    homepage = "https://github.com/derikz/cpcfs/" ;
+    license = licenses.bsd2;
+    maintainers = [ ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/cryfs/default.nix b/nixpkgs/pkgs/tools/filesystems/cryfs/default.nix
new file mode 100644
index 000000000000..588dcb320aa5
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/cryfs/default.nix
@@ -0,0 +1,81 @@
+{ lib, stdenv, fetchFromGitHub
+, cmake, pkg-config, python3
+, boost, curl, fuse, openssl, range-v3, spdlog
+# cryptopp and gtest on standby - using the vendored ones for now
+# see https://github.com/cryfs/cryfs/issues/369
+, llvmPackages
+}:
+
+stdenv.mkDerivation rec {
+  pname = "cryfs";
+  version = "0.11.4";
+
+  src = fetchFromGitHub {
+    owner = pname;
+    repo = pname;
+    rev = version;
+    hash = "sha256-OkJhLg+YzS3kDhlpUQe9A+OiVBPG/iKs6OU7aKFJ5wY=";
+  };
+
+  postPatch = ''
+    patchShebangs src
+
+    # remove tests that require network access
+    substituteInPlace test/cpp-utils/CMakeLists.txt \
+      --replace "network/CurlHttpClientTest.cpp" "" \
+      --replace "network/FakeHttpClientTest.cpp" ""
+
+    # remove CLI test trying to access /dev/fuse
+    substituteInPlace test/cryfs-cli/CMakeLists.txt \
+      --replace "CliTest_IntegrityCheck.cpp" "" \
+      --replace "CliTest_Setup.cpp" "" \
+      --replace "CliTest_WrongEnvironment.cpp" "" \
+      --replace "CryfsUnmountTest.cpp" ""
+
+    # downsize large file test as 4.5G is too big for Hydra
+    substituteInPlace test/cpp-utils/data/DataTest.cpp \
+      --replace "(4.5L*1024*1024*1024)" "(0.5L*1024*1024*1024)"
+  '';
+
+  nativeBuildInputs = [ cmake pkg-config python3 ];
+
+  strictDeps = true;
+
+  buildInputs = [ boost curl fuse openssl range-v3 spdlog ]
+    ++ lib.optional stdenv.cc.isClang llvmPackages.openmp;
+
+  #nativeCheckInputs = [ gtest ];
+
+  cmakeFlags = [
+    "-DDEPENDENCY_CONFIG='../cmake-utils/DependenciesFromLocalSystem.cmake'"
+    "-DCRYFS_UPDATE_CHECKS:BOOL=FALSE"
+    "-DBoost_USE_STATIC_LIBS:BOOL=FALSE" # this option is case sensitive
+    "-DBUILD_TESTING:BOOL=${if doCheck then "TRUE" else "FALSE"}"
+  ]; # ++ lib.optional doCheck "-DCMAKE_PREFIX_PATH=${gtest.dev}/lib/cmake";
+
+  # macFUSE needs to be installed for the test to succeed on Darwin
+  doCheck = !stdenv.isDarwin;
+
+  checkPhase = ''
+    runHook preCheck
+    export HOME=$(mktemp -d)
+
+    # Skip CMakeFiles directory and tests depending on fuse (does not work well with sandboxing)
+    SKIP_IMPURE_TESTS="CMakeFiles|fspp|my-gtest-main"
+
+    for t in $(ls -d test/*/ | grep -E -v "$SKIP_IMPURE_TESTS") ; do
+      "./$t$(basename $t)-test"
+    done
+
+    runHook postCheck
+  '';
+
+  meta = with lib; {
+    description = "Cryptographic filesystem for the cloud";
+    homepage    = "https://www.cryfs.org/";
+    changelog   = "https://github.com/cryfs/cryfs/raw/${version}/ChangeLog.txt";
+    license     = licenses.lgpl3Only;
+    maintainers = with maintainers; [ peterhoeg c0bw3b ];
+    platforms   = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/curlftpfs/default.nix b/nixpkgs/pkgs/tools/filesystems/curlftpfs/default.nix
new file mode 100644
index 000000000000..1263ccb8565e
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/curlftpfs/default.nix
@@ -0,0 +1,42 @@
+{ lib, stdenv, fetchurl, autoreconfHook, fuse, curl, pkg-config, glib, zlib }:
+
+stdenv.mkDerivation rec {
+  pname = "curlftpfs";
+  version = "0.9.2";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/curlftpfs/curlftpfs-${version}.tar.gz";
+    sha256 = "0n397hmv21jsr1j7zx3m21i7ryscdhkdsyqpvvns12q7qwwlgd2f";
+  };
+
+  patches = [
+    # This removes AC_FUNC_MALLOC and AC_FUNC_REALLOC from configure.ac because
+    # it is known to cause problems. Search online for "rpl_malloc" and
+    # "rpl_realloc" to find out more.
+    ./fix-rpl_malloc.patch
+    ./suse-bug-580609.patch
+    ./suse-bug-955687.patch
+  ];
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = [ fuse curl glib zlib ];
+
+  CFLAGS = lib.optionalString stdenv.isDarwin "-D__off_t=off_t";
+
+  postPatch = lib.optionalString stdenv.isDarwin ''
+    # Fix the build on macOS with macFUSE installed. Needs autoreconfHook for
+    # this change to effect
+    substituteInPlace configure.ac --replace \
+      'export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH' \
+      ""
+  '';
+
+  doCheck = false; # fails, doesn't work well too, btw
+
+  meta = with lib; {
+    description = "Filesystem for accessing FTP hosts based on FUSE and libcurl";
+    homepage = "https://curlftpfs.sourceforge.net";
+    license = licenses.gpl2Only;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/curlftpfs/fix-rpl_malloc.patch b/nixpkgs/pkgs/tools/filesystems/curlftpfs/fix-rpl_malloc.patch
new file mode 100644
index 000000000000..0265e1d82893
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/curlftpfs/fix-rpl_malloc.patch
@@ -0,0 +1,13 @@
+diff -Naur a/configure.ac b/configure.ac
+--- a/configure.ac	2008-04-23 20:37:42.000000000 +0900
++++ b/configure.ac	2021-05-16 01:28:24.000000000 +0900
+@@ -46,9 +46,7 @@
+ 
+ # Checks for library functions.
+ AC_FUNC_CHOWN
+-AC_FUNC_MALLOC
+ AC_FUNC_MKTIME
+-AC_FUNC_REALLOC
+ AC_FUNC_SELECT_ARGTYPES
+ AC_FUNC_STRFTIME
+ AC_FUNC_UTIME_NULL
diff --git a/nixpkgs/pkgs/tools/filesystems/curlftpfs/suse-bug-580609.patch b/nixpkgs/pkgs/tools/filesystems/curlftpfs/suse-bug-580609.patch
new file mode 100644
index 000000000000..068fb129a4b1
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/curlftpfs/suse-bug-580609.patch
@@ -0,0 +1,10 @@
+--- a/ftpfs.c	2008-04-30 01:05:47.000000000 +0200
++++ b/ftpfs.c	2010-05-21 13:01:42.569006163 +0200
+@@ -503,7 +503,6 @@ static void *ftpfs_write_thread(void *da
+   
+   curl_easy_setopt_or_die(fh->write_conn, CURLOPT_URL, fh->full_path);
+   curl_easy_setopt_or_die(fh->write_conn, CURLOPT_UPLOAD, 1);
+-  curl_easy_setopt_or_die(fh->write_conn, CURLOPT_INFILESIZE, -1);
+   curl_easy_setopt_or_die(fh->write_conn, CURLOPT_READFUNCTION, write_data_bg);
+   curl_easy_setopt_or_die(fh->write_conn, CURLOPT_READDATA, fh);
+   curl_easy_setopt_or_die(fh->write_conn, CURLOPT_LOW_SPEED_LIMIT, 1);
diff --git a/nixpkgs/pkgs/tools/filesystems/curlftpfs/suse-bug-955687.patch b/nixpkgs/pkgs/tools/filesystems/curlftpfs/suse-bug-955687.patch
new file mode 100644
index 000000000000..b198c586e0cb
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/curlftpfs/suse-bug-955687.patch
@@ -0,0 +1,11 @@
+--- a/ftpfs.c
++++ b/ftpfs.c
+@@ -614,6 +614,8 @@ static void free_ftpfs_file(struct ftpfs
+   sem_destroy(&fh->data_need);
+   sem_destroy(&fh->data_written);
+   sem_destroy(&fh->ready);
++  if (fh->buf.size) { buf_free(&fh->buf); }
++  if (fh->stream_buf.size) { buf_free(&fh->stream_buf); }
+   free(fh);
+ }
+ 
diff --git a/nixpkgs/pkgs/tools/filesystems/darling-dmg/default.nix b/nixpkgs/pkgs/tools/filesystems/darling-dmg/default.nix
new file mode 100644
index 000000000000..54d23e770db1
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/darling-dmg/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitHub, cmake, fuse, zlib, bzip2, openssl, libxml2, icu, lzfse, libiconv }:
+
+stdenv.mkDerivation rec {
+  pname = "darling-dmg";
+  version = "1.0.4+git20200427";
+
+  src = fetchFromGitHub {
+    owner = "darlinghq";
+    repo = "darling-dmg";
+    rev = "71cc76c792db30328663272788c0b64aca27fdb0";
+    sha256 = "08iphkxlmjddrxpbm13gxyqwcrd0k65z3l1944n4pccb6qbyj8gv";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ fuse openssl zlib bzip2 libxml2 icu lzfse ]
+    ++ lib.optionals stdenv.isDarwin [ libiconv ];
+
+  CXXFLAGS = [
+    "-DCOMPILE_WITH_LZFSE=1"
+    "-llzfse"
+  ];
+
+  meta = with lib; {
+    homepage = "https://www.darlinghq.org/";
+    description = "Darling lets you open macOS dmgs on Linux";
+    platforms = platforms.unix;
+    license = licenses.gpl3Only;
+    maintainers = with maintainers; [ Luflosi ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/davfs2/0001-umount_davfs-substitute-ps-command.patch b/nixpkgs/pkgs/tools/filesystems/davfs2/0001-umount_davfs-substitute-ps-command.patch
new file mode 100644
index 000000000000..3fbbc4c7d0fd
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/davfs2/0001-umount_davfs-substitute-ps-command.patch
@@ -0,0 +1,25 @@
+From 0cb1321c4cbb2978318ddad73c9ee6f2a19c55c8 Mon Sep 17 00:00:00 2001
+From: Florian Klink <flokli@flokli.de>
+Date: Sat, 11 Jan 2020 21:06:33 +0100
+Subject: [PATCH] umount_davfs: substitute ps command
+
+---
+ src/umount_davfs.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/umount_davfs.c b/src/umount_davfs.c
+index b7019c3..a278679 100644
+--- a/src/umount_davfs.c
++++ b/src/umount_davfs.c
+@@ -157,7 +157,7 @@ main(int argc, char *argv[])
+     }
+     fclose(file);
+ 
+-    char *ps_command = ne_concat("ps -p ", pid, NULL);
++    char *ps_command = ne_concat("@ps@ -p ", pid, NULL);
+     FILE *ps_in = popen(ps_command, "r");
+     if (!ps_in) {
+         error(0, 0,
+-- 
+2.24.1
+
diff --git a/nixpkgs/pkgs/tools/filesystems/davfs2/0002-Make-sure-that-the-setuid-wrapped-umount-is-invoked.patch b/nixpkgs/pkgs/tools/filesystems/davfs2/0002-Make-sure-that-the-setuid-wrapped-umount-is-invoked.patch
new file mode 100644
index 000000000000..0f8741ca28f3
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/davfs2/0002-Make-sure-that-the-setuid-wrapped-umount-is-invoked.patch
@@ -0,0 +1,26 @@
+diff --git a/src/dav_fuse.c b/src/dav_fuse.c
+index 6311428..1b1698d 100644
+--- a/src/dav_fuse.c
++++ b/src/dav_fuse.c
+@@ -189,7 +189,7 @@ dav_fuse_loop(int device, char *mpoint, size_t bufsize, time_t idle_time,
+             pid_t pid = fork();
+             if (pid == 0) {
+ #if defined(__linux__)
+-                execl("/bin/umount", "umount", "-il", mountpoint, NULL);
++                execl("@wrapperDir@/umount", "umount", "-il", mountpoint, NULL);
+ #elif defined(__FreeBSD__)
+                 execl("/sbin/umount", "umount", "-v", mountpoint, NULL);
+ #endif
+diff --git a/src/umount_davfs.c b/src/umount_davfs.c
+index 6a82fd2..93958be 100644
+--- a/src/umount_davfs.c
++++ b/src/umount_davfs.c
+@@ -50,7 +50,7 @@
+ #endif
+ 
+ #if defined(__linux__)
+-#define UMOUNT_CMD "umount -i"
++#define UMOUNT_CMD "@wrapperDir@/umount -i"
+ #elif defined(__FreeBSD__)
+ #define UMOUNT_CMD "umount"
+ #endif
diff --git a/nixpkgs/pkgs/tools/filesystems/davfs2/default.nix b/nixpkgs/pkgs/tools/filesystems/davfs2/default.nix
new file mode 100644
index 000000000000..a64812e96b9c
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/davfs2/default.nix
@@ -0,0 +1,62 @@
+{ lib, stdenv
+, fetchurl
+, autoreconfHook
+, neon
+, procps
+, substituteAll
+, zlib
+, wrapperDir ? "/run/wrappers/bin"
+}:
+
+stdenv.mkDerivation rec {
+  pname = "davfs2";
+  version = "1.7.0";
+
+  src = fetchurl {
+    url = "mirror://savannah/davfs2/davfs2-${version}.tar.gz";
+    sha256 = "sha256-JR23Wic4DMoTMLG5cXAMXl3MDJDlpHYiKF8BQO3+Oi8=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+  ];
+
+  buildInputs = [
+    zlib
+  ];
+
+  patches = [
+    ./fix-sysconfdir.patch
+    ./disable-suid.patch
+    (substituteAll {
+      src = ./0001-umount_davfs-substitute-ps-command.patch;
+      ps = "${procps}/bin/ps";
+    })
+    (substituteAll {
+      src = ./0002-Make-sure-that-the-setuid-wrapped-umount-is-invoked.patch;
+      inherit wrapperDir;
+    })
+  ];
+
+  configureFlags = [
+    "--sysconfdir=/etc"
+    "--with-neon=${lib.getLib neon}"
+  ];
+
+  meta = {
+    homepage = "https://savannah.nongnu.org/projects/davfs2";
+    description = "Mount WebDAV shares like a typical filesystem";
+    license = lib.licenses.gpl3Plus;
+
+    longDescription = ''
+      Web Distributed Authoring and Versioning (WebDAV), an extension to
+      the HTTP-protocol, allows authoring of resources on a remote web
+      server. davfs2 provides the ability to access such resources like
+      a typical filesystem, allowing for use by standard applications
+      with no built-in support for WebDAV.
+    '';
+
+    platforms = lib.platforms.linux;
+    maintainers = with lib.maintainers; [ fgaz ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/davfs2/disable-suid.patch b/nixpkgs/pkgs/tools/filesystems/davfs2/disable-suid.patch
new file mode 100644
index 000000000000..074e08d157cd
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/davfs2/disable-suid.patch
@@ -0,0 +1,9 @@
+diff --git a/src/Makefile.am b/src/Makefile.am
+index bbde353..bcbed04 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -54,4 +54,3 @@ LIBS += @LIBICONV@
+ endif
+ 
+ install-exec-hook:
+-	chmod u+s $(DESTDIR)$(sbindir)/mount.davfs;
diff --git a/nixpkgs/pkgs/tools/filesystems/davfs2/fix-sysconfdir.patch b/nixpkgs/pkgs/tools/filesystems/davfs2/fix-sysconfdir.patch
new file mode 100644
index 000000000000..7094a93a9f1a
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/davfs2/fix-sysconfdir.patch
@@ -0,0 +1,30 @@
+diff --git a/etc/Makefile.am b/etc/Makefile.am
+index 5a01282..6a40921 100644
+--- a/etc/Makefile.am
++++ b/etc/Makefile.am
+@@ -24,17 +24,17 @@ pkgsysconfdir = $(sysconfdir)/@PACKAGE@
+ 
+ install-data-local: $(dist_pkgdata_DATA)
+ 	@$(NORMAL_INSTALL)
+-	$(mkinstalldirs) $(DESTDIR)$(pkgsysconfdir)
+-	$(INSTALL_DATA) -b $(srcdir)/davfs2.conf $(DESTDIR)$(pkgsysconfdir)/davfs2.conf
+-	$(INSTALL_DATA) -b -m 600 $(srcdir)/secrets $(DESTDIR)$(pkgsysconfdir)/secrets
+-	$(mkinstalldirs) $(DESTDIR)$(pkgsysconfdir)/certs
+-	$(mkinstalldirs) $(DESTDIR)$(pkgsysconfdir)/certs/private
+-	chmod 700 $(DESTDIR)$(pkgsysconfdir)/certs/private
++	$(mkinstalldirs) $(out)$(pkgsysconfdir)
++	$(INSTALL_DATA) -b $(srcdir)/davfs2.conf $(out)$(pkgsysconfdir)/davfs2.conf
++	$(INSTALL_DATA) -b -m 600 $(srcdir)/secrets $(out)$(pkgsysconfdir)/secrets
++	$(mkinstalldirs) $(out)$(pkgsysconfdir)/certs
++	$(mkinstalldirs) $(out)$(pkgsysconfdir)/certs/private
++	chmod 700 $(out)$(pkgsysconfdir)/certs/private
+ 
+ uninstall-local:
+ 	@$(NORMAL_UNINSTALL)
+ 	@list='$(dist_pkgdata_DATA)'; for p in $$list; do \
+ 	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+-	  echo " rm -f $(DESTDIR)$(pkgsysconfdir)/$$f"; \
+-	  rm -f $(DESTDIR)$(pkgsysconfdir)/$$f; \
++	  echo " rm -f $(out)$(pkgsysconfdir)/$$f"; \
++	  rm -f $(out)$(pkgsysconfdir)/$$f; \
+ 	done
diff --git a/nixpkgs/pkgs/tools/filesystems/davfs2/isdir.patch b/nixpkgs/pkgs/tools/filesystems/davfs2/isdir.patch
new file mode 100644
index 000000000000..ae69b4460f5a
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/davfs2/isdir.patch
@@ -0,0 +1,30 @@
+diff -ur davfs2-1.4.5-old/src/dav_coda.c davfs2-1.4.5-new/src/dav_coda.c
+--- davfs2-1.4.5-old/src/dav_coda.c	2009-06-04 20:30:32.000000000 +0200
++++ davfs2-1.4.5-new/src/dav_coda.c	2011-02-09 19:51:22.260530572 +0100
+@@ -52,6 +52,10 @@
+ #ifdef HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
++#ifdef HAVE_SYS_STAT_H
++#include <sys/stat.h>
++#endif
++
+ 
+ #include "defaults.h"
+ #include "mount_davfs.h"
+diff -ur davfs2-1.4.5-old/src/dav_fuse.c davfs2-1.4.5-new/src/dav_fuse.c
+--- davfs2-1.4.5-old/src/dav_fuse.c	2009-06-30 20:06:44.000000000 +0200
++++ davfs2-1.4.5-new/src/dav_fuse.c	2011-02-09 19:52:23.938220524 +0100
+@@ -41,6 +41,12 @@
+ #ifdef HAVE_UNISTD_H
+ #include <unistd.h>
+ #endif
++#ifdef HAVE_SYS_TYPES_H
++#include <sys/types.h>
++#endif
++#ifdef HAVE_SYS_STAT_H
++#include <sys/stat.h>
++#endif
+ 
+ #include "defaults.h"
+ #include "mount_davfs.h"
diff --git a/nixpkgs/pkgs/tools/filesystems/dduper/default.nix b/nixpkgs/pkgs/tools/filesystems/dduper/default.nix
new file mode 100644
index 000000000000..efdb9f3dc1d6
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/dduper/default.nix
@@ -0,0 +1,50 @@
+{ lib, stdenv, fetchpatch, fetchFromGitHub, btrfs-progs, python3 }:
+
+let
+  btrfsProgsPatched = btrfs-progs.overrideAttrs {
+    patches = [
+      (fetchpatch {
+        name = "0001-Print-csum-for-a-given-file-on-stdout.patch";
+        url = "https://raw.githubusercontent.com/Lakshmipathi/dduper/ecc2664c380616ec75cfc1e600b5514cdff5c687/patch/btrfs-progs-v6.1/0001-Print-csum-for-a-given-file-on-stdout.patch";
+        sha256 = "sha256-M4LT7G6gwBfSXf6EL4pxNoQJMyUTOA+ojxEJqw2yss4=";
+      })
+    ];
+  };
+  py3 = python3.withPackages (ps: with ps; [
+    prettytable
+    numpy
+  ]);
+in
+stdenv.mkDerivation rec {
+  pname = "dduper";
+  version = "0.04";
+
+  src = fetchFromGitHub {
+    owner = "lakshmipathi";
+    repo = "dduper";
+    rev = "v${version}";
+    sha256 = "09ncdawxkffldadqhfblqlkdl05q2qmywxyg6p61fv3dr2f2v5wm";
+  };
+
+  buildInputs = [
+    btrfsProgsPatched
+    py3
+  ];
+
+  patchPhase = ''
+    substituteInPlace ./dduper --replace "/usr/sbin/btrfs.static" "${btrfsProgsPatched}/bin/btrfs"
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    install -m755 ./dduper $out/bin
+  '';
+
+  meta = with lib; {
+    description = "Fast block-level out-of-band BTRFS deduplication tool.";
+    homepage = "https://github.com/Lakshmipathi/dduper";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ thesola10 ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/disk-inventory-x/default.nix b/nixpkgs/pkgs/tools/filesystems/disk-inventory-x/default.nix
new file mode 100644
index 000000000000..008781d4cd45
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/disk-inventory-x/default.nix
@@ -0,0 +1,35 @@
+{ lib
+, stdenvNoCC
+, fetchurl
+, undmg
+}:
+stdenvNoCC.mkDerivation (finalAttrs: {
+  pname = "disk-inventory-x";
+  version = "1.3";
+
+  src = fetchurl {
+    url = "https://www.derlien.com/diskinventoryx/downloads/Disk%20Inventory%20X%20${finalAttrs.version}.dmg";
+    sha256 = "1rfqp8ia6ficvqxynn43f1pba4rfmhf61kn2ihysbnjs8c33bbvq";
+  };
+  sourceRoot = ".";
+
+  nativeBuildInputs = [ undmg ];
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/Applications
+    cp -r *.app $out/Applications
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Disk usage utility for Mac OS X";
+    homepage = "https://www.derlien.com";
+    license = licenses.gpl3Plus;
+    sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
+    maintainers = with maintainers; [ emilytrau Enzime ];
+    platforms = [ "x86_64-darwin" ];
+  };
+})
diff --git a/nixpkgs/pkgs/tools/filesystems/dislocker/default.nix b/nixpkgs/pkgs/tools/filesystems/dislocker/default.nix
new file mode 100644
index 000000000000..396f8142ba93
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/dislocker/default.nix
@@ -0,0 +1,45 @@
+{ lib, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, pkg-config
+, mbedtls_2
+, fuse
+}:
+
+
+stdenv.mkDerivation rec {
+  pname = "dislocker";
+  version = "0.7.3";
+
+  src = fetchFromGitHub {
+    owner = "aorimn";
+    repo = "dislocker";
+    rev = "v${version}";
+    sha256 = "1ak68s1v5dwh8y2dy5zjybmrh0pnqralmyqzis67y21m87g47h2k";
+  };
+
+  patches = [
+    # This patch
+    #   1. adds support for the latest FUSE on macOS
+    #   2. uses pkg-config to find libfuse instead of searching in predetermined
+    #      paths
+    #
+    # https://github.com/Aorimn/dislocker/pull/246
+    (fetchpatch {
+      url = "https://github.com/Aorimn/dislocker/commit/7744f87c75fcfeeb414d0957771042b10fb64e62.diff";
+      sha256 = "0bpyccbbfjsidsrd2q9qylb95nvi8g3glb3jss7xmhywj86bhzr5";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [ fuse mbedtls_2 ];
+
+  meta = with lib; {
+    description = "Read BitLocker encrypted partitions in Linux";
+    homepage    = "https://github.com/aorimn/dislocker";
+    license     = licenses.gpl2;
+    maintainers = with maintainers; [ elitak ];
+    platforms   = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/disorderfs/default.nix b/nixpkgs/pkgs/tools/filesystems/disorderfs/default.nix
new file mode 100644
index 000000000000..27dc55fb9263
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/disorderfs/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchurl, pkg-config, fuse, attr, asciidoc }:
+
+stdenv.mkDerivation rec {
+  pname = "disorderfs";
+  version = "0.5.11";
+
+  src = fetchurl {
+    url = "http://http.debian.net/debian/pool/main/d/disorderfs/disorderfs_${version}.orig.tar.bz2";
+    sha256 = "sha256-KqAMKVUykCgVdNyjacZjpVXqVdeob76v0iOuSd4TNIY=";
+  };
+
+  nativeBuildInputs = [ pkg-config asciidoc ];
+
+  buildInputs = [ fuse attr ];
+
+  installFlags = [ "PREFIX=$(out)" ];
+
+  meta = with lib; {
+    description = "An overlay FUSE filesystem that introduces non-determinism into filesystem metadata";
+    license = licenses.gpl3;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ pSub ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/djmount/default.nix b/nixpkgs/pkgs/tools/filesystems/djmount/default.nix
new file mode 100644
index 000000000000..d3a75e420db9
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/djmount/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchurl, pkg-config, fuse }:
+
+stdenv.mkDerivation rec {
+  pname = "djmount";
+  version = "0.71";
+  src = fetchurl {
+    url = "mirror://sourceforge/djmount/${version}/${pname}-${version}.tar.gz";
+    sha256 = "0kqf0cy3h4cfiy5a2sigmisx0lvvsi1n0fbyb9ll5gacmy1b8nxa";
+  };
+
+  postPatch = ''
+    # Taken from https://github.com/pupnp/pupnp/pull/334/files
+    substituteInPlace libupnp/threadutil/inc/ithread.h \
+      --replace \
+        "#define ithread_mutexattr_setkind_np pthread_mutexattr_setkind_np" \
+        '#define ithread_mutexattr_setkind_np pthread_mutexattr_settype'
+  '';
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ fuse ];
+
+  # Workaround build failure on -fno-common toolchains like upstream
+  # gcc-10. Otherwise build fails as:
+  #   ld: libupnp/upnp/.libs/libupnp.a(libupnp_la-gena_ctrlpt.o):libupnp/upnp/src/inc/upnpapi.h:163:
+  #     multiple definition of `pVirtualDirList'; libupnp/upnp/.libs/libupnp.a(libupnp_la-upnpapi.o):libupnp/upnp/src/inc/upnpapi.h:163: first defined here
+  env.NIX_CFLAGS_COMPILE = "-fcommon";
+
+  meta = {
+    homepage = "https://djmount.sourceforge.net/";
+    description = "UPnP AV client, mounts as a Linux filesystem the media content of compatible UPnP AV devices";
+    platforms = lib.platforms.linux;
+    maintainers = [ lib.maintainers.jagajaga ];
+    license = lib.licenses.gpl2;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/dosfstools/default.nix b/nixpkgs/pkgs/tools/filesystems/dosfstools/default.nix
new file mode 100644
index 000000000000..eda54d341f9a
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/dosfstools/default.nix
@@ -0,0 +1,54 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, pkg-config, libiconv, gettext, xxd }:
+
+stdenv.mkDerivation rec {
+  pname = "dosfstools";
+  version = "4.2";
+
+  src = fetchFromGitHub {
+    owner = "dosfstools";
+    repo = "dosfstools";
+    rev = "v${version}";
+    sha256 = "sha256-2gxB0lQixiHOHw8uTetHekaM57fvUd9zOzSxWnvUz/c=";
+  };
+
+  patches = [
+    # macOS and FreeBSD build fixes backported from master
+    # TODO: remove on the next release
+    (fetchpatch {
+      url = "https://github.com/dosfstools/dosfstools/commit/77ffb87e8272760b3bb2dec8f722103b0effb801.patch";
+      sha256 = "sha256-xHxIs3faHK/sK3vAVoG8JcTe4zAV+ZtkozWIIFBvPWI=";
+    })
+    (fetchpatch {
+      url = "https://github.com/dosfstools/dosfstools/commit/2d3125c4a74895eae1f66b93287031d340324524.patch";
+      sha256 = "nlIuRDsNjk23MKZL9cZ05odOfTXvsyQaKcv/xEr4c+U=";
+    })
+    # reproducible builds fix backported from master
+    # (respect SOURCE_DATE_EPOCH)
+    # TODO: remove on the next release
+    (fetchpatch {
+      url = "https://github.com/dosfstools/dosfstools/commit/8da7bc93315cb0c32ad868f17808468b81fa76ec.patch";
+      sha256 = "sha256-Quegj5uYZgACgjSZef6cjrWQ64SToGQxbxyqCdl8C7o=";
+    })
+  ];
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ]
+    ++ lib.optional stdenv.isDarwin libiconv;
+
+  # configure.ac:75: error: required file './config.rpath' not found
+  # https://github.com/dosfstools/dosfstools/blob/master/autogen.sh
+  postPatch = ''
+    cp ${gettext}/share/gettext/config.rpath config.rpath
+  '';
+
+  configureFlags = [ "--enable-compat-symlinks" ];
+
+  nativeCheckInputs = [ xxd ];
+  doCheck = true;
+
+  meta = {
+    description = "Utilities for creating and checking FAT and VFAT file systems";
+    homepage = "https://github.com/dosfstools/dosfstools";
+    platforms = lib.platforms.unix;
+    license = lib.licenses.gpl3;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/duff/default.nix b/nixpkgs/pkgs/tools/filesystems/duff/default.nix
new file mode 100644
index 000000000000..f980c7613332
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/duff/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, gettext }:
+
+stdenv.mkDerivation {
+  pname = "duff";
+  # The last release (0.5.2) is more than 2 years old and lacks features like -D,
+  # limiting its usefulness. Upstream appears comatose if not dead.
+  version = "2014-07-03";
+
+  src = fetchFromGitHub {
+    sha256 = "1k2dx38pjzc5d624vw1cs5ipj9fprsm5vqv55agksc29m63lswnx";
+    rev = "f26d4837768b062a3f98fa075c791d9c8a0bb75c";
+    repo = "duff";
+    owner = "elmindreda";
+  };
+
+  nativeBuildInputs = [ autoreconfHook gettext ];
+
+  preAutoreconf = ''
+    # gettexttize rightly refuses to run non-interactively:
+    cp ${gettext}/bin/gettextize .
+    substituteInPlace gettextize \
+      --replace "read dummy" "echo '(Automatically acknowledged)' #"
+    ./gettextize
+    sed 's@po/Makefile.in\( .*\)po/Makefile.in@po/Makefile.in \1@' \
+      -i configure.ac
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Quickly find duplicate files";
+    longDescription = ''
+      Duff is a Unix command-line utility for quickly finding duplicates in
+      a given set of files.
+    '';
+    homepage = "https://duff.dreda.org/";
+    license = licenses.zlib;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/dupe-krill/Cargo.lock b/nixpkgs/pkgs/tools/filesystems/dupe-krill/Cargo.lock
new file mode 100644
index 000000000000..98c3d7157a1a
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/dupe-krill/Cargo.lock
@@ -0,0 +1,339 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "arrayref"
+version = "0.3.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544"
+
+[[package]]
+name = "arrayvec"
+version = "0.7.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6"
+
+[[package]]
+name = "autocfg"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
+
+[[package]]
+name = "bitflags"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
+
+[[package]]
+name = "blake3"
+version = "1.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a08e53fc5a564bb15bfe6fae56bd71522205f1f91893f9c0116edad6496c183f"
+dependencies = [
+ "arrayref",
+ "arrayvec",
+ "cc",
+ "cfg-if",
+ "constant_time_eq",
+ "digest",
+]
+
+[[package]]
+name = "block-buffer"
+version = "0.10.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "cc"
+version = "1.0.73"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11"
+
+[[package]]
+name = "cfg-if"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+
+[[package]]
+name = "constant_time_eq"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc"
+
+[[package]]
+name = "crypto-common"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
+dependencies = [
+ "generic-array",
+ "typenum",
+]
+
+[[package]]
+name = "ctrlc"
+version = "3.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1d91974fbbe88ec1df0c24a4f00f99583667a7e2e6272b2b92d294d81e462173"
+dependencies = [
+ "nix",
+ "winapi",
+]
+
+[[package]]
+name = "digest"
+version = "0.10.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "adfbc57365a37acbd2ebf2b64d7e69bb766e2fea813521ed536f5d0520dcf86c"
+dependencies = [
+ "block-buffer",
+ "crypto-common",
+ "subtle",
+]
+
+[[package]]
+name = "dupe-krill"
+version = "1.4.8"
+dependencies = [
+ "blake3",
+ "ctrlc",
+ "getopts",
+ "serde",
+ "serde_derive",
+ "serde_json",
+ "smallvec",
+ "tempdir",
+]
+
+[[package]]
+name = "fuchsia-cprng"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba"
+
+[[package]]
+name = "generic-array"
+version = "0.14.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9"
+dependencies = [
+ "typenum",
+ "version_check",
+]
+
+[[package]]
+name = "getopts"
+version = "0.2.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5"
+dependencies = [
+ "unicode-width",
+]
+
+[[package]]
+name = "itoa"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc"
+
+[[package]]
+name = "libc"
+version = "0.2.135"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "68783febc7782c6c5cb401fbda4de5a9898be1762314da0bb2c10ced61f18b0c"
+
+[[package]]
+name = "nix"
+version = "0.25.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e322c04a9e3440c327fca7b6c8a63e6890a32fa2ad689db972425f07e0d22abb"
+dependencies = [
+ "autocfg",
+ "bitflags",
+ "cfg-if",
+ "libc",
+]
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.47"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "rand"
+version = "0.4.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293"
+dependencies = [
+ "fuchsia-cprng",
+ "libc",
+ "rand_core 0.3.1",
+ "rdrand",
+ "winapi",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b"
+dependencies = [
+ "rand_core 0.4.2",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc"
+
+[[package]]
+name = "rdrand"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2"
+dependencies = [
+ "rand_core 0.3.1",
+]
+
+[[package]]
+name = "remove_dir_all"
+version = "0.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "ryu"
+version = "1.0.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09"
+
+[[package]]
+name = "serde"
+version = "1.0.145"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "728eb6351430bccb993660dfffc5a72f91ccc1295abaa8ce19b27ebe4f75568b"
+
+[[package]]
+name = "serde_derive"
+version = "1.0.145"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "81fa1584d3d1bcacd84c277a0dfe21f5b0f6accf4a23d04d4c6d61f1af522b4c"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "serde_json"
+version = "1.0.86"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "41feea4228a6f1cd09ec7a3593a682276702cd67b5273544757dae23c096f074"
+dependencies = [
+ "itoa",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "smallvec"
+version = "1.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0"
+
+[[package]]
+name = "subtle"
+version = "2.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601"
+
+[[package]]
+name = "syn"
+version = "1.0.102"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3fcd952facd492f9be3ef0d0b7032a6e442ee9b361d4acc2b1d0c4aaa5f613a1"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "tempdir"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8"
+dependencies = [
+ "rand",
+ "remove_dir_all",
+]
+
+[[package]]
+name = "typenum"
+version = "1.15.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987"
+
+[[package]]
+name = "unicode-ident"
+version = "1.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3"
+
+[[package]]
+name = "unicode-width"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b"
+
+[[package]]
+name = "version_check"
+version = "0.9.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
+
+[[package]]
+name = "winapi"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
+dependencies = [
+ "winapi-i686-pc-windows-gnu",
+ "winapi-x86_64-pc-windows-gnu",
+]
+
+[[package]]
+name = "winapi-i686-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+
+[[package]]
+name = "winapi-x86_64-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
diff --git a/nixpkgs/pkgs/tools/filesystems/dupe-krill/default.nix b/nixpkgs/pkgs/tools/filesystems/dupe-krill/default.nix
new file mode 100644
index 000000000000..d825c1b0fb09
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/dupe-krill/default.nix
@@ -0,0 +1,25 @@
+{ lib, fetchFromGitHub, rustPlatform }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "dupe-krill";
+  version = "1.4.8";
+
+  src = fetchFromGitHub {
+    owner = "kornelski";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-2fT9bw5LgJUQ0tm1T/vV5SaDjNH0OGKt7QUQLd7nmOs=";
+    postFetch = ''
+      cp ${./Cargo.lock} $out/Cargo.lock
+    '';
+  };
+
+  cargoSha256 = "sha256-JUcIDUVzSLzblb2EbmSfuCAB+S0fyW6wpGF0b/xR+b0=";
+
+  meta = with lib; {
+    description = " A fast file deduplicator.";
+    homepage = "https://github.com/kornelski/dupe-krill";
+    license = with licenses; [ mit ];
+    maintainers = with maintainers; [ urbas ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/duperemove/default.nix b/nixpkgs/pkgs/tools/filesystems/duperemove/default.nix
new file mode 100644
index 000000000000..fd2be83691a1
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/duperemove/default.nix
@@ -0,0 +1,62 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch2
+, libgcrypt
+, pkg-config
+, glib
+, linuxHeaders ? stdenv.cc.libc.linuxHeaders
+, sqlite
+, util-linux
+, testers
+, duperemove
+}:
+
+stdenv.mkDerivation rec {
+  pname = "duperemove";
+  version = "0.13";
+
+  src = fetchFromGitHub {
+    owner = "markfasheh";
+    repo = "duperemove";
+    rev = "v${version}";
+    hash = "sha256-D3+p8XgokKIHEwZnvOkn7cionVH1gsypcURF+PBpugY=";
+  };
+
+  patches = [
+    # Use variable instead of hardcoding pkg-config
+    # https://github.com/markfasheh/duperemove/pull/315
+    (fetchpatch2 {
+      url = "https://github.com/markfasheh/duperemove/commit/0e1c62d79a9a79d7bb3e80f1bd528dbf7cb75e22.patch";
+      hash = "sha256-YMMu6LCkBlipEJALukQMwIMcjQEAG5pjGEGeTW9OEJk=";
+    })
+  ];
+
+  postPatch = ''
+    substituteInPlace util.c --replace \
+      "lscpu" "${lib.getBin util-linux}/bin/lscpu"
+  '';
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ libgcrypt glib linuxHeaders sqlite ];
+
+  makeFlags = [
+    "PREFIX=${placeholder "out"}"
+    "VERSION=v${version}"
+  ];
+
+  passthru.tests.version = testers.testVersion {
+    package = duperemove;
+    command = "duperemove --version";
+    version = "v${version}";
+  };
+
+  meta = with lib; {
+    description = "A simple tool for finding duplicated extents and submitting them for deduplication";
+    homepage = "https://github.com/markfasheh/duperemove";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ bluescreen303 thoughtpolice ];
+    platforms = platforms.linux;
+    mainProgram = "duperemove";
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/dwarfs/default.nix b/nixpkgs/pkgs/tools/filesystems/dwarfs/default.nix
new file mode 100644
index 000000000000..e5804f378529
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/dwarfs/default.nix
@@ -0,0 +1,101 @@
+{ lib
+, fetchFromGitHub
+, stdenv
+, substituteAll
+
+, bison
+, boost
+, cmake
+, double-conversion
+, fmt
+, fuse3
+, glog
+, gtest
+, jemalloc
+, libarchive
+, libevent
+, libunwind
+, lz4
+, openssl
+, pkg-config
+, ronn
+, xxHash
+, utf8cpp
+, zstd
+}:
+
+stdenv.mkDerivation rec {
+  pname = "dwarfs";
+  version = "0.7.2";
+
+  src = fetchFromGitHub {
+    owner = "mhx";
+    repo = "dwarfs";
+    rev = "v${version}";
+    fetchSubmodules = true;
+    hash = "sha256-DcPRrATI2cpLZWAL+sSCoXvJ1R0O3yHqhlJW1aEpDpA=";
+  };
+
+  patches = [
+    (with lib.versions; substituteAll {
+      src = ./version_info.patch;
+
+      versionFull = version; # displayed as version number (with v prepended)
+      versionMajor = major version;
+      versionMinor = minor version;
+      versionPatch = patch version;
+    })
+  ];
+
+  cmakeFlags = [
+    "-DPREFER_SYSTEM_ZSTD=ON"
+    "-DPREFER_SYSTEM_XXHASH=ON"
+    "-DPREFER_SYSTEM_GTEST=ON"
+    "-DPREFER_SYSTEM_LIBFMT=ON"
+
+    # may be added under an option in the future
+    # "-DWITH_LEGACY_FUSE=ON"
+    "-DWITH_TESTS=ON"
+  ];
+
+  nativeBuildInputs = [
+    bison
+    cmake
+    pkg-config
+    ronn
+  ];
+
+  buildInputs = [
+    # dwarfs
+    boost
+    fmt
+    fuse3
+    jemalloc
+    libarchive
+    lz4
+    xxHash
+    utf8cpp
+    zstd
+
+    # folly
+    double-conversion
+    glog
+    libevent
+    libunwind
+    openssl
+  ];
+
+  doCheck = true;
+  nativeCheckInputs = [ gtest ];
+  # these fail inside of the sandbox due to missing access
+  # to the FUSE device
+  GTEST_FILTER = "-dwarfs/tools_test.end_to_end/*:dwarfs/tools_test.mutating_ops/*";
+
+  meta = with lib; {
+    description = "A fast high compression read-only file system";
+    homepage = "https://github.com/mhx/dwarfs";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ keksbg ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/dwarfs/version_info.patch b/nixpkgs/pkgs/tools/filesystems/dwarfs/version_info.patch
new file mode 100644
index 000000000000..8d62bd8d2295
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/dwarfs/version_info.patch
@@ -0,0 +1,58 @@
+diff --git a/cmake/package_version.cmake b/cmake/package_version.cmake
+new file mode 100644
+index 0000000..d4fdb9c
+--- /dev/null
++++ b/cmake/package_version.cmake
+@@ -0,0 +1,12 @@
++# autogenerated code, do not modify
++
++set(PRJ_GIT_REV "v@versionFull@")
++set(PRJ_GIT_DESC "v@versionFull@")
++set(PRJ_GIT_BRANCH "HEAD")
++set(PRJ_GIT_ID "v@versionFull@")
++set(PRJ_GIT_RELEASE_TAG "v@versionFull@")
++set(PRJ_VERSION_FULL "@versionFull@")
++set(PRJ_VERSION_SHORT "@versionFull@")
++set(PRJ_VERSION_MAJOR "@versionMajor@")
++set(PRJ_VERSION_MINOR "@versionMinor@")
++set(PRJ_VERSION_PATCH "@versionPatch@")
+diff --git a/include/dwarfs/version.h b/include/dwarfs/version.h
+new file mode 100644
+index 0000000..54cf86a
+--- /dev/null
++++ b/include/dwarfs/version.h
+@@ -0,0 +1,16 @@
++// autogenerated code, do not modify
++
++#pragma once
++
++#define PRJ_VERSION_MAJOR @versionMajor@
++#define PRJ_VERSION_MINOR @versionMinor@
++#define PRJ_VERSION_PATCH @versionPatch@
++
++namespace dwarfs {
++
++extern char const* PRJ_GIT_REV;
++extern char const* PRJ_GIT_DESC;
++extern char const* PRJ_GIT_BRANCH;
++extern char const* PRJ_GIT_ID;
++
++} // namespace dwarfs
+diff --git a/src/dwarfs/version.cpp b/src/dwarfs/version.cpp
+new file mode 100644
+index 0000000..5759120
+--- /dev/null
++++ b/src/dwarfs/version.cpp
+@@ -0,0 +1,12 @@
++// autogenerated code, do not modify
++
++#include "dwarfs/version.h"
++
++namespace dwarfs {
++
++char const* PRJ_GIT_REV = "@versionFull@";
++char const* PRJ_GIT_DESC = "v@versionFull@";
++char const* PRJ_GIT_BRANCH = "HEAD";
++char const* PRJ_GIT_ID = "v@versionFull@";
++
++} // namespace dwarfs
diff --git a/nixpkgs/pkgs/tools/filesystems/dysk/default.nix b/nixpkgs/pkgs/tools/filesystems/dysk/default.nix
new file mode 100644
index 000000000000..7ab7d544ab08
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/dysk/default.nix
@@ -0,0 +1,36 @@
+{ lib
+, rustPlatform
+, fetchFromGitHub
+, installShellFiles
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "dysk";
+  version = "2.8.2";
+
+  src = fetchFromGitHub {
+    owner = "Canop";
+    repo = "dysk";
+    rev = "v${version}";
+    hash = "sha256-h/vdc7ltlXJQi1f013+fNyYB6fc0hTUcx4LN6UySIGM=";
+  };
+
+  cargoHash = "sha256-LC7A+fu4SqfsxT3K9gYJPx8G9h+7kXq0Nq70iSlfygE=";
+
+  nativeBuildInputs = [
+    installShellFiles
+  ];
+
+  postInstall = ''
+    installManPage $releaseDir/build/*/out/dysk.1
+    installShellCompletion $releaseDir/build/*/out/{dysk.bash,dysk.fish,_dysk}
+  '';
+
+  meta = with lib; {
+    description = "Get information on your mounted disks";
+    homepage = "https://github.com/Canop/dysk";
+    changelog = "https://github.com/Canop/dysk/blob/${src.rev}/CHANGELOG.md";
+    license = licenses.mit;
+    maintainers = with maintainers; [ figsoda koral ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/e2fsprogs/default.nix b/nixpkgs/pkgs/tools/filesystems/e2fsprogs/default.nix
new file mode 100644
index 000000000000..fd4643025605
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/e2fsprogs/default.nix
@@ -0,0 +1,95 @@
+{ lib, stdenv, buildPackages, fetchurl, fetchpatch, pkg-config, libuuid, gettext, texinfo
+, fuse
+, shared ? !stdenv.hostPlatform.isStatic
+, e2fsprogs, runCommand
+}:
+
+stdenv.mkDerivation rec {
+  pname = "e2fsprogs";
+  version = "1.47.0";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz";
+    hash = "sha256-Zmev3lbu8MavJmhJdEAOTSKI6knpRBv15iKRldUaNXg=";
+  };
+
+  # fuse2fs adds 14mb of dependencies
+  outputs = [ "bin" "dev" "out" "man" "info" ]
+    ++ lib.optionals stdenv.isLinux [ "fuse2fs" ];
+
+  depsBuildBuild = [ buildPackages.stdenv.cc ];
+  nativeBuildInputs = [ pkg-config texinfo ];
+  buildInputs = [ libuuid gettext ]
+    ++ lib.optionals stdenv.isLinux [ fuse ];
+
+  patches = [
+    (fetchpatch { # avoid using missing __GNUC_PREREQ(X,Y)
+      url = "https://raw.githubusercontent.com/void-linux/void-packages/9583597eb3e6e6b33f61dbc615d511ce030bc443/srcpkgs/e2fsprogs/patches/fix-glibcism.patch";
+      sha256 = "1gfcsr0i3q8q2f0lqza8na0iy4l4p3cbii51ds6zmj0y4hz2dwhb";
+      excludes = [ "lib/ext2fs/hashmap.h" ];
+      extraPrefix = "";
+    })
+    # Avoid trouble with older systems like NixOS 23.05.
+    # TODO: most likely drop this at some point, e.g. when 23.05 loses support.
+    (fetchurl {
+      name = "mke2fs-avoid-incompatible-features.patch";
+      url = "https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git/plain/debian/patches/disable-metadata_csum_seed-and-orphan_file-by-default?h=debian/master&id=3fb3d18baba90e5d48d94f4c0b79b2d271b0c913";
+      hash = "sha256-YD11K4s2bqv0rvzrxtaiodzLp3ztULlOlPUf1XcpxRY=";
+    })
+  ];
+
+  configureFlags =
+    if stdenv.isLinux then [
+      # It seems that the e2fsprogs is one of the few packages that cannot be
+      # build with shared and static libs.
+      (if shared then "--enable-elf-shlibs" else "--disable-elf-shlibs")
+      "--enable-symlink-install"
+      "--enable-relative-symlinks"
+      "--with-crond-dir=no"
+      # fsck, libblkid, libuuid and uuidd are in util-linux-ng (the "libuuid" dependency)
+      "--disable-fsck"
+      "--disable-libblkid"
+      "--disable-libuuid"
+      "--disable-uuidd"
+    ] else [
+      "--enable-libuuid --disable-e2initrd-helper"
+    ];
+
+  nativeCheckInputs = [ buildPackages.perl ];
+  doCheck = true;
+
+  postInstall = ''
+    # avoid cycle between outputs
+    if [ -f $out/lib/${pname}/e2scrub_all_cron ]; then
+      mv $out/lib/${pname}/e2scrub_all_cron $bin/bin/
+    fi
+  '' + lib.optionalString stdenv.isLinux ''
+    mkdir -p $fuse2fs/bin
+    mv $bin/bin/fuse2fs $fuse2fs/bin/fuse2fs
+  '';
+
+  enableParallelBuilding = true;
+
+  passthru.tests = {
+    simple-filesystem = runCommand "e2fsprogs-create-fs" {} ''
+      mkdir -p $out
+      truncate -s10M $out/disc
+      ${e2fsprogs}/bin/mkfs.ext4 $out/disc | tee $out/success
+      ${e2fsprogs}/bin/e2fsck -n $out/disc | tee $out/success
+      [ -e $out/success ]
+    '';
+  };
+  meta = with lib; {
+    homepage = "https://e2fsprogs.sourceforge.net/";
+    changelog = "https://e2fsprogs.sourceforge.net/e2fsprogs-release.html#${version}";
+    description = "Tools for creating and checking ext2/ext3/ext4 filesystems";
+    license = with licenses; [
+      gpl2Plus
+      lgpl2Plus # lib/ext2fs, lib/e2p
+      bsd3      # lib/uuid
+      mit       # lib/et, lib/ss
+    ];
+    platforms = platforms.unix;
+    maintainers = [ maintainers.eelco ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/e2tools/default.nix b/nixpkgs/pkgs/tools/filesystems/e2tools/default.nix
new file mode 100644
index 000000000000..d448b0f67b5f
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/e2tools/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, e2fsprogs }:
+
+stdenv.mkDerivation rec {
+  pname = "e2tools";
+  version = "0.1.0";
+
+  src = fetchFromGitHub {
+    owner = "e2tools";
+    repo = "e2tools";
+    rev = "6ee7c2d9015dce7b90c3388096602e307e3bd790";
+    sha256 = "0nlqynrhj6ww7bnfhhfcx6bawii8iyvhgp6vz60zbnpgd68ifcx7";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = [ e2fsprogs ];
+
+  enableParallelBuilding = true;
+
+  meta = {
+    homepage = "https://e2tools.github.io/";
+    description = "Utilities to read/write/manipulate files in an ext2/ext3 filesystem";
+    license = lib.licenses.gpl2;
+    platforms = lib.platforms.linux;
+    maintainers = [ lib.maintainers.leenaars ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/eiciel/default.nix b/nixpkgs/pkgs/tools/filesystems/eiciel/default.nix
new file mode 100644
index 000000000000..dff1700d73fc
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/eiciel/default.nix
@@ -0,0 +1,56 @@
+{ lib
+, fetchFromGitHub
+, stdenv
+, acl
+, gnome
+, glibmm_2_68
+, gtkmm4
+, meson
+, ninja
+, pkg-config
+, itstool
+, wrapGAppsHook4
+, gtk4
+}:
+
+stdenv.mkDerivation rec {
+  pname = "eiciel";
+  version = "0.10.0";
+
+  outputs = [ "out" "nautilusExtension" ];
+
+  src = fetchFromGitHub {
+    owner = "rofirrim";
+    repo = "eiciel";
+    rev = version;
+    sha256 = "0lhnrxhbg80pqjy9f8yiqi7x48rb6m2cmkffv25ssjynsmdnar0s";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    itstool
+    wrapGAppsHook4
+    gtk4
+  ];
+
+  buildInputs = [
+    acl
+    glibmm_2_68
+    gtkmm4
+    gnome.nautilus
+  ];
+
+  mesonFlags = [
+    "-Dnautilus-extension-dir=${placeholder "nautilusExtension"}/lib/nautilus/extensions-4"
+  ];
+
+  meta = with lib; {
+    description = "Graphical editor for ACLs and extended attributes";
+    homepage = "https://rofi.roger-ferrer.org/eiciel/";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ sersorrel ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/encfs/default.nix b/nixpkgs/pkgs/tools/filesystems/encfs/default.nix
new file mode 100644
index 000000000000..14701a615c01
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/encfs/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchFromGitHub
+, cmake, pkg-config, perl
+, gettext, fuse, openssl, tinyxml2
+}:
+
+stdenv.mkDerivation rec {
+  pname = "encfs";
+  version = "1.9.5";
+
+  src = fetchFromGitHub {
+    sha256 = "099rjb02knr6yz7przlnyj62ic0ag5ncs7vvcc36ikyqrmpqsdch";
+    rev = "v${version}";
+    repo = "encfs";
+    owner = "vgough";
+  };
+
+  buildInputs = [ gettext fuse openssl tinyxml2 ];
+  nativeBuildInputs = [ cmake pkg-config perl ];
+
+  cmakeFlags =
+    [ "-DUSE_INTERNAL_TINYXML=OFF"
+      "-DBUILD_SHARED_LIBS=ON"
+      "-DINSTALL_LIBENCFS=ON"
+    ];
+
+  meta = with lib; {
+    description = "An encrypted filesystem in user-space via FUSE";
+    homepage = "https://vgough.github.io/encfs";
+    license = with licenses; [ gpl3Plus lgpl3Plus ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/envfs/default.nix b/nixpkgs/pkgs/tools/filesystems/envfs/default.nix
new file mode 100644
index 000000000000..ceb6c0412e30
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/envfs/default.nix
@@ -0,0 +1,28 @@
+{ rustPlatform, lib, fetchFromGitHub, nixosTests }:
+rustPlatform.buildRustPackage rec {
+  pname = "envfs";
+  version = "1.0.1";
+  src = fetchFromGitHub {
+    owner = "Mic92";
+    repo = "envfs";
+    rev = version;
+    hash = "sha256-ttW1NUCtwnjAoiu7QgLGrlAB2PyY4oXm91LpWhbz8qk=";
+  };
+  cargoHash = "sha256-BgXKwKD6w/GraBQEq61D7S7m2Q9TnkXNFJEIgDYo9L4=";
+
+  passthru.tests = {
+    envfs = nixosTests.envfs;
+  };
+
+  postInstall = ''
+    ln -s envfs $out/bin/mount.envfs
+    ln -s envfs $out/bin/mount.fuse.envfs
+  '';
+  meta = with lib; {
+    description = "Fuse filesystem that returns symlinks to executables based on the PATH of the requesting process.";
+    homepage = "https://github.com/Mic92/envfs";
+    license = licenses.mit;
+    maintainers = with maintainers; [ mic92 ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/erofs-utils/default.nix b/nixpkgs/pkgs/tools/filesystems/erofs-utils/default.nix
new file mode 100644
index 000000000000..b57dcc4b3629
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/erofs-utils/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchurl, autoreconfHook, pkg-config, fuse, util-linux, lz4, zlib, libselinux
+, fuseSupport ? stdenv.isLinux
+, selinuxSupport ? false
+}:
+
+stdenv.mkDerivation rec {
+  pname = "erofs-utils";
+  version = "1.7.1";
+  outputs = [ "out" "man" ];
+
+  src = fetchurl {
+    url =
+      "https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git/snapshot/erofs-utils-${version}.tar.gz";
+    hash = "sha256-GWCD1j5eIx+1eZ586GqUS7ylZNqrzj3pIlqKyp3K/xU=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = [ util-linux lz4 zlib ]
+    ++ lib.optionals fuseSupport [ fuse ]
+    ++ lib.optionals selinuxSupport [ libselinux ];
+
+  configureFlags = [
+    "MAX_BLOCK_SIZE=4096"
+  ] ++ lib.optional fuseSupport "--enable-fuse"
+    ++ lib.optional selinuxSupport "--with-selinux";
+
+  meta = with lib; {
+    homepage = "https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git/about/";
+    description = "Userspace utilities for linux-erofs file system";
+    changelog = "https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git/tree/ChangeLog?h=v${version}";
+    license = with licenses; [ gpl2Plus ];
+    maintainers = with maintainers; [ ehmry nikstur ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/exfat/default.nix b/nixpkgs/pkgs/tools/filesystems/exfat/default.nix
new file mode 100644
index 000000000000..831f19c68f68
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/exfat/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, fuse }:
+
+stdenv.mkDerivation rec {
+  pname = "exfat";
+  version = "1.4.0";
+
+  src = fetchFromGitHub {
+    owner = "relan";
+    repo = "exfat";
+    rev = "v${version}";
+    sha256 = "sha256-5m8fiItEOO6piR132Gxq6SHOPN1rAFTuTVE+UI0V00k=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = [ fuse ];
+
+  meta = with lib; {
+    description = "Free exFAT file system implementation";
+    inherit (src.meta) homepage;
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ dywedir ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/exfatprogs/default.nix b/nixpkgs/pkgs/tools/filesystems/exfatprogs/default.nix
new file mode 100644
index 000000000000..dafdd2c830a9
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/exfatprogs/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, autoreconfHook, file }:
+
+stdenv.mkDerivation rec {
+  pname = "exfatprogs";
+  version = "1.2.2";
+
+  src = fetchFromGitHub {
+    owner = pname;
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-2j+N/H+Vdy3Q6Ie2gBGkNKtLjt19RDvm9HZMS5l3L5Y=";
+  };
+
+  nativeBuildInputs = [ pkg-config autoreconfHook file ];
+
+  meta = with lib; {
+    description = "exFAT filesystem userspace utilities";
+    homepage = "https://github.com/exfatprogs/exfatprogs";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ zane ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/ext4magic/default.nix b/nixpkgs/pkgs/tools/filesystems/ext4magic/default.nix
new file mode 100644
index 000000000000..ed9fa6df969b
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/ext4magic/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv, fetchurl, fetchpatch, file, libuuid, e2fsprogs, zlib, bzip2 }:
+
+stdenv.mkDerivation rec {
+  version = "0.3.2";
+  pname = "ext4magic";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/ext4magic/${pname}-${version}.tar.gz";
+    sha256 = "8d9c6a594f212aecf4eb5410d277caeaea3adc03d35378257dfd017ef20ea115";
+  };
+
+  patches = [
+    (fetchpatch {
+        url = "https://sourceforge.net/p/ext4magic/tickets/10/attachment/ext4magic-0.3.2-i_dir_acl.patch";
+        sha256 = "1accydd8kigid68yir2fbihm3r3x8ws3iyznp25snkx41w6y6x8c";
+    })
+    ./glibc-fix.patch
+  ];
+
+  buildInputs = [ file libuuid e2fsprogs zlib bzip2 ];
+  installFlags = [ "PREFIX=$(out)" ];
+
+  meta = with lib; {
+    description = "Recover / undelete files from ext3 or ext4 partitions";
+    longDescription = ''
+      ext4magic can recover/undelete files from ext3 or ext4 partitions
+      by retrieving file-information from the filesystem journal.
+
+      If the information in the journal are sufficient, ext4magic can
+      recover the most file types, with original filename, owner and group,
+      file mode bits and also the old atime/mtime stamps.
+
+      It's much more effective and works much better than extundelete.
+    '';
+    homepage = "https://ext4magic.sourceforge.net/ext4magic_en.html";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.rkoe ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/ext4magic/glibc-fix.patch b/nixpkgs/pkgs/tools/filesystems/ext4magic/glibc-fix.patch
new file mode 100644
index 000000000000..906609788939
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/ext4magic/glibc-fix.patch
@@ -0,0 +1,12 @@
+diff --git a/src/recover.c b/src/recover.c
+index 41b4aee..30b5d8f 100644
+--- a/src/recover.c
++++ b/src/recover.c
+@@ -24,6 +24,7 @@
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <utime.h>
++#include <sys/sysmacros.h>
+ 
+ #ifndef O_LARGEFILE
+ #define O_LARGEFILE 0
diff --git a/nixpkgs/pkgs/tools/filesystems/extundelete/default.nix b/nixpkgs/pkgs/tools/filesystems/extundelete/default.nix
new file mode 100644
index 000000000000..276f6139b794
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/extundelete/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchurl, e2fsprogs }:
+
+stdenv.mkDerivation {
+  version = "0.2.4";
+  pname = "extundelete";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/extundelete/extundelete-0.2.4.tar.bz2";
+    sha256 = "1x0r7ylxlp9lbj3d7sqf6j2a222dwy2nfpff05jd6mkh4ihxvyd1";
+  };
+
+  buildInputs = [ e2fsprogs ];
+
+  # inode field i_dir_acl was repurposed as i_size_high in e2fsprogs 1.44,
+  # breaking the build
+  patchPhase = ''
+    substituteInPlace src/insertionops.cc \
+      --replace "Directory ACL:" "High 32 bits of size:" \
+      --replace "inode.i_dir_acl" "inode.i_size_high"
+  '';
+
+  meta = with lib; {
+    description = "Utility that can recover deleted files from an ext3 or ext4 partition";
+    homepage = "https://extundelete.sourceforge.net/";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.domenkozar ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/f2fs-tools/default.nix b/nixpkgs/pkgs/tools/filesystems/f2fs-tools/default.nix
new file mode 100644
index 000000000000..c2af09857728
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/f2fs-tools/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchgit, autoreconfHook, libselinux, libuuid, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "f2fs-tools";
+  version = "1.16.0";
+
+  src = fetchgit {
+    url = "https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git";
+    rev = "refs/tags/v${version}";
+    sha256 = "sha256-zNG1F//+BTBzlEc6qNVixyuCB6PMZD5Kf8pVK0ePYiA=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = [ libselinux libuuid ];
+
+  patches = [ ./f2fs-tools-cross-fix.patch ];
+
+  meta = with lib; {
+    homepage = "https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git/";
+    description = "Userland tools for the f2fs filesystem";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ ehmry jagajaga ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/f2fs-tools/f2fs-tools-cross-fix.patch b/nixpkgs/pkgs/tools/filesystems/f2fs-tools/f2fs-tools-cross-fix.patch
new file mode 100644
index 000000000000..e01a97b0bc3c
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/f2fs-tools/f2fs-tools-cross-fix.patch
@@ -0,0 +1,29 @@
+diff --git a/configure.ac b/configure.ac
+index 9b0e872..0108219 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -20,14 +20,16 @@ AC_DEFINE([F2FS_MINOR_VERSION], m4_bpatsubst(f2fs_tools_version,
+ 				[\([0-9]*\).\([0-9]*\)\(\w\|\W\)*], [\2]),
+ 				[Minor version for f2fs-tools])
+ 
+-AS_IF([test -d .git],[
+-	AC_DEFINE([F2FS_TOOLS_DATE],
+-		"m4_bpatsubst(f2fs_tools_gitdate,
+-		[\([0-9-]*\)\(\w\|\W\)*], [\1])",
+-		[f2fs-tools date based on Git commits])],[
+-	AC_DEFINE([F2FS_TOOLS_DATE],
+-		"f2fs_tools_date",
+-		[f2fs-tools date based on Source releases])])
++dnl AS_IF([test -d .git],[
++dnl	AC_DEFINE([F2FS_TOOLS_DATE],
++dnl		"m4_bpatsubst(f2fs_tools_gitdate,
++dnl		[\([0-9-]*\)\(\w\|\W\)*], [\1])",
++dnl		[f2fs-tools date based on Git commits])],[
++dnl	AC_DEFINE([F2FS_TOOLS_DATE],
++dnl		"f2fs_tools_date",
++dnl		[f2fs-tools date based on Source releases])])
++
++AC_DEFINE([F2FS_TOOLS_DATE], "f2fs_tools_date", [f2fs-tools date based on Source releases])
+ 
+ AC_CONFIG_SRCDIR([config.h.in])
+ AC_CONFIG_HEADER([config.h])
diff --git a/nixpkgs/pkgs/tools/filesystems/f3/default.nix b/nixpkgs/pkgs/tools/filesystems/f3/default.nix
new file mode 100644
index 000000000000..ebdedd5b4aa3
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/f3/default.nix
@@ -0,0 +1,57 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, parted
+, systemd
+, argp-standalone
+}:
+
+stdenv.mkDerivation rec {
+  pname = "f3";
+  version = "8.0";
+
+  src = fetchFromGitHub {
+    owner = "AltraMayor";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "17l5vspfcgfbkqg7bakp3gql29yb05gzawm8n3im30ilzdr53678";
+  };
+
+  postPatch = ''
+    sed -i 's/-oroot -groot//' Makefile
+
+    for f in f3write.h2w log-f3wr; do
+     substituteInPlace $f \
+       --replace '$(dirname $0)' $out/bin
+    done
+  '';
+
+  buildInputs = lib.optionals stdenv.isLinux [ systemd parted ]
+    ++ lib.optionals stdenv.isDarwin [ argp-standalone ];
+
+  buildFlags = [
+    "all" # f3read, f3write
+  ]
+  ++ lib.optional stdenv.isLinux "extra"; # f3brew, f3fix, f3probe
+
+  installFlags = [
+    "PREFIX=${placeholder "out"}"
+  ];
+
+  installTargets = [
+    "install"
+  ]
+  ++ lib.optional stdenv.isLinux "install-extra";
+
+  postInstall = ''
+    install -Dm555 -t $out/bin f3write.h2w log-f3wr
+    install -Dm444 -t $out/share/doc/${pname} LICENSE README.rst
+  '';
+
+  meta = with lib; {
+    description = "Fight Flash Fraud";
+    homepage = "https://fight-flash-fraud.readthedocs.io/en/stable/";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ makefu evils ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/fatresize/default.nix b/nixpkgs/pkgs/tools/filesystems/fatresize/default.nix
new file mode 100644
index 000000000000..8f258a79f7de
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/fatresize/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchFromGitHub, parted, util-linux, pkg-config }:
+
+stdenv.mkDerivation rec {
+
+  version = "1.1.0";
+  pname = "fatresize";
+
+  src = fetchFromGitHub {
+    owner = "ya-mouse";
+    repo = "fatresize";
+    rev = "v${version}";
+    sha256 = "1vhz84kxfyl0q7mkqn68nvzzly0a4xgzv76m6db0bk7xyczv1qr2";
+  };
+
+  buildInputs = [ parted util-linux ];
+  nativeBuildInputs = [ pkg-config ];
+
+  propagatedBuildInputs = [ parted util-linux ];
+
+  meta = with lib; {
+    description = "The FAT16/FAT32 non-destructive resizer";
+    homepage = "https://github.com/ya-mouse/fatresize";
+    platforms = platforms.linux;
+    license = licenses.gpl3;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/fatsort/default.nix b/nixpkgs/pkgs/tools/filesystems/fatsort/default.nix
new file mode 100644
index 000000000000..ef7111dd72ff
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/fatsort/default.nix
@@ -0,0 +1,43 @@
+{ lib
+, stdenv
+, fetchurl
+, help2man
+, libiconv
+}:
+
+stdenv.mkDerivation rec {
+  version = "1.6.5.640";
+  pname = "fatsort";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/fatsort/${pname}-${version}.tar.xz";
+    sha256 = "sha256-Yw7OVtnrOlVSSvCuw6reeFQ2DrqUkXKmz7R2jLj75C4=";
+  };
+
+  buildInputs = [ help2man libiconv ];
+
+  makeFlags = [
+    "CC=${stdenv.cc.targetPrefix}cc"
+    "LD=${stdenv.cc.targetPrefix}cc"
+
+    "UNAME_O=${stdenv.hostPlatform.uname.system}"
+    "UNAME_S=${stdenv.hostPlatform.uname.system}"
+  ];
+
+  # make install target is broken (DESTDIR usage is insane)
+  # it's easier to just skip make and install manually
+  installPhase = ''
+    runHook preInstall
+    install -D -m 755 ./src/fatsort   $out/bin/fatsort
+    install -D -m 644 ./man/fatsort.1 $out/man/man1/fatsort.1
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    homepage = "http://fatsort.sourceforge.net/";
+    description = "Sorts FAT partition table, for devices that don't do sorting of files";
+    maintainers = [ maintainers.kovirobi ];
+    license = licenses.gpl2Plus;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/file-rename/default.nix b/nixpkgs/pkgs/tools/filesystems/file-rename/default.nix
new file mode 100644
index 000000000000..133f446f8a98
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/file-rename/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchurl, perl, perlPackages }:
+
+perlPackages.buildPerlPackage {
+  pname = "File-Rename";
+  version = "0.20";
+
+  src = fetchurl {
+    url = "mirror://cpan/authors/id/R/RM/RMBARKER/File-Rename-0.20.tar.gz";
+    sha256 = "1cf6xx2hiy1xalp35fh8g73j67r0w0g66jpcbc6971x9jbm7bvjy";
+  };
+
+  # Fix an incorrect platform test that misidentifies Darwin as Windows
+  postPatch = ''
+    substituteInPlace Makefile.PL \
+      --replace '/win/i' '/MSWin32/'
+  '';
+
+  postFixup = ''
+    substituteInPlace $out/bin/rename \
+      --replace "#!${perl}/bin/perl" "#!${perl}/bin/perl -I $out/${perl.libPrefix}"
+  '';
+
+  doCheck = !stdenv.isDarwin;
+
+  meta = with lib; {
+    description = "Perl extension for renaming multiple files";
+    license = licenses.artistic1;
+    maintainers = with maintainers; [ peterhoeg ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/fuse-7z-ng/default.nix b/nixpkgs/pkgs/tools/filesystems/fuse-7z-ng/default.nix
new file mode 100644
index 000000000000..dad5d2dd9e6c
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/fuse-7z-ng/default.nix
@@ -0,0 +1,48 @@
+{ lib, stdenv, fetchFromGitHub, fuse, p7zip, autoconf, automake, pkg-config, makeWrapper }:
+
+stdenv.mkDerivation rec {
+  pname = "fuse-7z-ng";
+  version = "unstable-2014-06-08";
+
+  src = fetchFromGitHub {
+    owner = "kedazo";
+    repo = pname;
+    rev = "eb5efb1f304c2b7bc2e0389ba06c9bf2ac4b932c";
+    sha256 = "17v1gcmg5q661b047zxjar735i4d3508dimw1x3z1pk4d1zjhp3x";
+  };
+  patches = [
+    # Drop unused pthread library. pthread_yield()
+    # fails the configure.
+    ./no-pthread.patch
+    # Zero-initialize unset fields of `struct fuse_operations` so that
+    # garbage values don't cause segfault.
+    # <https://github.com/kedazo/fuse-7z-ng/pull/8>
+    ./zero-init-fuse-operations.patch
+  ];
+
+  nativeBuildInputs = [ pkg-config makeWrapper autoconf automake ];
+  buildInputs = [ fuse ];
+
+  preConfigure = "./autogen.sh";
+
+  libs = lib.makeLibraryPath [ p7zip ]; # 'cause 7z.so is loaded manually
+  postInstall = ''
+    wrapProgram $out/bin/${pname} --suffix LD_LIBRARY_PATH : "${libs}/p7zip"
+
+    mkdir -p $out/share/doc/${pname}
+    cp TODO README NEWS COPYING ChangeLog AUTHORS $out/share/doc/${pname}/
+  '';
+
+  meta = with lib; {
+    inherit (src.meta) homepage;
+    description = "A FUSE-based filesystem that uses the p7zip library";
+    longDescription = ''
+      fuse-7z-ng is a FUSE file system that uses the p7zip
+      library to access all archive formats supported by 7-zip.
+
+      This project is a fork of fuse-7z ( https://gitorious.org/fuse-7z/fuse-7z ).
+    '';
+    platforms = platforms.linux;
+    license = licenses.gpl3Plus;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/fuse-7z-ng/no-pthread.patch b/nixpkgs/pkgs/tools/filesystems/fuse-7z-ng/no-pthread.patch
new file mode 100644
index 000000000000..193090defebc
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/fuse-7z-ng/no-pthread.patch
@@ -0,0 +1,11 @@
+pthread_yield() is not used by fuse-7z-ng, fails configure.
+--- a/configure.ac
++++ b/configure.ac
+@@ -25,7 +25,6 @@ AC_CHECK_HEADERS([fcntl.h stddef.h string.h unistd.h dlfcn.h dirent.h])
+ AC_CHECK_FUNCS([memset memmove])
+ AC_CHECK_FUNCS([sqrt])
+ 
+-AC_CHECK_LIB([pthread], [pthread_yield],,AC_MSG_ERROR([pthread library not found.]))
+ AC_CHECK_LIB([dl], [dlclose])
+ 
+ PKG_CHECK_MODULES([fuse], [fuse >= 2.8])
diff --git a/nixpkgs/pkgs/tools/filesystems/fuse-7z-ng/zero-init-fuse-operations.patch b/nixpkgs/pkgs/tools/filesystems/fuse-7z-ng/zero-init-fuse-operations.patch
new file mode 100644
index 000000000000..35acdaa04542
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/fuse-7z-ng/zero-init-fuse-operations.patch
@@ -0,0 +1,13 @@
+Zero-initialize unset fields of `struct fuse_operations`.
+<https://github.com/kedazo/fuse-7z-ng/pull/8>
+--- a/src/main.cpp
++++ b/src/main.cpp
+@@ -195,7 +195,7 @@ main (int argc, char **argv)
+         mkdir(param.mountpoint, 0750);
+     }
+ 
+-    struct fuse_operations fuse7z_oper;
++    struct fuse_operations fuse7z_oper = {0};
+     fuse7z_oper.init = fuse7z_init;
+     fuse7z_oper.destroy = fuse7z_destroy;
+     fuse7z_oper.readdir = fuse7z_readdir;
diff --git a/nixpkgs/pkgs/tools/filesystems/fuse-archive/default.nix b/nixpkgs/pkgs/tools/filesystems/fuse-archive/default.nix
new file mode 100644
index 000000000000..031232acbe38
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/fuse-archive/default.nix
@@ -0,0 +1,44 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fuse
+, libarchive
+, pkg-config
+}:
+
+stdenv.mkDerivation rec {
+  pname = "fuse-archive";
+  version = "0.1.14";
+
+  src = fetchFromGitHub {
+    owner = "google";
+    repo = "fuse-archive";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-l4tIK157Qo4m611etwMSk564+eC28x4RbmjX3J57/7Q=";
+  };
+
+  nativeBuildInputs = [
+    pkg-config
+  ];
+
+  buildInputs = [
+    fuse
+    libarchive
+  ];
+
+  env.NIX_CFLAGS_COMPILE = "-D_FILE_OFFSET_BITS=64";
+
+  makeFlags = [
+    "prefix=${placeholder "out"}"
+  ];
+
+  meta = with lib; {
+    description = "Serve an archive or a compressed file as a read-only FUSE file system";
+    homepage = "https://github.com/google/fuse-archive";
+    changelog = "https://github.com/google/fuse-archive/releases/tag/v${version}";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ icyrockcom ];
+  };
+
+  inherit (fuse.meta) platforms;
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/fuse-overlayfs/default.nix b/nixpkgs/pkgs/tools/filesystems/fuse-overlayfs/default.nix
new file mode 100644
index 000000000000..b417c9654292
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/fuse-overlayfs/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, fuse3, nixosTests }:
+
+stdenv.mkDerivation rec {
+  pname = "fuse-overlayfs";
+  version = "1.13";
+
+  src = fetchFromGitHub {
+    owner = "containers";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-ngpC1KtUsIJOfpJ9dSqZn9XhKkJSpp2/6RBz/RlZ+A0=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+
+  buildInputs = [ fuse3 ];
+
+  enableParallelBuilding = true;
+  strictDeps = true;
+
+  passthru.tests = { inherit (nixosTests) podman; };
+
+  meta = with lib; {
+    description = "FUSE implementation for overlayfs";
+    longDescription = "An implementation of overlay+shiftfs in FUSE for rootless containers.";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ ma9e ] ++ teams.podman.members;
+    platforms = platforms.linux;
+    inherit (src.meta) homepage;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/fuseiso/default.nix b/nixpkgs/pkgs/tools/filesystems/fuseiso/default.nix
new file mode 100644
index 000000000000..7e44e7c15f9c
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/fuseiso/default.nix
@@ -0,0 +1,55 @@
+{ lib, stdenv, fetchurl, fetchpatch, autoreconfHook, pkg-config, fuse, glib, zlib }:
+
+stdenv.mkDerivation rec {
+  pname = "fuseiso";
+  version = "20070708";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/project/fuseiso/fuseiso/${version}/fuseiso-${version}.tar.bz2";
+    sha256 = "127xql52dcdhmh7s5m9xc6q39jdlj3zhbjar1j821kb6gl3jw94b";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "00-support_large_iso.patch";
+      url = "https://sources.debian.net/data/main/f/fuseiso/${version}-3.2/debian/patches/00-support_large_iso.patch";
+      sha256 = "1lmclb1qwzz5f4wlq693g83bblwnjjl73qhgfxbsaac5hnn2shjw";
+    })
+    (fetchpatch {
+      name = "01-fix_typo.patch";
+      url = "https://sources.debian.net/data/main/f/fuseiso/${version}-3.2/debian/patches/01-fix_typo.patch";
+      sha256 = "14rpxp0yylzsgqv0r19l4wx1h5hvqp617gpv1yg0w48amr9drasa";
+    })
+    (fetchpatch {
+      name = "02-prevent-buffer-overflow_CVE-2015-8837.patch";
+      url = "https://sources.debian.net/data/main/f/fuseiso/${version}-3.2/debian/patches/02-prevent-buffer-overflow.patch";
+      sha256 = "1ls2pp3mh91pdb51qz1fsd8pwhbky6988bpd156bn7wgfxqzh8ig";
+    })
+    (fetchpatch {
+      name = "03-prevent-integer-overflow_CVE-2015-8836.patch";
+      url = "https://sources.debian.net/data/main/f/fuseiso/${version}-3.2/debian/patches/03-prevent-integer-overflow.patch";
+      sha256 = "100cw07fk4sa3hl7a1gk2hgz4qsxdw99y20r7wpidwwwzy463zcv";
+    })
+  ];
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+
+  buildInputs = [ fuse glib zlib ];
+
+  # after autoreconfHook, glib and zlib are not found, so force link against
+  # them
+  NIX_LDFLAGS = "-lglib-2.0 -lz";
+
+  enableParallelBuilding = true;
+
+  postInstall = ''
+    install -Dm444 -t $out/share/doc/${pname} NEWS README
+  '';
+
+  meta = with lib; {
+    description = "FUSE module to mount ISO filesystem images";
+    homepage = "https://sourceforge.net/projects/fuseiso";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/fwanalyzer/default.nix b/nixpkgs/pkgs/tools/filesystems/fwanalyzer/default.nix
new file mode 100644
index 000000000000..a0b1d2df1435
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/fwanalyzer/default.nix
@@ -0,0 +1,39 @@
+{ lib
+, buildGoModule
+, fetchFromGitHub
+, e2tools
+, makeWrapper
+, mtools
+}:
+
+buildGoModule rec {
+  pname = "fwanalyzer";
+  version = "1.4.4";
+
+  src = fetchFromGitHub {
+    owner = "cruise-automation";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-fcqtyfpxdjD+1GsYl05RSJaFDoLSYQDdWcQV6a+vNGA=";
+  };
+
+  vendorHash = "sha256-nLr12VQogr4nV9E/DJu2XTcgEi7GsOdOn/ZqVk7HS7I=";
+
+  subPackages = [ "cmd/${pname}" ];
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  postInstall = ''
+    wrapProgram "$out/bin/fwanalyzer" --prefix PATH : "${lib.makeBinPath [ e2tools mtools ]}"
+  '';
+
+  # The tests requires an additional setup (unpacking images, etc.)
+  doCheck = false;
+
+  meta = with lib; {
+    description = "Tool to analyze filesystem images";
+    homepage = "https://github.com/cruise-automation/fwanalyzer";
+    license = with licenses; [ asl20 ];
+    maintainers = with maintainers; [ fab ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/garage/default.nix b/nixpkgs/pkgs/tools/filesystems/garage/default.nix
new file mode 100644
index 000000000000..fe72905d0fbe
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/garage/default.nix
@@ -0,0 +1,108 @@
+{ lib
+, stdenv
+, rustPlatform
+, fetchFromGitea
+, fetchpatch
+, openssl
+, pkg-config
+, protobuf
+, cacert
+, Security
+, garage
+, nixosTests
+}:
+let
+  generic = { version, sha256, cargoSha256, eol ? false, broken ? false }: rustPlatform.buildRustPackage {
+    pname = "garage";
+    inherit version;
+
+    src = fetchFromGitea {
+      domain = "git.deuxfleurs.fr";
+      owner = "Deuxfleurs";
+      repo = "garage";
+      rev = "v${version}";
+      inherit sha256;
+    };
+
+    inherit cargoSha256;
+
+    nativeBuildInputs = [ protobuf pkg-config ];
+
+    buildInputs = [
+      openssl
+    ] ++ lib.optional stdenv.isDarwin Security;
+
+    checkInputs = [
+      cacert
+    ];
+
+    OPENSSL_NO_VENDOR = true;
+
+    # See https://git.deuxfleurs.fr/Deuxfleurs/garage/src/tag/v0.8.2/nix/compile.nix#L192-L198
+    # on version changes for checking if changes are required here
+    buildFeatures = [
+      "kubernetes-discovery"
+      "bundled-libs"
+      "sled"
+      "metrics"
+      "k2v"
+      "telemetry-otlp"
+      "lmdb"
+      "sqlite"
+      "consul-discovery"
+    ];
+
+    # To make integration tests pass, we include the optional k2v feature here,
+    # but in buildFeatures only for version 0.8+, where it's enabled by default.
+    # See: https://garagehq.deuxfleurs.fr/documentation/reference-manual/k2v/
+    checkFeatures = [
+      "k2v"
+      "kubernetes-discovery"
+      "bundled-libs"
+      "sled"
+      "lmdb"
+      "sqlite"
+    ];
+
+    passthru.tests = nixosTests.garage;
+
+    meta = {
+      description = "S3-compatible object store for small self-hosted geo-distributed deployments";
+      homepage = "https://garagehq.deuxfleurs.fr";
+      license = lib.licenses.agpl3Only;
+      maintainers = with lib.maintainers; [ nickcao _0x4A6F teutat3s raitobezarius ];
+      knownVulnerabilities = (lib.optional eol "Garage version ${version} is EOL");
+      inherit broken;
+    };
+  };
+in
+rec {
+  # Until Garage hits 1.0, 0.7.3 is equivalent to 7.3.0 for now, therefore
+  # we have to keep all the numbers in the version to handle major/minor/patch level.
+  # for <1.0.
+
+  garage_0_8_4 = generic {
+    version = "0.8.4";
+    sha256 = "sha256-YgMw41ofM59h7OnHK1H8+Se5mZEdYypPIdkqbyX9qfs=";
+    cargoSha256 = "sha256-dEtksOVqy5wAPoqCuXJj3c4TB6UbR8PTaB70fbL6iR8=";
+  };
+
+  garage_0_8 = garage_0_8_4;
+
+  garage_0_9_0 = (generic {
+    version = "0.9.0";
+    sha256 = "sha256-Bw7ohMAfnbkhl43k8KxYu2OJd5689PqDS0vAcgU09W8=";
+    cargoSha256 = "sha256-JqCt/8p24suQMRzEyTE2OkbzZCGUDLuGq32kCq3eZ7o=";
+  }).overrideAttrs (oldAttrs: {
+    patches = oldAttrs.patches or [ ] ++ [
+      (fetchpatch {
+        url = "https://git.deuxfleurs.fr/Deuxfleurs/garage/commit/c7f5dcd953ff1fdfa002a8bccfb43eafcc6fddd4.patch";
+        sha256 = "sha256-q7E6gtPjnj5O/K837LMP6LPEFcgdkifxRFrYzBuqkk0=";
+      })
+    ];
+  });
+
+  garage_0_9 = garage_0_9_0;
+
+  garage = garage_0_9;
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/gcsfuse/default.nix b/nixpkgs/pkgs/tools/filesystems/gcsfuse/default.nix
new file mode 100644
index 000000000000..b738c3097018
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/gcsfuse/default.nix
@@ -0,0 +1,47 @@
+{ lib
+, buildGoModule
+, fetchFromGitHub
+}:
+
+buildGoModule rec {
+  pname = "gcsfuse";
+  version = "1.2.0";
+
+  src = fetchFromGitHub {
+    owner = "googlecloudplatform";
+    repo = "gcsfuse";
+    rev = "v${version}";
+    hash = "sha256-tc3+OHDjsA2OC9YvuOXZMaysKot8O3+qNoymzF2PnwA=";
+  };
+
+  vendorHash = "sha256-9pVdoeRyhhxOX3jLZVlx+5eHfP5iu0x40wnpV0xq3Z0=";
+
+  subPackages = [ "." "tools/mount_gcsfuse" ];
+
+  ldflags = [ "-s" "-w" "-X main.gcsfuseVersion=${version}" ];
+
+  preCheck =
+    let
+      skippedTests = [
+        "Test_Main"
+        "TestFlags"
+      ];
+    in
+    ''
+      # Disable flaky tests
+      buildFlagsArray+=("-run" "[^(${builtins.concatStringsSep "|" skippedTests})]")
+    '';
+
+  postInstall = ''
+    ln -s $out/bin/mount_gcsfuse $out/bin/mount.gcsfuse
+    ln -s $out/bin/mount_gcsfuse $out/bin/mount.fuse.gcsfuse
+  '';
+
+  meta = with lib; {
+    description = "A user-space file system for interacting with Google Cloud Storage";
+    homepage = "https://cloud.google.com/storage/docs/gcs-fuse";
+    changelog = "https://github.com/GoogleCloudPlatform/gcsfuse/releases/tag/v${version}";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/genext2fs/default.nix b/nixpkgs/pkgs/tools/filesystems/genext2fs/default.nix
new file mode 100644
index 000000000000..ecd77781d39b
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/genext2fs/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, libarchive }:
+
+stdenv.mkDerivation rec {
+  pname = "genext2fs";
+  version = "1.5.0";
+
+  src = fetchFromGitHub {
+    owner = "bestouff";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-9LAU5XuCwwEhU985MzZ2X+YYibvyECULQSn9X2jdj5I=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+  buildInputs = [
+    libarchive
+  ];
+
+  configureFlags = [
+    "--enable-libarchive"
+  ];
+
+  doCheck = true;
+  checkPhase = ''
+    ./test.sh
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/bestouff/genext2fs";
+    description = "A tool to generate ext2 filesystem images without requiring root privileges";
+    license = licenses.gpl2;
+    platforms = platforms.all;
+    maintainers = [ maintainers.bjornfor ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/genimage/default.nix b/nixpkgs/pkgs/tools/filesystems/genimage/default.nix
new file mode 100644
index 000000000000..0961ad904f3f
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/genimage/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchurl, autoreconfHook, pkg-config, libconfuse, gettext }:
+
+stdenv.mkDerivation rec {
+  pname = "genimage";
+  version = "16";
+
+  src = fetchurl {
+    url = "https://public.pengutronix.de/software/genimage/genimage-${version}.tar.xz";
+    sha256 = "sha256-hp+WYtO3eMabHR/nDfZY4cnpCu2iart1P2/lXosMbnM=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = [ libconfuse gettext ];
+
+  postInstall = ''
+    # As there is no manpage or built-in --help, add the README file for
+    # documentation.
+    docdir="$out/share/doc/genimage"
+    mkdir -p "$docdir"
+    cp -v README.rst "$docdir"
+  '';
+
+  meta = with lib; {
+    broken = stdenv.isDarwin;
+    homepage = "https://git.pengutronix.de/cgit/genimage";
+    description = "Generate filesystem images from directory trees";
+    license = licenses.gpl2Plus;
+    platforms = platforms.all;
+    maintainers = [ maintainers.bjornfor ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/genromfs/default.nix b/nixpkgs/pkgs/tools/filesystems/genromfs/default.nix
new file mode 100644
index 000000000000..3427ce54a172
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/genromfs/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  version = "0.5.2";
+  pname = "genromfs";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/romfs/genromfs/${version}/${pname}-${version}.tar.gz";
+    sha256 = "0q6rpq7cmclmb4ayfyknvzbqysxs4fy8aiahlax1sb2p6k3pzwrh";
+  };
+
+  postPatch = ''
+    substituteInPlace Makefile \
+      --replace "prefix = /usr" "prefix = $out" \
+      --replace "gcc" "cc"
+  '';
+
+  meta = with lib; {
+    homepage = "https://romfs.sourceforge.net/";
+    description = "Tool for creating romfs file system images";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/gfs2-utils/default.nix b/nixpkgs/pkgs/tools/filesystems/gfs2-utils/default.nix
new file mode 100644
index 000000000000..6c33edbbfc92
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/gfs2-utils/default.nix
@@ -0,0 +1,46 @@
+{ lib, stdenv, fetchurl, fetchpatch
+, autoreconfHook, bison, flex, pkg-config
+, bzip2, check, ncurses, util-linux, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gfs2-utils";
+  version = "3.4.1";
+
+  src = fetchurl {
+    url = "https://pagure.io/gfs2-utils/archive/${version}/gfs2-utils-${version}.tar.gz";
+    sha256 = "sha256-gwKxBBG5PtG4/RxX4sUC25ZeG8K2urqVkFDKL7NS4ZI=";
+  };
+
+  patches = [
+    # pull pending upstream inclusion fix for ncurses-6.3: sent upstream over email.
+    (fetchpatch {
+      name = "ncurses-6.3.patch";
+      url = "https://pagure.io/fork/slyfox/gfs2-utils/c/c927b635f380cca77665195a3aaae804d92870a4.patch";
+      sha256 = "sha256-0M1xAqRXoUi2el03WODF/nqEe9JEE5GehMWs776QZNI=";
+    })
+  ];
+  postPatch = ''
+    # Apply fix for ncurses-6.3. Upstream development branch already reworked the code.
+    # To be removed on next reelase.
+    substituteInPlace gfs2/edit/gfs2hex.c --replace 'printw(title);' 'printw("%s",title);'
+  '';
+
+  outputs = [ "bin" "doc" "out" "man" ];
+
+  nativeBuildInputs = [ autoreconfHook bison flex pkg-config ];
+  buildInputs = [ bzip2 ncurses util-linux zlib ];
+
+  nativeCheckInputs = [ check ];
+  doCheck = true;
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "https://pagure.io/gfs2-utils";
+    description = "Tools for creating, checking and working with gfs2 filesystems";
+    maintainers = with maintainers; [ qyliss ];
+    license = [ licenses.gpl2Plus licenses.lgpl2Plus ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/gitfs/default.nix b/nixpkgs/pkgs/tools/filesystems/gitfs/default.nix
new file mode 100644
index 000000000000..f49f555983f3
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/gitfs/default.nix
@@ -0,0 +1,43 @@
+{ lib, fetchFromGitHub, python3Packages }:
+
+python3Packages.buildPythonApplication rec {
+  pname = "gitfs";
+  version = "0.5.2";
+
+  src = fetchFromGitHub {
+    owner = "PressLabs";
+    repo = "gitfs";
+    rev = version;
+    sha256 = "1jzwdwan8ndvp2lw6j7zbvg5k9rgf2d8dcxjrwc6bwyk59xdxn4p";
+  };
+
+  patchPhase = ''
+    # requirement checks are unnecessary at runtime
+    echo > requirements.txt
+
+    # NOTE: As of gitfs 0.5.2, The pygit2 release that upstream uses is a major
+    # version behind the one packaged in nixpkgs.
+    substituteInPlace gitfs/mounter.py --replace \
+      'from pygit2.remote import RemoteCallbacks' \
+      'from pygit2 import RemoteCallbacks'
+  '';
+
+  nativeCheckInputs = with python3Packages; [ pytest pytest-cov mock ];
+  propagatedBuildInputs = with python3Packages; [ atomiclong fusepy pygit2 six ];
+
+  checkPhase = "py.test";
+  doCheck = false;
+
+  meta = {
+    description = "A FUSE filesystem that fully integrates with git";
+    longDescription = ''
+      A git remote repository's branch can be mounted locally,
+      and any subsequent changes made to the files will be
+      automatically committed to the remote.
+    '';
+    homepage = "https://github.com/PressLabs/gitfs";
+    license = lib.licenses.asl20;
+    platforms = lib.platforms.unix;
+    maintainers = [ lib.maintainers.robbinch ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/glusterfs/default.nix b/nixpkgs/pkgs/tools/filesystems/glusterfs/default.nix
new file mode 100644
index 000000000000..f7e830f3211d
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/glusterfs/default.nix
@@ -0,0 +1,207 @@
+{lib, stdenv, fetchFromGitHub, fuse, bison, flex, openssl, python3, ncurses, readline,
+ autoconf, automake, libtool, pkg-config, zlib, libaio, libxml2, acl, sqlite,
+ liburcu, liburing, attr, makeWrapper, coreutils, gnused, gnugrep, which,
+ openssh, gawk, findutils, util-linux, lvm2, btrfs-progs, e2fsprogs, xfsprogs, systemd,
+ rsync, getent, rpcsvc-proto, libtirpc, gperftools, nixosTests
+}:
+let
+  # NOTE: On each glusterfs release, it should be checked if gluster added
+  #       new, or changed, Python scripts whose PYTHONPATH has to be set in
+  #       `postFixup` below, and whose runtime deps need to go into
+  #       `nativeBuildInputs`.
+  #       The command
+  #         find /nix/store/...-glusterfs-.../ -name '*.py' -executable
+  #       can help with finding new Python scripts.
+
+  buildInputs = [
+    fuse openssl ncurses readline
+    zlib libaio libxml2
+    acl sqlite liburcu attr util-linux libtirpc gperftools
+    liburing
+    (python3.withPackages (pkgs: [
+      pkgs.flask
+      pkgs.prettytable
+      pkgs.requests
+      pkgs.pyxattr
+    ]))
+    # NOTE: `python3` has to be *AFTER* the above `python3.withPackages`,
+    #       to ensure that the packages are available but the `toPythonPath`
+    #       shell function used in `postFixup` is also still available.
+    python3
+  ];
+  # Some of the headers reference acl
+  propagatedBuildInputs = [
+    acl
+  ];
+  # Packages from which GlusterFS calls binaries at run-time from PATH,
+  # with comments on which commands are known to be called by it.
+  runtimePATHdeps = [
+    attr # getfattr setfattr
+    btrfs-progs # btrfs
+    coreutils # lots of commands in bash scripts
+    e2fsprogs # tune2fs
+    findutils # find
+    gawk # awk
+    getent # getent
+    gnugrep # grep
+    gnused # sed
+    lvm2 # lvs
+    openssh # ssh
+    rsync # rsync, e.g. for geo-replication
+    systemd # systemctl
+    util-linux # mount umount
+    which # which
+    xfsprogs # xfs_info
+  ];
+in stdenv.mkDerivation rec {
+  pname = "glusterfs";
+  version = "11.1";
+
+  src = fetchFromGitHub {
+    owner = "gluster";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-ZClMfozeFO3266fkuCSV04QwpZaYa8B0uq2lTPEN2rQ=";
+  };
+  inherit buildInputs propagatedBuildInputs;
+
+  patches = [
+    # Upstream invokes `openssl version -d` to derive the canonical system path
+    # for certificates, which resolves to a nix store path, so this patch
+    # statically sets the configure.ac value. There's probably a less-brittle
+    # way to do this! (this will likely fail on a version bump)
+    # References:
+    # - https://github.com/gluster/glusterfs/issues/3234
+    # - https://github.com/gluster/glusterfs/commit/a7dc43f533ad4b8ff68bf57704fefc614da65493
+    ./ssl_cert_path.patch
+  ];
+
+  postPatch = ''
+    sed -e '/chmod u+s/d' -i contrib/fuse-util/Makefile.am
+    substituteInPlace libglusterfs/src/glusterfs/lvm-defaults.h \
+      --replace '/sbin/' '${lvm2}/bin/'
+    substituteInPlace libglusterfs/src/glusterfs/compat.h \
+      --replace '/bin/umount' '${util-linux}/bin/umount'
+    substituteInPlace contrib/fuse-lib/mount-gluster-compat.h \
+      --replace '/bin/mount' '${util-linux}/bin/mount'
+  '';
+
+  # Note that the VERSION file is something that is present in release tarballs
+  # but not in git tags (at least not as of writing in v3.10.1).
+  # That's why we have to create it.
+  # Without this, gluster (at least 3.10.1) will fail very late and cryptically,
+  # for example when setting up geo-replication, with a message like
+  #   Staging of operation 'Volume Geo-replication Create' failed on localhost : Unable to fetch master volume details. Please check the master cluster and master volume.
+  # What happens here is that the gverify.sh script tries to compare the versions,
+  # but fails when the version is empty.
+  # See upstream GlusterFS bug https://bugzilla.redhat.com/show_bug.cgi?id=1452705
+  preConfigure = ''
+    patchShebangs build-aux/pkg-version
+    echo "v${version}" > VERSION
+    ./autogen.sh
+    export PYTHON=${python3}/bin/python
+  '';
+
+  configureFlags = [
+    "--localstatedir=/var"
+  ];
+
+  nativeBuildInputs = [ autoconf automake libtool pkg-config bison flex makeWrapper rpcsvc-proto ];
+
+  makeFlags = [ "DESTDIR=$(out)" ];
+
+  enableParallelBuilding = true;
+
+  postInstall = ''
+    cp -r $out/$out/* $out
+    rm -r $out/nix
+  '';
+
+  postFixup = ''
+    # glusterd invokes `gluster` and other utilities when telling other glusterd nodes to run commands.
+    # For example for `peer_georep-sshkey` key generation, so `$out/bin` is needed in the PATH.
+    # It also invokes bash scripts like `gverify.sh`.
+    # It also invokes executable Python scripts in `$out/libexec/glusterfs`, which is why we set up PYTHONPATH accordingly.
+    # We set up the paths for the main entry point executables.
+
+    GLUSTER_PATH="${lib.makeBinPath runtimePATHdeps}:$out/bin"
+    GLUSTER_PYTHONPATH="$(toPythonPath $out):$out/libexec/glusterfs"
+    GLUSTER_LD_LIBRARY_PATH="$out/lib"
+
+    wrapProgram $out/bin/glusterd --set PATH "$GLUSTER_PATH" --set PYTHONPATH "$GLUSTER_PYTHONPATH" --set LD_LIBRARY_PATH "$GLUSTER_LD_LIBRARY_PATH"
+    wrapProgram $out/bin/gluster --set PATH "$GLUSTER_PATH" --set PYTHONPATH "$GLUSTER_PYTHONPATH" --set LD_LIBRARY_PATH "$GLUSTER_LD_LIBRARY_PATH"
+    wrapProgram $out/sbin/mount.glusterfs --set PATH "$GLUSTER_PATH" --set PYTHONPATH "$GLUSTER_PYTHONPATH" --set LD_LIBRARY_PATH "$GLUSTER_LD_LIBRARY_PATH"
+
+    # Set Python environment for the Python based utilities.
+    # It would be nice if there was a better way to do this, automatically for all of them.
+    # Also, this is brittle: If we forget a dependency or gluster adds a new one, things will break deep inside gluster.
+    # We should better try to get an explicit list of Python dependencies from gluster and ensure all of them are in the PYTHONPATH of all these python scripts.
+    # But at the time of writing (gluster 3.10), gluster only provides this in form of a gluster.spec file for RPM creation,
+    # and even that one is not complete (for example it doesn't mention the `flask` dependency).
+
+    wrapProgram $out/bin/gluster-eventsapi --set PATH "$GLUSTER_PATH" --set PYTHONPATH "$GLUSTER_PYTHONPATH" --set LD_LIBRARY_PATH "$GLUSTER_LD_LIBRARY_PATH"
+    wrapProgram $out/bin/gluster-georep-sshkey --set PATH "$GLUSTER_PATH" --set PYTHONPATH "$GLUSTER_PYTHONPATH" --set LD_LIBRARY_PATH "$GLUSTER_LD_LIBRARY_PATH"
+    wrapProgram $out/bin/gluster-mountbroker --set PATH "$GLUSTER_PATH" --set PYTHONPATH "$GLUSTER_PYTHONPATH" --set LD_LIBRARY_PATH "$GLUSTER_LD_LIBRARY_PATH"
+    wrapProgram $out/bin/glusterfind --set PATH "$GLUSTER_PATH" --set PYTHONPATH "$GLUSTER_PYTHONPATH" --set LD_LIBRARY_PATH "$GLUSTER_LD_LIBRARY_PATH"
+
+    # Note that we only wrap the symlinks in $out/bin, not the actual executable scripts in $out/libexec/glusterfs.
+    # This is because those scripts use `__file__` in their program logic
+    # (see https://github.com/gluster/glusterfs/blob/v3.10.1/extras/cliutils/cliutils.py#L116)
+    # which would break if we changed the file name (which is what `wrapProgram` does).
+    # Luckily, `libexec` scripts are never supposed to be invoked straight from PATH,
+    # instead they are invoked directly from `gluster` or `glusterd`, which is why it is
+    # sufficient to set PYTHONPATH for those executables.
+    #
+    # Exceptions to these rules are the `glusterfind` `brickfind.py` and `changelog.py`
+    # crawlers, which are directly invoked on other gluster nodes using a remote SSH command
+    # issues by `glusterfind`.
+
+    wrapProgram $out/share/glusterfs/scripts/eventsdash.py --set PATH "$GLUSTER_PATH" --set PYTHONPATH "$GLUSTER_PYTHONPATH" --set LD_LIBRARY_PATH "$GLUSTER_LD_LIBRARY_PATH"
+    wrapProgram $out/libexec/glusterfs/glusterfind/brickfind.py --set PATH "$GLUSTER_PATH" --set PYTHONPATH "$GLUSTER_PYTHONPATH" --set LD_LIBRARY_PATH "$GLUSTER_LD_LIBRARY_PATH"
+    wrapProgram $out/libexec/glusterfs/glusterfind/changelog.py --set PATH "$GLUSTER_PATH" --set PYTHONPATH "$GLUSTER_PYTHONPATH" --set LD_LIBRARY_PATH "$GLUSTER_LD_LIBRARY_PATH"
+  '';
+
+  doInstallCheck = true;
+
+  # Below we run Python programs. That generates .pyc/.pyo files.
+  # By default they are indeterministic because such files contain time stamps
+  # (see https://nedbatchelder.com/blog/200804/the_structure_of_pyc_files.html).
+  # So we use the same environment variables as in
+  #   https://github.com/NixOS/nixpkgs/blob/249b34aadca7038207492f29142a3456d0cecec3/pkgs/development/interpreters/python/mk-python-derivation.nix#L61
+  # to make these files deterministic.
+  # A general solution to this problem might be brought by #25707.
+  DETERMINISTIC_BUILD = 1;
+  PYTHONHASHSEED = 0;
+
+  installCheckPhase = ''
+    # Tests that the above programs work without import errors.
+    # For testing it manually in a shell you may want to substitute `$out` with `$(dirname $(readlink -f $(which gluster)))/../`.
+    $out/bin/glusterd --help
+    # $out/bin/gluster help # can't do this because even `gluster help` tries to write to `/var/log/glusterfs/cli.log`
+    $out/bin/gluster-eventsapi --help
+    $out/bin/gluster-georep-sshkey --help
+    $out/bin/gluster-mountbroker --help
+    $out/bin/glusterfind --help
+    # gfid_to_path.py doesn't accept --help, and it requires different arguments
+    # (a dir as single argument) than the usage prints when stdin is not a TTY.
+    # The `echo ""` is just so that stdin is not a TTY even if you try this line
+    # on a real TTY for testing purposes.
+    echo "" | (mkdir -p nix-test-dir-for-gfid_to_path && touch b && $out/libexec/glusterfs/gfind_missing_files/gfid_to_path.py nix-test-dir-for-gfid_to_path)
+    $out/share/glusterfs/scripts/eventsdash.py --help
+
+    # this gets falsely loaded as module by glusterfind
+    rm -r $out/bin/conf.py
+  '';
+
+  passthru.tests = {
+    glusterfs = nixosTests.glusterfs;
+  };
+
+  meta = with lib; {
+    description = "Distributed storage system";
+    homepage = "https://www.gluster.org";
+    license = licenses.lgpl3Plus; # dual licese: choice of lgpl3Plus or gpl2
+    maintainers = [ maintainers.raskin ];
+    platforms = with platforms; linux ++ freebsd;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/glusterfs/ssl_cert_path.patch b/nixpkgs/pkgs/tools/filesystems/glusterfs/ssl_cert_path.patch
new file mode 100644
index 000000000000..71b632e12eae
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/glusterfs/ssl_cert_path.patch
@@ -0,0 +1,23 @@
+diff --git a/configure.ac b/configure.ac
+index fb8db11e9e..4c40683057 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -766,14 +766,10 @@ AS_IF([test "x$enable_fuse_notifications" != "xno"], [
+ 
+ dnl Find out OpenSSL trusted certificates path
+ AC_MSG_CHECKING([for OpenSSL trusted certificates path])
+-SSL_CERT_PATH=$(openssl version -d | sed -e 's|OPENSSLDIR: "\(.*\)".*|\1|')
+-if test -d "${SSL_CERT_PATH}" 1>/dev/null 2>&1; then
+-   AC_MSG_RESULT([$SSL_CERT_PATH])
+-   AC_DEFINE_UNQUOTED(SSL_CERT_PATH, ["$SSL_CERT_PATH"], [Path to OpenSSL trusted certificates.])
+-   AC_SUBST(SSL_CERT_PATH)
+-else
+-   AC_MSG_ERROR([Unable to detect path to OpenSSL trusted certificates])
+-fi
++SSL_CERT_PATH=/etc/ssl
++AC_MSG_RESULT([$SSL_CERT_PATH])
++AC_DEFINE_UNQUOTED(SSL_CERT_PATH, ["$SSL_CERT_PATH"], [Path to OpenSSL trusted certificates.])
++AC_SUBST(SSL_CERT_PATH)
+ 
+ AC_CHECK_LIB([ssl], TLS_method, [HAVE_OPENSSL_1_1="yes"], [HAVE_OPENSSL_1_1="no"])
+ if test "x$HAVE_OPENSSL_1_1" = "xyes"; then
diff --git a/nixpkgs/pkgs/tools/filesystems/go-mtpfs/default.nix b/nixpkgs/pkgs/tools/filesystems/go-mtpfs/default.nix
new file mode 100644
index 000000000000..f82e5b7c362a
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/go-mtpfs/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, buildGoModule, fetchFromGitHub, pkg-config, libusb1 }:
+
+buildGoModule rec {
+  pname = "go-mtpfs";
+  version = "1.0.0";
+
+  src = fetchFromGitHub {
+    owner = "hanwen";
+    repo = "go-mtpfs";
+    rev = "v${version}";
+    hash = "sha256-HVfB8/MImgZZLx4tcrlYOfQjpAdHMHshEaSsd+n758w=";
+  };
+
+  vendorHash = "sha256-OrAEvD2rF0Y0bvCD9TUv/E429lASsvC3uK3qNvbg734=";
+
+  ldflags = [ "-s" "-w" ];
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ libusb1 ];
+
+  preCheck = ''
+    # Only run tests under mtp/encoding_test.go
+    # Other tests require an Android deviced attached over USB.
+    buildFlagsArray+=("-run" "Test(Encode|Decode|Variant).*")
+  '';
+
+  meta = with lib; {
+    description = "A simple FUSE filesystem for mounting Android devices as a MTP device";
+    homepage = "https://github.com/hanwen/go-mtpfs";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ ];
+    broken = stdenv.isDarwin;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/gocryptfs/default.nix b/nixpkgs/pkgs/tools/filesystems/gocryptfs/default.nix
new file mode 100644
index 000000000000..a1f424915f30
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/gocryptfs/default.nix
@@ -0,0 +1,68 @@
+{ lib
+, buildGoModule
+, fetchFromGitHub
+, fuse
+, makeWrapper
+, openssl
+, pandoc
+, pkg-config
+, libfido2
+}:
+
+buildGoModule rec {
+  pname = "gocryptfs";
+  version = "2.4.0";
+
+  src = fetchFromGitHub {
+    owner = "rfjakob";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-lStaMj2f8lQZx2E42o4ikPmFQzydlN3PFKwFvUx37SI=";
+  };
+
+  vendorHash = "sha256-ir7FR7ndbPhzUOCVPrYO0SEe03wDFIP74I4X6HJxtE8=";
+
+  nativeBuildInputs = [
+    makeWrapper
+    pkg-config
+    pandoc
+  ];
+
+  buildInputs = [ openssl ];
+
+  propagatedBuildInputs = [ libfido2 ];
+
+  ldflags = [
+    "-X main.GitVersion=${version}"
+    "-X main.GitVersionFuse=[vendored]"
+    "-X main.BuildDate=unknown"
+  ];
+
+  subPackages = [ "." "gocryptfs-xray" "contrib/statfs" ];
+
+  postBuild = ''
+    pushd Documentation/
+    mkdir -p $out/share/man/man1
+    # taken from Documentation/MANPAGE-render.bash
+    pandoc MANPAGE.md -s -t man -o $out/share/man/man1/gocryptfs.1
+    pandoc MANPAGE-XRAY.md -s -t man -o $out/share/man/man1/gocryptfs-xray.1
+    pandoc MANPAGE-STATFS.md -s -t man -o $out/share/man/man1/statfs.1
+    popd
+  '';
+
+  # use --suffix here to ensure we don't shadow /run/wrappers/bin/fusermount,
+  # as the setuid wrapper is required to use gocryptfs as non-root on NixOS
+  postInstall = ''
+    wrapProgram $out/bin/gocryptfs \
+      --suffix PATH : ${lib.makeBinPath [ fuse ]}
+    ln -s $out/bin/gocryptfs $out/bin/mount.fuse.gocryptfs
+  '';
+
+  meta = with lib; {
+    description = "Encrypted overlay filesystem written in Go";
+    license = licenses.mit;
+    homepage = "https://nuetzlich.net/gocryptfs/";
+    maintainers = with maintainers; [ flokli offline prusnak ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/goofys/default.nix b/nixpkgs/pkgs/tools/filesystems/goofys/default.nix
new file mode 100644
index 000000000000..0c250eaeb4f4
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/goofys/default.nix
@@ -0,0 +1,36 @@
+{ lib
+, stdenv
+, buildGoModule
+, fetchFromGitHub
+}:
+
+buildGoModule {
+  pname = "goofys";
+  version = "unstable-2022-04-21";
+
+  src = fetchFromGitHub {
+    owner = "kahing";
+    repo = "goofys";
+    # Same as v0.24.0 but migrated to Go modules
+    rev = "829d8e5ce20faa3f9f6f054077a14325e00e9249";
+    sha256 = "sha256-6yVMNSwwPZlADXuPBDRlgoz4Stuz2pgv6r6+y2/C8XY=";
+  };
+
+  vendorHash = "sha256-shFld293pdmVcnu3p0NoBmPGLJddZd4O/gJ8klgdlQ8=";
+
+  subPackages = [ "." ];
+
+  # Tests are using networking
+  postPatch = ''
+    rm internal/*_test.go
+  '';
+
+  meta = {
+    homepage = "https://github.com/kahing/goofys";
+    description = "A high-performance, POSIX-ish Amazon S3 file system written in Go.";
+    license = [ lib.licenses.mit ];
+    maintainers = [ lib.maintainers.adisbladis ];
+    broken = stdenv.isDarwin; # needs to update gopsutil to at least v3.21.3 to include https://github.com/shirou/gopsutil/pull/1042
+  };
+
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/gpart/default.nix b/nixpkgs/pkgs/tools/filesystems/gpart/default.nix
new file mode 100644
index 000000000000..eafbe066ac94
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/gpart/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "gpart";
+  version = "0.3";
+
+  # GitHub repository 'collating patches for gpart from all distributions':
+  src = fetchFromGitHub {
+    sha256 = "1lsd9k876p944k9s6sxqk5yh9yr7m42nbw9vlsllin7pd4djl4ya";
+    rev = version;
+    repo = "gpart";
+    owner = "baruch";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  enableParallelBuilding = true;
+
+  doCheck = true;
+
+  meta = with lib; {
+    inherit (src.meta) homepage;
+    description = "Guess PC-type hard disk partitions";
+    longDescription = ''
+      Gpart is a tool which tries to guess the primary partition table of a
+      PC-type hard disk in case the primary partition table in sector 0 is
+      damaged, incorrect or deleted. The guessed table can be written to a file
+      or device.
+    '';
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/grive2/default.nix b/nixpkgs/pkgs/tools/filesystems/grive2/default.nix
new file mode 100644
index 000000000000..d5a19f42f3f0
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/grive2/default.nix
@@ -0,0 +1,46 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, pkg-config
+, yajl
+, cmake
+, libgcrypt
+, curl
+, expat
+, boost
+, libiberty
+}:
+
+stdenv.mkDerivation rec {
+  version = "0.5.3";
+  pname = "grive2";
+
+  src = fetchFromGitHub {
+    owner = "vitalif";
+    repo = "grive2";
+    rev =  "v${version}";
+    sha256 = "sha256-P6gitA5cXfNbNDy4ohRLyXj/5dUXkCkOdE/9rJPzNCg=";
+  };
+
+  patches = [
+    # Backport gcc-12 support:
+    #   https://github.com/vitalif/grive2/pull/363
+    (fetchpatch {
+      name = "gcc-12.patch";
+      url = "https://github.com/vitalif/grive2/commit/3cf1c058a3e61deb370dde36024a106a213ab2c6.patch";
+      hash = "sha256-v2Pb6Qvgml/fYzh/VCjOvEVnFYMkOHqROvLLe61DmKA=";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = [ libgcrypt yajl curl expat boost libiberty ];
+
+  meta = with lib; {
+    description = "A console Google Drive client";
+    homepage = "https://github.com/vitalif/grive2";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/hfsprogs/default.nix b/nixpkgs/pkgs/tools/filesystems/hfsprogs/default.nix
new file mode 100644
index 000000000000..2ac17286fb41
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/hfsprogs/default.nix
@@ -0,0 +1,58 @@
+{ lib, stdenv, fetchurl, fetchFromGitHub, openssl, libbsd }:
+
+let
+  version = "332.25";
+
+  apple_src = fetchFromGitHub {
+    owner = "apple-oss-distributions";
+    repo = "diskdev_cmds";
+    rev = "diskdev_cmds-${version}";
+    hash = "sha256-cycPGPx2Gbjn4FKGKuQKJkh+dWGbJfy6C+LTz8rrs0A=";
+    name = "diskdev_cmds-${version}";
+  };
+in
+
+stdenv.mkDerivation rec {
+  pname = "hfsprogs";
+  inherit version;
+
+  srcs = [
+    (fetchurl {
+      url = "http://ftp.de.debian.org/debian/pool/main/h/hfsprogs/hfsprogs_${version}-11.debian.tar.gz";
+      sha256 = "62d9b8599c66ebffbc57ce5d776e20b41341130d9b27341d63bda08460ebde7c";
+    })
+    apple_src
+  ];
+
+  postPatch = ''
+    sed -ie '/sys\/sysctl.h/d' newfs_hfs.tproj/makehfs.c
+  '';
+
+  sourceRoot = apple_src.name;
+  patches = [ "../debian/patches/*.patch" ];
+
+  buildInputs = [ openssl libbsd ];
+  makefile = "Makefile.lnx";
+
+  # Inspired by PKGBUILD of https://www.archlinux.org/packages/community/x86_64/hfsprogs/
+  installPhase = ''
+    # Create required package directories
+    install -m 755 -d "$out/bin"
+    install -m 755 -d "$out/share/hfsprogs"
+    install -m 755 -d "$out/share/man/man8/"
+    # Copy executables
+    install -m 755 "newfs_hfs.tproj/newfs_hfs" "$out/bin/mkfs.hfsplus"
+    install -m 755 "fsck_hfs.tproj/fsck_hfs" "$out/bin/fsck.hfsplus"
+    # Copy shared data
+    install -m 644 "newfs_hfs.tproj/hfsbootdata.img" "$out/share/hfsprogs/hfsbootdata"
+    # Copy man pages
+    install -m 644 "newfs_hfs.tproj/newfs_hfs.8" "$out/share/man/man8/mkfs.hfsplus.8"
+    install -m 644 "fsck_hfs.tproj/fsck_hfs.8" "$out/share/man/man8/fsck.hfsplus.8"
+  '';
+
+  meta = {
+    description = "HFS/HFS+ user space utils";
+    license = lib.licenses.apsl20;
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/httm/Cargo.lock b/nixpkgs/pkgs/tools/filesystems/httm/Cargo.lock
new file mode 100644
index 000000000000..dd039c32b0d8
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/httm/Cargo.lock
@@ -0,0 +1,1332 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "ahash"
+version = "0.8.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f"
+dependencies = [
+ "cfg-if",
+ "once_cell",
+ "version_check",
+]
+
+[[package]]
+name = "aho-corasick"
+version = "0.7.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "android_system_properties"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "ansi_term"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "arrayvec"
+version = "0.7.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6"
+
+[[package]]
+name = "atty"
+version = "0.2.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
+dependencies = [
+ "hermit-abi",
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "autocfg"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
+
+[[package]]
+name = "beef"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3a8241f3ebb85c056b509d4327ad0358fbbba6ffb340bf388f26350aeda225b1"
+
+[[package]]
+name = "bitflags"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
+
+[[package]]
+name = "bumpalo"
+version = "3.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba"
+
+[[package]]
+name = "cc"
+version = "1.0.77"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e9f73505338f7d905b19d18738976aae232eb46b8efc15554ffc56deb5d9ebe4"
+
+[[package]]
+name = "cfg-if"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+
+[[package]]
+name = "chrono"
+version = "0.4.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f"
+dependencies = [
+ "iana-time-zone",
+ "js-sys",
+ "num-integer",
+ "num-traits",
+ "time 0.1.45",
+ "wasm-bindgen",
+ "winapi",
+]
+
+[[package]]
+name = "clap"
+version = "3.2.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5"
+dependencies = [
+ "atty",
+ "bitflags",
+ "clap_lex",
+ "indexmap",
+ "once_cell",
+ "strsim",
+ "termcolor",
+ "textwrap",
+]
+
+[[package]]
+name = "clap_lex"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5"
+dependencies = [
+ "os_str_bytes",
+]
+
+[[package]]
+name = "codespan-reporting"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e"
+dependencies = [
+ "termcolor",
+ "unicode-width",
+]
+
+[[package]]
+name = "console"
+version = "0.15.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c050367d967ced717c04b65d8c619d863ef9292ce0c5760028655a2fb298718c"
+dependencies = [
+ "encode_unicode",
+ "lazy_static",
+ "libc",
+ "terminal_size 0.1.17",
+ "winapi",
+]
+
+[[package]]
+name = "core-foundation-sys"
+version = "0.8.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc"
+
+[[package]]
+name = "crossbeam"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2801af0d36612ae591caa9568261fddce32ce6e08a7275ea334a06a4ad021a2c"
+dependencies = [
+ "cfg-if",
+ "crossbeam-channel",
+ "crossbeam-deque",
+ "crossbeam-epoch",
+ "crossbeam-queue",
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "crossbeam-channel"
+version = "0.5.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521"
+dependencies = [
+ "cfg-if",
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "crossbeam-deque"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc"
+dependencies = [
+ "cfg-if",
+ "crossbeam-epoch",
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "crossbeam-epoch"
+version = "0.9.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a"
+dependencies = [
+ "autocfg",
+ "cfg-if",
+ "crossbeam-utils",
+ "memoffset 0.7.1",
+ "scopeguard",
+]
+
+[[package]]
+name = "crossbeam-queue"
+version = "0.3.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add"
+dependencies = [
+ "cfg-if",
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "crossbeam-utils"
+version = "0.8.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "cxx"
+version = "1.0.83"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bdf07d07d6531bfcdbe9b8b739b104610c6508dcc4d63b410585faf338241daf"
+dependencies = [
+ "cc",
+ "cxxbridge-flags",
+ "cxxbridge-macro",
+ "link-cplusplus",
+]
+
+[[package]]
+name = "cxx-build"
+version = "1.0.83"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d2eb5b96ecdc99f72657332953d4d9c50135af1bac34277801cc3937906ebd39"
+dependencies = [
+ "cc",
+ "codespan-reporting",
+ "once_cell",
+ "proc-macro2",
+ "quote",
+ "scratch",
+ "syn",
+]
+
+[[package]]
+name = "cxxbridge-flags"
+version = "1.0.83"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac040a39517fd1674e0f32177648334b0f4074625b5588a64519804ba0553b12"
+
+[[package]]
+name = "cxxbridge-macro"
+version = "1.0.83"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1362b0ddcfc4eb0a1f57b68bd77dd99f0e826958a96abd0ae9bd092e114ffed6"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "darling"
+version = "0.14.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b0dd3cd20dc6b5a876612a6e5accfe7f3dd883db6d07acfbf14c128f61550dfa"
+dependencies = [
+ "darling_core",
+ "darling_macro",
+]
+
+[[package]]
+name = "darling_core"
+version = "0.14.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a784d2ccaf7c98501746bf0be29b2022ba41fd62a2e622af997a03e9f972859f"
+dependencies = [
+ "fnv",
+ "ident_case",
+ "proc-macro2",
+ "quote",
+ "strsim",
+ "syn",
+]
+
+[[package]]
+name = "darling_macro"
+version = "0.14.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7618812407e9402654622dd402b0a89dff9ba93badd6540781526117b92aab7e"
+dependencies = [
+ "darling_core",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "defer-drop"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f613ec9fa66a6b28cdb1842b27f9adf24f39f9afc4dcdd9fdecee4aca7945c57"
+dependencies = [
+ "crossbeam-channel",
+ "once_cell",
+]
+
+[[package]]
+name = "derive_builder"
+version = "0.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d07adf7be193b71cc36b193d0f5fe60b918a3a9db4dad0449f57bcfd519704a3"
+dependencies = [
+ "derive_builder_macro",
+]
+
+[[package]]
+name = "derive_builder_core"
+version = "0.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1f91d4cfa921f1c05904dc3c57b4a32c38aed3340cce209f3a6fd1478babafc4"
+dependencies = [
+ "darling",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "derive_builder_macro"
+version = "0.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f0314b72bed045f3a68671b3c86328386762c93f82d98c65c3cb5e5f573dd68"
+dependencies = [
+ "derive_builder_core",
+ "syn",
+]
+
+[[package]]
+name = "dirs-next"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1"
+dependencies = [
+ "cfg-if",
+ "dirs-sys-next",
+]
+
+[[package]]
+name = "dirs-sys-next"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d"
+dependencies = [
+ "libc",
+ "redox_users",
+ "winapi",
+]
+
+[[package]]
+name = "either"
+version = "1.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797"
+
+[[package]]
+name = "encode_unicode"
+version = "0.3.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f"
+
+[[package]]
+name = "errno"
+version = "0.2.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1"
+dependencies = [
+ "errno-dragonfly",
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "errno-dragonfly"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf"
+dependencies = [
+ "cc",
+ "libc",
+]
+
+[[package]]
+name = "exacl"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1cfeb22a59deb24c3262c43ffcafd1eb807180f371f9fcc99098d181b5d639be"
+dependencies = [
+ "bitflags",
+ "log",
+ "scopeguard",
+ "uuid",
+]
+
+[[package]]
+name = "fnv"
+version = "1.0.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
+
+[[package]]
+name = "fuzzy-matcher"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "54614a3312934d066701a80f20f15fa3b56d67ac7722b39eea5b4c9dd1d66c94"
+dependencies = [
+ "thread_local",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.2.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "wasi 0.11.0+wasi-snapshot-preview1",
+]
+
+[[package]]
+name = "hashbrown"
+version = "0.12.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
+
+[[package]]
+name = "hashbrown"
+version = "0.13.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "33ff8ae62cd3a9102e5637afc8452c55acf3844001bd5374e0b0bd7b6616c038"
+dependencies = [
+ "ahash",
+ "rayon",
+]
+
+[[package]]
+name = "hermit-abi"
+version = "0.1.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "httm"
+version = "0.23.3"
+dependencies = [
+ "ansi_term",
+ "chrono",
+ "clap",
+ "crossbeam",
+ "exacl",
+ "hashbrown 0.13.1",
+ "indicatif",
+ "lscolors",
+ "nix 0.26.1",
+ "number_prefix",
+ "once_cell",
+ "proc-mounts",
+ "rayon",
+ "serde",
+ "serde_json",
+ "simd-adler32",
+ "skim",
+ "terminal_size 0.2.3",
+ "time 0.3.17",
+ "which",
+ "xattr",
+]
+
+[[package]]
+name = "iana-time-zone"
+version = "0.1.53"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765"
+dependencies = [
+ "android_system_properties",
+ "core-foundation-sys",
+ "iana-time-zone-haiku",
+ "js-sys",
+ "wasm-bindgen",
+ "winapi",
+]
+
+[[package]]
+name = "iana-time-zone-haiku"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca"
+dependencies = [
+ "cxx",
+ "cxx-build",
+]
+
+[[package]]
+name = "ident_case"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
+
+[[package]]
+name = "indexmap"
+version = "1.9.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399"
+dependencies = [
+ "autocfg",
+ "hashbrown 0.12.3",
+]
+
+[[package]]
+name = "indicatif"
+version = "0.17.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4295cbb7573c16d310e99e713cf9e75101eb190ab31fccd35f2d2691b4352b19"
+dependencies = [
+ "console",
+ "number_prefix",
+ "portable-atomic",
+]
+
+[[package]]
+name = "io-lifetimes"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "46112a93252b123d31a119a8d1a1ac19deac4fac6e0e8b0df58f0d4e5870e63c"
+dependencies = [
+ "libc",
+ "windows-sys",
+]
+
+[[package]]
+name = "itoa"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc"
+
+[[package]]
+name = "js-sys"
+version = "0.3.60"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47"
+dependencies = [
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "lazy_static"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
+
+[[package]]
+name = "libc"
+version = "0.2.138"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8"
+
+[[package]]
+name = "link-cplusplus"
+version = "1.0.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9272ab7b96c9046fbc5bc56c06c117cb639fe2d509df0c421cad82d2915cf369"
+dependencies = [
+ "cc",
+]
+
+[[package]]
+name = "linux-raw-sys"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f9f08d8963a6c613f4b1a78f4f4a4dbfadf8e6545b2d72861731e4858b8b47f"
+
+[[package]]
+name = "log"
+version = "0.4.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "lscolors"
+version = "0.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c2dedc85d67baf5327114fad78ab9418f8893b1121c17d5538dd11005ad1ddf2"
+dependencies = [
+ "ansi_term",
+ "nu-ansi-term",
+]
+
+[[package]]
+name = "memchr"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
+
+[[package]]
+name = "memoffset"
+version = "0.6.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "memoffset"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "nix"
+version = "0.24.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069"
+dependencies = [
+ "bitflags",
+ "cfg-if",
+ "libc",
+]
+
+[[package]]
+name = "nix"
+version = "0.25.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f346ff70e7dbfd675fe90590b92d59ef2de15a8779ae305ebcbfd3f0caf59be4"
+dependencies = [
+ "autocfg",
+ "bitflags",
+ "cfg-if",
+ "libc",
+ "memoffset 0.6.5",
+ "pin-utils",
+]
+
+[[package]]
+name = "nix"
+version = "0.26.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "46a58d1d356c6597d08cde02c2f09d785b09e28711837b1ed667dc652c08a694"
+dependencies = [
+ "bitflags",
+ "cfg-if",
+ "libc",
+ "memoffset 0.7.1",
+ "pin-utils",
+ "static_assertions",
+]
+
+[[package]]
+name = "nu-ansi-term"
+version = "0.46.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84"
+dependencies = [
+ "overload",
+ "winapi",
+]
+
+[[package]]
+name = "num-integer"
+version = "0.1.45"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9"
+dependencies = [
+ "autocfg",
+ "num-traits",
+]
+
+[[package]]
+name = "num-traits"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "num_cpus"
+version = "1.14.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5"
+dependencies = [
+ "hermit-abi",
+ "libc",
+]
+
+[[package]]
+name = "num_threads"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "number_prefix"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3"
+
+[[package]]
+name = "once_cell"
+version = "1.16.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860"
+
+[[package]]
+name = "os_str_bytes"
+version = "6.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee"
+
+[[package]]
+name = "overload"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
+
+[[package]]
+name = "partition-identity"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9fa925f9becb532d758b0014b472c576869910929cf4c3f8054b386f19ab9e21"
+dependencies = [
+ "thiserror",
+]
+
+[[package]]
+name = "pin-utils"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
+
+[[package]]
+name = "portable-atomic"
+version = "0.3.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "15eb2c6e362923af47e13c23ca5afb859e83d54452c55b0b9ac763b8f7c1ac16"
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.47"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "proc-mounts"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0d652f8435d0ab70bf4f3590a6a851d59604831a458086541b95238cc51ffcf2"
+dependencies = [
+ "partition-identity",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "rayon"
+version = "1.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e060280438193c554f654141c9ea9417886713b7acd75974c85b18a69a88e0b"
+dependencies = [
+ "crossbeam-deque",
+ "either",
+ "rayon-core",
+]
+
+[[package]]
+name = "rayon-core"
+version = "1.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cac410af5d00ab6884528b4ab69d1e8e146e8d471201800fa1b4524126de6ad3"
+dependencies = [
+ "crossbeam-channel",
+ "crossbeam-deque",
+ "crossbeam-utils",
+ "num_cpus",
+]
+
+[[package]]
+name = "redox_syscall"
+version = "0.2.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
+dependencies = [
+ "bitflags",
+]
+
+[[package]]
+name = "redox_users"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b"
+dependencies = [
+ "getrandom",
+ "redox_syscall",
+ "thiserror",
+]
+
+[[package]]
+name = "regex"
+version = "1.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e076559ef8e241f2ae3479e36f97bd5741c0330689e217ad51ce2c76808b868a"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-syntax"
+version = "0.6.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848"
+
+[[package]]
+name = "rustix"
+version = "0.36.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a3807b5d10909833d3e9acd1eb5fb988f79376ff10fce42937de71a449c4c588"
+dependencies = [
+ "bitflags",
+ "errno",
+ "io-lifetimes",
+ "libc",
+ "linux-raw-sys",
+ "windows-sys",
+]
+
+[[package]]
+name = "rustversion"
+version = "1.0.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8"
+
+[[package]]
+name = "ryu"
+version = "1.0.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde"
+
+[[package]]
+name = "scopeguard"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
+
+[[package]]
+name = "scratch"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c8132065adcfd6e02db789d9285a0deb2f3fcb04002865ab67d5fb103533898"
+
+[[package]]
+name = "serde"
+version = "1.0.152"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb"
+
+[[package]]
+name = "serde_json"
+version = "1.0.93"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cad406b69c91885b5107daf2c29572f6c8cdb3c66826821e286c533490c0bc76"
+dependencies = [
+ "indexmap",
+ "itoa",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "simd-adler32"
+version = "0.3.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "14a5df39617d7c8558154693a1bb8157a4aab8179209540cc0b10e5dc24e0b18"
+
+[[package]]
+name = "skim"
+version = "0.10.2"
+source = "git+https://github.com/kimono-koans/skim?branch=httm-vendored#00b10497101d206340919f3ae411bdc0342484e7"
+dependencies = [
+ "beef",
+ "bitflags",
+ "chrono",
+ "crossbeam",
+ "defer-drop",
+ "derive_builder",
+ "fuzzy-matcher",
+ "lazy_static",
+ "log",
+ "nix 0.25.1",
+ "once_cell",
+ "rayon",
+ "regex",
+ "time 0.3.17",
+ "timer",
+ "tuikit",
+ "unicode-width",
+ "vte",
+]
+
+[[package]]
+name = "static_assertions"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
+
+[[package]]
+name = "strsim"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
+
+[[package]]
+name = "syn"
+version = "1.0.105"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "term"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f"
+dependencies = [
+ "dirs-next",
+ "rustversion",
+ "winapi",
+]
+
+[[package]]
+name = "termcolor"
+version = "1.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755"
+dependencies = [
+ "winapi-util",
+]
+
+[[package]]
+name = "terminal_size"
+version = "0.1.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df"
+dependencies = [
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "terminal_size"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cb20089a8ba2b69debd491f8d2d023761cbf196e999218c591fa1e7e15a21907"
+dependencies = [
+ "rustix",
+ "windows-sys",
+]
+
+[[package]]
+name = "textwrap"
+version = "0.16.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d"
+
+[[package]]
+name = "thiserror"
+version = "1.0.37"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e"
+dependencies = [
+ "thiserror-impl",
+]
+
+[[package]]
+name = "thiserror-impl"
+version = "1.0.37"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "thread_local"
+version = "1.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180"
+dependencies = [
+ "once_cell",
+]
+
+[[package]]
+name = "time"
+version = "0.1.45"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a"
+dependencies = [
+ "libc",
+ "wasi 0.10.0+wasi-snapshot-preview1",
+ "winapi",
+]
+
+[[package]]
+name = "time"
+version = "0.3.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a561bf4617eebd33bca6434b988f39ed798e527f51a1e797d0ee4f61c0a38376"
+dependencies = [
+ "itoa",
+ "libc",
+ "num_threads",
+ "serde",
+ "time-core",
+ "time-macros",
+]
+
+[[package]]
+name = "time-core"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd"
+
+[[package]]
+name = "time-macros"
+version = "0.2.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d967f99f534ca7e495c575c62638eebc2898a8c84c119b89e250477bc4ba16b2"
+dependencies = [
+ "time-core",
+]
+
+[[package]]
+name = "timer"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "31d42176308937165701f50638db1c31586f183f1aab416268216577aec7306b"
+dependencies = [
+ "chrono",
+]
+
+[[package]]
+name = "tuikit"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5e19c6ab038babee3d50c8c12ff8b910bdb2196f62278776422f50390d8e53d8"
+dependencies = [
+ "bitflags",
+ "lazy_static",
+ "log",
+ "nix 0.24.3",
+ "term",
+ "unicode-width",
+]
+
+[[package]]
+name = "unicode-ident"
+version = "1.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3"
+
+[[package]]
+name = "unicode-width"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b"
+
+[[package]]
+name = "utf8parse"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "936e4b492acfd135421d8dca4b1aa80a7bfc26e702ef3af710e0752684df5372"
+
+[[package]]
+name = "uuid"
+version = "1.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "422ee0de9031b5b948b97a8fc04e3aa35230001a722ddd27943e0be31564ce4c"
+
+[[package]]
+name = "version_check"
+version = "0.9.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
+
+[[package]]
+name = "vte"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1aae21c12ad2ec2d168c236f369c38ff332bc1134f7246350dca641437365045"
+dependencies = [
+ "arrayvec",
+ "utf8parse",
+ "vte_generate_state_changes",
+]
+
+[[package]]
+name = "vte_generate_state_changes"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d257817081c7dffcdbab24b9e62d2def62e2ff7d00b1c20062551e6cccc145ff"
+dependencies = [
+ "proc-macro2",
+ "quote",
+]
+
+[[package]]
+name = "wasi"
+version = "0.10.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
+
+[[package]]
+name = "wasi"
+version = "0.11.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
+
+[[package]]
+name = "wasm-bindgen"
+version = "0.2.83"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268"
+dependencies = [
+ "cfg-if",
+ "wasm-bindgen-macro",
+]
+
+[[package]]
+name = "wasm-bindgen-backend"
+version = "0.2.83"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142"
+dependencies = [
+ "bumpalo",
+ "log",
+ "once_cell",
+ "proc-macro2",
+ "quote",
+ "syn",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-macro"
+version = "0.2.83"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810"
+dependencies = [
+ "quote",
+ "wasm-bindgen-macro-support",
+]
+
+[[package]]
+name = "wasm-bindgen-macro-support"
+version = "0.2.83"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+ "wasm-bindgen-backend",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-shared"
+version = "0.2.83"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f"
+
+[[package]]
+name = "which"
+version = "4.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1c831fbbee9e129a8cf93e7747a82da9d95ba8e16621cae60ec2cdc849bacb7b"
+dependencies = [
+ "either",
+ "libc",
+ "once_cell",
+]
+
+[[package]]
+name = "winapi"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
+dependencies = [
+ "winapi-i686-pc-windows-gnu",
+ "winapi-x86_64-pc-windows-gnu",
+]
+
+[[package]]
+name = "winapi-i686-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+
+[[package]]
+name = "winapi-util"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "winapi-x86_64-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+
+[[package]]
+name = "windows-sys"
+version = "0.42.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7"
+dependencies = [
+ "windows_aarch64_gnullvm",
+ "windows_aarch64_msvc",
+ "windows_i686_gnu",
+ "windows_i686_msvc",
+ "windows_x86_64_gnu",
+ "windows_x86_64_gnullvm",
+ "windows_x86_64_msvc",
+]
+
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.42.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e"
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.42.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.42.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.42.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.42.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed"
+
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.42.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.42.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5"
+
+[[package]]
+name = "xattr"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ea263437ca03c1522846a4ddafbca2542d0ad5ed9b784909d4b27b76f62bc34a"
+dependencies = [
+ "libc",
+]
diff --git a/nixpkgs/pkgs/tools/filesystems/httm/default.nix b/nixpkgs/pkgs/tools/filesystems/httm/default.nix
new file mode 100644
index 000000000000..31ea85532462
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/httm/default.nix
@@ -0,0 +1,41 @@
+{ lib
+, rustPlatform
+, fetchFromGitHub
+, installShellFiles
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "httm";
+  version = "0.23.3";
+
+  src = fetchFromGitHub {
+    owner = "kimono-koans";
+    repo = pname;
+    rev = version;
+    hash = "sha256-yia7GEPemFVHzTkhrL7HejQsFO1zwpdUtq4DLdm4s2g=";
+  };
+
+  cargoLock = {
+    lockFile = ./Cargo.lock;
+    outputHashes = {
+      "skim-0.10.2" = "sha256-5bDQZer4r9sNupIilY3afXbyFE1UB8kNsZIFOPmuyu4=";
+    };
+  };
+
+  nativeBuildInputs = [ installShellFiles ];
+
+  postInstall = ''
+    installManPage httm.1
+
+    installShellCompletion --cmd httm \
+      --zsh scripts/httm-key-bindings.zsh
+  '';
+
+  meta = with lib; {
+    description = "Interactive, file-level Time Machine-like tool for ZFS/btrfs";
+    homepage = "https://github.com/kimono-koans/httm";
+    changelog = "https://github.com/kimono-koans/httm/releases/tag/${version}";
+    license = licenses.mpl20;
+    maintainers = with maintainers; [ wyndon ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/httpdirfs/default.nix b/nixpkgs/pkgs/tools/filesystems/httpdirfs/default.nix
new file mode 100644
index 000000000000..e027d5dd8df5
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/httpdirfs/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, curl, expat, fuse, gumbo, libuuid }:
+
+stdenv.mkDerivation rec {
+  pname = "httpdirfs";
+  version = "1.2.3";
+
+  src = fetchFromGitHub {
+    owner = "fangfufu";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-rdeBlAV3t/si9x488tirUGLZRYAxh13zdRIQe0OPd+A=";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ curl expat fuse gumbo libuuid ];
+
+  makeFlags = [ "prefix=${placeholder "out"}" ];
+
+  meta = with lib; {
+    description = "A FUSE filesystem for HTTP directory listings";
+    homepage = "https://github.com/fangfufu/httpdirfs";
+    license = licenses.gpl3Only;
+    maintainers = with maintainers; [ sbruder schnusch ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/httpfs/default.nix b/nixpkgs/pkgs/tools/filesystems/httpfs/default.nix
new file mode 100644
index 000000000000..f7a42f192eef
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/httpfs/default.nix
@@ -0,0 +1,37 @@
+{ fetchurl, lib, stdenv, pkg-config, fuse, openssl, asciidoc
+, docbook_xml_dtd_45, docbook_xsl , libxml2, libxslt }:
+
+stdenv.mkDerivation rec {
+  pname = "httpfs2";
+  version = "0.1.5";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/httpfs/httpfs2/httpfs2-${version}.tar.gz";
+    sha256 = "1h8ggvhw30n2r6w11n1s458ypggdqx6ldwd61ma4yd7binrlpjq1";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs =
+    [ fuse openssl
+      asciidoc docbook_xml_dtd_45 docbook_xsl libxml2 libxslt
+    ];
+
+  installPhase =
+    '' mkdir -p "$out/bin"
+       cp -v httpfs2 "$out/bin"
+
+       mkdir -p "$out/share/man/man1"
+       cp -v *.1 "$out/share/man/man1"
+    '';
+
+  meta = {
+    description = "FUSE-based HTTP filesystem for Linux";
+
+    homepage = "https://httpfs.sourceforge.net/";
+
+    license = lib.licenses.gpl2Plus;
+
+    platforms = lib.platforms.unix;
+    maintainers = [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/hubicfuse/default.nix b/nixpkgs/pkgs/tools/filesystems/hubicfuse/default.nix
new file mode 100644
index 000000000000..95dabe2f97b6
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/hubicfuse/default.nix
@@ -0,0 +1,44 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, pkg-config, curl, openssl, fuse, libxml2, json_c, file }:
+
+stdenv.mkDerivation rec {
+  pname = "hubicfuse";
+  version = "3.0.1";
+
+  src = fetchFromGitHub {
+    owner = "TurboGit";
+    repo = "hubicfuse";
+    rev = "v${version}";
+    sha256 = "1x988hfffxgvqxh083pv3lj5031fz03sbgiiwrjpaiywfbhm8ffr";
+  };
+
+  patches = [
+    # Fix Darwin build
+    # https://github.com/TurboGit/hubicfuse/pull/159
+    (fetchpatch {
+      url = "https://github.com/TurboGit/hubicfuse/commit/b460f40d86bc281a21379158a7534dfb9f283786.patch";
+      sha256 = "0nqvcbrgbc5dms8fkz3brlj40yn48p36drabrnc26gvb3hydh5dl";
+    })
+    # UPstream fix for build failure on -fno-common toolchains
+    (fetchpatch {
+      name = "fno-common.patch";
+      url = "https://github.com/TurboGit/hubicfuse/commit/34a6c3e57467b5f7e9befe2171bf4292893c5a18.patch";
+      sha256 = "0k1jz2h8sdhmi0srx0adbyrcrm57j4annj84yw6hdrly5hsf7bzc";
+    })
+  ];
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ curl openssl fuse libxml2 json_c file ];
+  postInstall = ''
+    install hubic_token $out/bin
+    mkdir -p $out/sbin
+    ln -sf $out/bin/hubicfuse $out/sbin/mount.hubicfuse
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/TurboGit/hubicfuse";
+    description = "FUSE-based filesystem to access hubic cloud storage";
+    platforms = platforms.unix;
+    license = licenses.mit;
+    maintainers = [ maintainers.jpierre03 ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/idsk/default.nix b/nixpkgs/pkgs/tools/filesystems/idsk/default.nix
new file mode 100644
index 000000000000..5e78a1266873
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/idsk/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+
+  pname = "idsk";
+  version = "0.20";
+
+  src = fetchFromGitHub {
+    repo = "idsk";
+    owner = "cpcsdk";
+    rev = "v${version}";
+    sha256 = "05zbdkb9s6sfkni6k927795w2fqdhnf3i7kgl27715sdmmdab05d";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isGNU [
+    # Needed with GCC 12 but breaks on darwin (with clang)
+    "-std=c++14"
+  ]);
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp iDSK $out/bin
+  '';
+
+  meta = with lib; {
+    description = "Manipulating CPC dsk images and files";
+    homepage = "https://github.com/cpcsdk/idsk" ;
+    license = licenses.mit;
+    maintainers = [ ];
+    mainProgram = "iDSK";
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/ifuse/default.nix b/nixpkgs/pkgs/tools/filesystems/ifuse/default.nix
new file mode 100644
index 000000000000..010aeaefabf3
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/ifuse/default.nix
@@ -0,0 +1,46 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, pkg-config
+, fuse
+, usbmuxd
+, libimobiledevice
+}:
+
+stdenv.mkDerivation rec {
+  pname = "ifuse";
+  version = "1.1.4+date=2022-04-04";
+
+  src = fetchFromGitHub {
+    owner = "libimobiledevice";
+    repo = pname;
+    rev = "6f5b8e410f9615b3369ca5eb5367745e13d83b92";
+    hash = "sha256-KbuJLS2BWua9DnhLv2KtsQObin0PQwXQwEdgi3lSAPk=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+  ];
+
+  buildInputs = [
+    fuse
+    usbmuxd
+    libimobiledevice
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/libimobiledevice/ifuse";
+    description = "A fuse filesystem implementation to access the contents of iOS devices";
+    longDescription = ''
+      Mount directories of an iOS device locally using fuse. By default the media
+      directory is mounted, options allow to also mount the sandbox container of an
+      app, an app's documents folder or even the root filesystem on jailbroken
+      devices.
+    '';
+    license = licenses.lgpl21Plus;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ infinisil ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/ioztat/default.nix b/nixpkgs/pkgs/tools/filesystems/ioztat/default.nix
new file mode 100644
index 000000000000..b28f0a36661b
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/ioztat/default.nix
@@ -0,0 +1,58 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, installShellFiles
+, python3
+}:
+
+stdenv.mkDerivation rec {
+  pname = "ioztat";
+  version = "2.0.1";
+
+  src = fetchFromGitHub {
+    owner = "jimsalterjrs";
+    repo = "ioztat";
+    rev = "v${version}";
+    sha256 = "sha256-8svMijgVxSuquPFO2Q2HeqGLdMkwhiujS1DSxC/LRRk=";
+  };
+
+  nativeBuildInputs = [ installShellFiles ];
+  buildInputs = [ python3 ];
+
+  prePatch = ''
+    patchShebangs .
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    install -vDt $out/bin -m 0555 ioztat
+
+    if [ -f ioztat.8 ]; then
+      installManPage ioztat.8
+    fi
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    inherit version;
+    inherit (src.meta) homepage;
+    description = "A storage load analysis tool for OpenZFS";
+    longDescription = ''
+      ioztat is a storage load analysis tool for OpenZFS. It provides
+      iostat-like statistics at an individual dataset/zvol level.
+
+      The statistics offered are read and write operations per second, read and
+      write throughput per second, and the average size of read and write
+      operations issued in the current reporting interval. Viewing these
+      statistics at the individual dataset level allows system administrators
+      to identify storage "hot spots" in larger multi-tenant
+      systems -- particularly those with many VMs or containers operating
+      essentially independent workloads.
+    '';
+    license = licenses.bsd2;
+    platforms = with platforms; linux ++ freebsd;
+    maintainers = with maintainers; [ numinit ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/irods/common.nix b/nixpkgs/pkgs/tools/filesystems/irods/common.nix
new file mode 100644
index 000000000000..27825fdcbeac
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/irods/common.nix
@@ -0,0 +1,57 @@
+{ lib, stdenv, bzip2, zlib, autoconf, automake, cmake, help2man, texinfo, libtool, cppzmq, libarchive
+, avro-cpp, boost, zeromq, openssl, pam, libiodbc, libkrb5, gcc, libcxx, which, catch2, nanodbc, fmt
+, nlohmann_json, spdlog, curl }:
+
+# Common attributes of irods packages
+
+{
+  nativeBuildInputs = [ autoconf automake cmake help2man texinfo which gcc ];
+  buildInputs = [ bzip2 zlib libtool cppzmq libarchive avro-cpp zeromq openssl pam libiodbc libkrb5 boost
+                  libcxx catch2 nanodbc fmt nlohmann_json spdlog curl ];
+
+  cmakeFlags = [
+    "-DIRODS_EXTERNALS_FULLPATH_CLANG=${stdenv.cc}"
+    "-DIRODS_EXTERNALS_FULLPATH_CLANG_RUNTIME=${stdenv.cc}"
+    "-DIRODS_EXTERNALS_FULLPATH_ARCHIVE=${libarchive.lib}"
+    "-DIRODS_EXTERNALS_FULLPATH_AVRO=${avro-cpp}"
+    "-DIRODS_EXTERNALS_FULLPATH_BOOST=${boost}"
+    "-DIRODS_EXTERNALS_FULLPATH_ZMQ=${zeromq}"
+    "-DIRODS_EXTERNALS_FULLPATH_CPPZMQ=${cppzmq}"
+    "-DIRODS_EXTERNALS_FULLPATH_CATCH2=${catch2}"
+    "-DIRODS_EXTERNALS_FULLPATH_NANODBC=${nanodbc}"
+    "-DIRODS_EXTERNALS_FULLPATH_FMT=${fmt}"
+    "-DIRODS_EXTERNALS_FULLPATH_JSON=${nlohmann_json}"
+    "-DIRODS_EXTERNALS_FULLPATH_SPDLOG=${spdlog}"
+    "-DIRODS_LINUX_DISTRIBUTION_NAME=nix"
+    "-DIRODS_LINUX_DISTRIBUTION_VERSION_MAJOR=1.0"
+    "-DCPACK_GENERATOR=TGZ"
+    "-DCMAKE_CXX_FLAGS=-I${lib.getDev libcxx}/include/c++/v1"
+  ];
+
+  postPatch = ''
+    patchShebangs ./packaging ./scripts
+    export cmakeFlags="$cmakeFlags
+      -DCMAKE_INSTALL_PREFIX=$out
+      -DIRODS_HOME_DIRECTORY=$out
+      -DCMAKE_INSTALL_SBINDIR=$out/sbin
+    "
+  '';
+
+  meta = with lib; {
+    description = "Integrated Rule-Oriented Data System (iRODS)";
+    longDescription = ''
+      The Integrated Rule-Oriented Data System (iRODS) is open source data management
+      software used by research organizations and government agencies worldwide.
+      iRODS is released as a production-level distribution aimed at deployment in mission
+      critical environments.  It virtualizes data storage resources, so users can take
+      control of their data, regardless of where and on what device the data is stored.
+      As data volumes grow and data services become more complex, iRODS is increasingly
+      important in data management. The development infrastructure supports exhaustive
+      testing on supported platforms; plug-in support for microservices, storage resources,
+      drivers, and databases; and extensive documentation, training and support services.'';
+    homepage = "https://irods.org";
+    license = lib.licenses.bsd3;
+    maintainers = [ lib.maintainers.bzizou ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/irods/default.nix b/nixpkgs/pkgs/tools/filesystems/irods/default.nix
new file mode 100644
index 000000000000..0b25f45c910d
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/irods/default.nix
@@ -0,0 +1,89 @@
+{ lib, stdenv, fetchFromGitHub, bzip2, zlib, autoconf, automake, cmake, help2man, texinfo, libtool, cppzmq
+, libarchive, avro-cpp_llvm, boost, zeromq, openssl, pam, libiodbc, libkrb5, gcc, libcxx, which, catch2
+, nanodbc_llvm, fmt, nlohmann_json, spdlog, curl }:
+
+let
+  avro-cpp = avro-cpp_llvm;
+  nanodbc = nanodbc_llvm;
+in
+let
+  common = import ./common.nix {
+    inherit lib stdenv bzip2 zlib autoconf automake cmake
+      help2man texinfo libtool cppzmq libarchive
+      zeromq openssl pam libiodbc libkrb5 gcc libcxx
+      boost avro-cpp which catch2 nanodbc fmt nlohmann_json
+      spdlog curl;
+  };
+in
+rec {
+
+  # irods: libs and server package
+  irods = stdenv.mkDerivation (finalAttrs: common // {
+    version = "4.3.0";
+    pname = "irods";
+
+    src = fetchFromGitHub {
+      owner = "irods";
+      repo = "irods";
+      rev = finalAttrs.version;
+      sha256 = "sha256-rceDGFpfoFIByzDOtgNIo9JRoVd0syM21MjEKoZUQaE=";
+      fetchSubmodules = true;
+    };
+
+    # fix build with recent llvm versions
+    env.NIX_CFLAGS_COMPILE = "-Wno-deprecated-register -Wno-deprecated-declarations";
+
+    postPatch = common.postPatch + ''
+      patchShebangs ./test
+      substituteInPlace plugins/database/CMakeLists.txt --replace "COMMAND cpp" "COMMAND ${gcc.cc}/bin/cpp"
+      for file in unit_tests/cmake/test_config/*.cmake
+      do
+        substituteInPlace $file --replace "CATCH2}/include" "CATCH2}/include/catch2"
+      done
+      export cmakeFlags="$cmakeFlags
+        -DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath,$out/lib
+        -DCMAKE_MODULE_LINKER_FLAGS=-Wl,-rpath,$out/lib
+        -DCMAKE_SHARED_LINKER_FLAGS=-Wl,-rpath,$out/lib
+        "
+
+      substituteInPlace server/auth/CMakeLists.txt --replace SETUID ""
+    '';
+
+    meta = common.meta // {
+      longDescription = common.meta.longDescription + "This package provides the servers and libraries.";
+    };
+  });
+
+
+  # icommands (CLI) package, depends on the irods package
+  irods-icommands = stdenv.mkDerivation (finalAttrs: common // {
+    version = "4.3.0";
+    pname = "irods-icommands";
+
+    src = fetchFromGitHub {
+      owner = "irods";
+      repo = "irods_client_icommands";
+      rev = finalAttrs.version;
+      sha256 = "sha256-90q1GPkoEUoiQXM6cA+DWwth7g8v93V471r9jm+l9aw=";
+    };
+
+    buildInputs = common.buildInputs ++ [ irods ];
+
+    postPatch = common.postPatch + ''
+      patchShebangs ./bin
+    '';
+
+    cmakeFlags = common.cmakeFlags ++ [
+      "-DCMAKE_INSTALL_PREFIX=${stdenv.out}"
+      "-DIRODS_DIR=${irods}/lib/irods/cmake"
+      "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath,${irods}/lib"
+      "-DCMAKE_MODULE_LINKER_FLAGS=-Wl,-rpath,${irods}/lib"
+      "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-rpath,${irods}/lib"
+    ];
+
+    meta = common.meta // {
+      description = common.meta.description + " CLI clients";
+      longDescription = common.meta.longDescription + "This package provides the CLI clients, called 'icommands'.";
+    };
+  });
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/jefferson/default.nix b/nixpkgs/pkgs/tools/filesystems/jefferson/default.nix
new file mode 100644
index 000000000000..762541f8d27a
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/jefferson/default.nix
@@ -0,0 +1,41 @@
+{ lib
+, fetchFromGitHub
+, python3
+}:
+
+python3.pkgs.buildPythonApplication rec {
+  pname = "jefferson";
+  version = "0.4.5";
+  format = "pyproject";
+
+  src = fetchFromGitHub {
+    owner = "onekey-sec";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-PGtrvZ0cQvdiswn2Bk43c3LbIZqJyvNe5rnTPw/ipUM=";
+  };
+
+  nativeBuildInputs = with python3.pkgs; [
+    poetry-core
+  ];
+
+  propagatedBuildInputs = with python3.pkgs; [
+    click
+    cstruct
+    lzallright
+  ];
+
+  pythonImportsCheck = [
+    "jefferson"
+  ];
+
+  # upstream has no tests
+  doCheck = false;
+
+  meta = with lib; {
+    description = "JFFS2 filesystem extraction tool";
+    homepage = "https://github.com/onekey-sec/jefferson";
+    license = licenses.mit;
+    maintainers = with maintainers; [ tnias vlaci ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/jfsutils/ar-fix.patch b/nixpkgs/pkgs/tools/filesystems/jfsutils/ar-fix.patch
new file mode 100644
index 000000000000..697029cd5a8c
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/jfsutils/ar-fix.patch
@@ -0,0 +1,10 @@
+--- jfsutils-1.1.15/configure.in.orig	2018-11-27 20:46:55.830242385 +0300
++++ jfsutils-1.1.15/configure.in	2018-11-27 20:47:00.596307630 +0300
+@@ -15,6 +15,7 @@
+ AC_PATH_PROG(LN, ln, ln)
+ AC_PROG_LN_S
+ AC_PROG_RANLIB
++AM_PROG_AR
+ 
+ dnl Checks for header files.
+ AC_HEADER_STDC
diff --git a/nixpkgs/pkgs/tools/filesystems/jfsutils/default.nix b/nixpkgs/pkgs/tools/filesystems/jfsutils/default.nix
new file mode 100644
index 000000000000..0ddd6cfd4dad
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/jfsutils/default.nix
@@ -0,0 +1,54 @@
+{ lib, stdenv, fetchurl, fetchpatch, libuuid, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "jfsutils";
+  version = "1.1.15";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/jfs/jfsutils-${version}.tar.gz";
+    sha256 = "0kbsy2sk1jv4m82rxyl25gwrlkzvl3hzdga9gshkxkhm83v1aji4";
+  };
+
+  patches = [
+    ./types.patch
+    ./hardening-format.patch
+    # required for cross-compilation
+    ./ar-fix.patch
+    # fix for glibc>=2.28
+    (fetchpatch {
+      name   = "add_sysmacros.patch";
+      url    = "https://sources.debian.org/data/main/j/jfsutils/1.1.15-4/debian/patches/add_sysmacros.patch";
+      sha256 = "1qcwvxs4d0d24w5x98z59arqfx2n7f0d9xaqhjcg6w8n34vkhnyc";
+    })
+    # fix for musl
+    (fetchpatch {
+      name = "musl-fix-includes.patch";
+      url = "https://git.alpinelinux.org/aports/plain/main/jfsutils/musl-fix-includes.patch?id=567823dca7dc1f8ce919efbe99762d2d5c020124";
+      sha256 = "sha256-FjdUOI+y+MdSWxTR+csH41uR0P+PWWTfIMPwQjBfQtQ=";
+    })
+  ];
+
+  nativeBuildInputs = [ autoreconfHook ];
+  buildInputs = [ libuuid ];
+
+  # Workaround build failure on -fno-common toolchains like upstream
+  # gcc-10. Otherwise build fails as:
+  #     ld: extract.o:/build/jfsutils-1.1.15/fscklog/extract.c:67: multiple definition of
+  #       `xchklog_buffer'; display.o:/build/jfsutils-1.1.15/fscklog/display.c:57: first defined here
+  env.NIX_CFLAGS_COMPILE = "-fcommon";
+
+  # this required for wipefreespace
+  postInstall = ''
+    mkdir -p $out/include
+    cp include/*.h $out/include
+    mkdir -p $out/lib
+    cp ./libfs/libfs.a $out/lib
+  '';
+
+  meta = with lib; {
+    description = "IBM JFS utilities";
+    homepage = "https://jfs.sourceforge.net";
+    license = licenses.gpl3;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/jfsutils/hardening-format.patch b/nixpkgs/pkgs/tools/filesystems/jfsutils/hardening-format.patch
new file mode 100644
index 000000000000..dd2a93a81ec6
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/jfsutils/hardening-format.patch
@@ -0,0 +1,37 @@
+--- a/fscklog/fscklog.c	2016-01-29 04:59:54.102223291 +0000
++++ b/fscklog/fscklog.c	2016-01-29 05:00:10.707552565 +0000
+@@ -252,8 +252,8 @@
+ 
+ 	sprintf(debug_detail, " [%s:%d]\n", basename(file_name), line_number);
+ 
+-	printf(msg_string);
+-	printf(debug_detail);
++	printf("%s", msg_string);
++	printf("%s", debug_detail);
+ 
+ 	return 0;
+ }
+--- a/fscklog/display.c	2016-01-29 05:05:42.582133444 +0000
++++ b/fscklog/display.c	2016-01-29 05:05:47.541231780 +0000
+@@ -182,7 +182,7 @@
+ 				} else {
+ 					/* the record looks ok */
+ 					msg_txt = &log_entry[log_entry_pos];
+-					printf(msg_txt);
++					printf("%s", msg_txt);
+ 					/*
+ 					 * set up for the next record
+ 					 */
+--- a/logdump/helpers.c	2016-01-29 05:06:26.081996021 +0000
++++ b/logdump/helpers.c	2016-01-29 05:06:43.097333425 +0000
+@@ -95,8 +95,8 @@
+ 
+ 	sprintf(debug_detail, " [%s:%d]\n", file_name, line_number);
+ 
+-	printf(msg_string);
+-	printf(debug_detail);
++	printf("%s", msg_string);
++	printf("%s", debug_detail);
+ 
+ 	return 0;
+ }
diff --git a/nixpkgs/pkgs/tools/filesystems/jfsutils/types.patch b/nixpkgs/pkgs/tools/filesystems/jfsutils/types.patch
new file mode 100644
index 000000000000..a682f2695f9e
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/jfsutils/types.patch
@@ -0,0 +1,12 @@
+diff -ru -x '*~' jfsutils-1.1.15-orig/libfs/devices.h jfsutils-1.1.15/libfs/devices.h
+--- jfsutils-1.1.15-orig/libfs/devices.h	2005-11-22 21:43:55.000000000 +0100
++++ jfsutils-1.1.15/libfs/devices.h	2013-01-28 13:58:56.888630278 +0100
+@@ -18,6 +18,8 @@
+ #ifndef H_DEVICES
+ #define H_DEVICES
+ 
++#include <inttypes.h>
++
+ #define GET	0
+ #define PUT	1
+ #define VRFY	2
diff --git a/nixpkgs/pkgs/tools/filesystems/jmtpfs/default.nix b/nixpkgs/pkgs/tools/filesystems/jmtpfs/default.nix
new file mode 100644
index 000000000000..2754d223a6ba
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/jmtpfs/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, pkg-config, file, fuse, libmtp }:
+
+stdenv.mkDerivation rec {
+  pname = "jmtpfs";
+  version = "0.5";
+
+  src = fetchFromGitHub {
+    sha256 = "1pm68agkhrwgrplrfrnbwdcvx5lrivdmqw8pb5gdmm3xppnryji1";
+    rev = "v${version}";
+    repo = "jmtpfs";
+    owner = "JasonFerrara";
+  };
+
+  patches = [
+    # Fix Darwin build (https://github.com/JasonFerrara/jmtpfs/pull/12)
+    (fetchpatch {
+      url = "https://github.com/JasonFerrara/jmtpfs/commit/b89084303477d1bc4dc9a887ba9cdd75221f497d.patch";
+      sha256 = "0s7x3jfk8i86rd5bwhj7mb1lffcdlpj9bd7b41s1768ady91rb29";
+    })
+  ];
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ file fuse libmtp ];
+
+  meta = with lib; {
+    description = "A FUSE filesystem for MTP devices like Android phones";
+    homepage = "https://github.com/JasonFerrara/jmtpfs";
+    license = licenses.gpl3Only;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.coconnor ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/juicefs/default.nix b/nixpkgs/pkgs/tools/filesystems/juicefs/default.nix
new file mode 100644
index 000000000000..5df6986380b7
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/juicefs/default.nix
@@ -0,0 +1,40 @@
+{ lib
+, buildGoModule
+, fetchFromGitHub
+, stdenv
+}:
+
+buildGoModule rec {
+  pname = "juicefs";
+  version = "1.1.0";
+
+  src = fetchFromGitHub {
+    owner = "juicedata";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-UtERYOjAKOTK+A1qPdD1PajOkf/t5vqWRBvEuxkZmdg=";
+  };
+
+  vendorHash = "sha256-BpqxCCuWyUgzPyh7sq3/HyQ29qm/PWD7mQFh1nkkAkA=";
+
+  ldflags = [ "-s" "-w" ];
+
+  doCheck = false; # requires network access
+
+  # we dont need the libjfs binary
+  postFixup = ''
+    rm $out/bin/libjfs
+  '';
+
+  postInstall = ''
+    ln -s $out/bin/juicefs $out/bin/mount.juicefs
+  '';
+
+  meta = with lib; {
+    description = "A distributed POSIX file system built on top of Redis and S3";
+    homepage = "https://www.juicefs.com/";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ dit7ya ];
+    broken = stdenv.isDarwin;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/kdiskmark/default.nix b/nixpkgs/pkgs/tools/filesystems/kdiskmark/default.nix
new file mode 100644
index 000000000000..6712b96f7fdd
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/kdiskmark/default.nix
@@ -0,0 +1,54 @@
+{ stdenv
+, lib
+, wrapQtAppsHook
+, qtbase
+, qttools
+, fio
+, cmake
+, kauth
+, extra-cmake-modules
+, fetchFromGitHub
+}:
+stdenv.mkDerivation rec {
+  name = "kdiskmark";
+  version = "3.0.0";
+
+  src = fetchFromGitHub {
+    owner = "jonmagon";
+    repo = "kdiskmark";
+    rev = version;
+    sha256 = "sha256-fDimH0BX0zxGuOMNLhNbMGMr2pS+qbZhflSpoLFK+Ng=";
+  };
+
+  nativeBuildInputs = [ cmake wrapQtAppsHook ];
+
+  buildInputs = [
+    qtbase
+    qttools
+    extra-cmake-modules
+    kauth
+  ];
+
+  postInstall = ''
+    # so that kdiskmark can be used as unpriviledged user even on non-kde
+    # (where kauth is not in environment.systemPackages)
+    ln -s ${kauth}/share/dbus-1/system.d/org.kde.kf5auth.conf $out/share/dbus-1/system.d/00-kdiskmark-needs-org.kde.kf5auth.conf
+  '';
+
+  qtWrapperArgs =
+    [ "--prefix" "PATH" ":" (lib.makeBinPath [ fio ]) ];
+
+  meta = with lib; {
+    description = "HDD and SSD benchmark tool with a friendly graphical user interface";
+    longDescription = ''
+      If kdiskmark is not run as root it can rely on polkit to get the necessary
+      privileges. In this case you must install it with `environment.systemPackages`
+      on NixOS, nix-env will not work.
+    '';
+    homepage = "https://github.com/JonMagon/KDiskMark";
+    maintainers = [ maintainers.symphorien ];
+    license = licenses.gpl3Only;
+    platforms = platforms.linux;
+  };
+}
+
diff --git a/nixpkgs/pkgs/tools/filesystems/kio-fuse/default.nix b/nixpkgs/pkgs/tools/filesystems/kio-fuse/default.nix
new file mode 100644
index 000000000000..a68165956eb3
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/kio-fuse/default.nix
@@ -0,0 +1,31 @@
+{ lib
+, mkDerivation
+, fetchgit
+, cmake
+, extra-cmake-modules
+, kio
+, fuse3
+}:
+
+mkDerivation rec {
+  pname = "kio-fuse";
+  version = "5.0.1";
+
+  src = fetchgit {
+    url = "https://invent.kde.org/system/kio-fuse.git";
+    sha256 = "sha256-LSFbFCaEPkQTk1Rg9xpueBOQpkbr/tgYxLD31F6i/qE=";
+    rev = "v${version}";
+  };
+
+  nativeBuildInputs = [ cmake extra-cmake-modules ];
+
+  buildInputs = [ kio fuse3 ];
+
+  meta = with lib; {
+    description = "FUSE Interface for KIO";
+    homepage = "https://invent.kde.org/system/kio-fuse";
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ _1000teslas ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/littlefs-fuse/default.nix b/nixpkgs/pkgs/tools/filesystems/littlefs-fuse/default.nix
new file mode 100644
index 000000000000..736b370fb769
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/littlefs-fuse/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchFromGitHub, fuse }:
+
+stdenv.mkDerivation rec {
+  pname = "littlefs-fuse";
+  version = "2.7.3";
+  src = fetchFromGitHub {
+    owner = "littlefs-project";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-8TrCAByblff2Vkk0MvnIYyAMoFW3s3fm3rLXrEjWoys=";
+  };
+  buildInputs = [ fuse ];
+  installPhase = ''
+    runHook preInstall
+    install -D lfs $out/bin/${pname}
+    ln -s $out/bin/${pname} $out/bin/mount.littlefs
+    ln -s $out/bin $out/sbin
+    runHook postInstall
+  '';
+  meta = src.meta // {
+    description = "A FUSE wrapper that puts the littlefs in user-space";
+    license = lib.licenses.bsd3;
+    maintainers = with lib.maintainers; [ ehmry ];
+    inherit (fuse.meta) platforms;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/lizardfs/default.nix b/nixpkgs/pkgs/tools/filesystems/lizardfs/default.nix
new file mode 100644
index 000000000000..7f7a9f54fd82
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/lizardfs/default.nix
@@ -0,0 +1,50 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, makeWrapper
+, python3
+, db
+, fuse
+, asciidoc
+, libxml2
+, libxslt
+, docbook_xml_dtd_412
+, docbook_xsl
+, boost
+, pkg-config
+, judy
+, pam
+, spdlog
+, systemdMinimal
+, zlib # optional
+}:
+
+stdenv.mkDerivation rec {
+  pname = "lizardfs";
+  version = "3.13.0-rc3";
+
+  src = fetchFromGitHub {
+    owner = pname;
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-rgaFhJvmA1RVDL4+vQLMC0GrdlgUlvJeZ5/JJ67C20Q=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config makeWrapper ];
+
+  buildInputs = [
+    db fuse asciidoc libxml2 libxslt docbook_xml_dtd_412 docbook_xsl
+    zlib boost judy pam spdlog python3 systemdMinimal
+  ];
+
+  meta = with lib; {
+    homepage = "https://lizardfs.com";
+    description = "A highly reliable, scalable and efficient distributed file system";
+    platforms = platforms.linux;
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ rushmorem shamilton ];
+    # 'fprintf' was not declared in this scope
+    broken = true;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/mergerfs/default.nix b/nixpkgs/pkgs/tools/filesystems/mergerfs/default.nix
new file mode 100644
index 000000000000..6ee1d96eaf49
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/mergerfs/default.nix
@@ -0,0 +1,41 @@
+{ lib, stdenv, fetchFromGitHub, automake, autoconf, pkg-config, gettext, libtool, pandoc, which, attr, libiconv }:
+
+stdenv.mkDerivation rec {
+  pname = "mergerfs";
+  version = "2.38.0";
+
+  src = fetchFromGitHub {
+    owner = "trapexit";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-eENtsN9OqPpUQM+O8tPTBzDk26/F/zc2hZ4ZiXiDp2I=";
+  };
+
+  nativeBuildInputs = [
+    automake autoconf pkg-config gettext libtool pandoc which
+  ];
+  prePatch = ''
+    sed -i -e '/chown/d' -e '/chmod/d' libfuse/Makefile
+  '';
+  buildInputs = [ attr libiconv ];
+
+  preConfigure = ''
+    echo "${version}" > VERSION
+  '';
+
+  makeFlags = [ "DESTDIR=${placeholder "out"}" "XATTR_AVAILABLE=1" "PREFIX=/" "SBINDIR=/bin" ];
+  enableParallelBuilding = true;
+
+  postFixup = ''
+    ln -srf $out/bin/mergerfs $out/bin/mount.fuse.mergerfs
+    ln -srf $out/bin/mergerfs $out/bin/mount.mergerfs
+  '';
+
+  meta = {
+    description = "A FUSE based union filesystem";
+    homepage = "https://github.com/trapexit/mergerfs";
+    license = lib.licenses.isc;
+    platforms = lib.platforms.linux;
+    maintainers = with lib.maintainers; [ jfrankenau makefu ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/mergerfs/tools.nix b/nixpkgs/pkgs/tools/filesystems/mergerfs/tools.nix
new file mode 100644
index 000000000000..6e11c6513dad
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/mergerfs/tools.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, fetchFromGitHub, coreutils, makeWrapper
+, rsync, python3 }:
+
+stdenv.mkDerivation rec {
+  pname = "mergerfs-tools";
+  version = "20190411";
+
+  src = fetchFromGitHub {
+    owner = "trapexit";
+    repo = pname;
+    rev = "6e41fc5848c7cc4408caea86f3991c8cc2ac85a1";
+    sha256 = "0izswg6bya13scvb37l3gkl7mvi8q7l11p4hp4phdlcwh9jvdzcj";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = [ python3 ];
+
+  makeFlags = [
+    "INSTALL=${coreutils}/bin/install"
+    "PREFIX=${placeholder "out"}"
+  ];
+
+  postInstall = with lib; ''
+    wrapProgram $out/bin/mergerfs.balance --prefix PATH : ${makeBinPath [ rsync ]}
+    wrapProgram $out/bin/mergerfs.dup --prefix PATH : ${makeBinPath [ rsync ]}
+    wrapProgram $out/bin/mergerfs.mktrash --prefix PATH : ${makeBinPath [ python3.pkgs.xattr ]}
+  '';
+
+  meta = with lib; {
+    description = "Optional tools to help manage data in a mergerfs pool";
+    homepage = "https://github.com/trapexit/mergerfs-tools";
+    license = licenses.isc;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ jfrankenau ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/mhddfs/default.nix b/nixpkgs/pkgs/tools/filesystems/mhddfs/default.nix
new file mode 100644
index 000000000000..2cc6f69bb0ba
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/mhddfs/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchurl, fuse, pkg-config, attr, uthash }:
+
+stdenv.mkDerivation rec {
+  pname = "mhddfs";
+  version = "0.1.39";
+
+  src = fetchurl {
+    url = "https://mhddfs.uvw.ru/downloads/mhddfs_${version}.tar.gz";
+    sha256 = "14ggmh91vv69fp2qpz0nxp0hprlw2wsijss2k2485hb0ci4cabvh";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ fuse attr uthash ];
+
+  patches = [
+    ./fix-format-security-error.patch
+  ];
+
+  postPatch = ''
+    substituteInPlace src/main.c --replace "attr/xattr.h" "sys/xattr.h"
+    substituteInPlace src/tools.c --replace "attr/xattr.h" "sys/xattr.h"
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp mhddfs $out/bin/
+  '';
+
+  meta = {
+    homepage = "https://mhddfs.uvw.ru/";
+    description = "Combines a several mount points into the single one";
+    license = lib.licenses.gpl3;
+    maintainers = [ lib.maintainers.makefu ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/mhddfs/fix-format-security-error.patch b/nixpkgs/pkgs/tools/filesystems/mhddfs/fix-format-security-error.patch
new file mode 100644
index 000000000000..35e58cf0ce9e
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/mhddfs/fix-format-security-error.patch
@@ -0,0 +1,12 @@
+--- mhddfs-0.1.39/src/usage.c.old	2017-02-28 15:00:25.435438622 +0100
++++ mhddfs-0.1.39/src/usage.c	2017-02-28 15:00:33.847454958 +0100
+@@ -43,7 +43,7 @@
+ 		"\n"
+ 		" see fusermount(1) for information about other options\n"
+ 		"";
+-	fprintf(to, usage);
++	fputs(usage, to);
+ 	if (to==stdout) exit(0);
+ 	exit(-1);
+ }
+
diff --git a/nixpkgs/pkgs/tools/filesystems/mkspiffs/default.nix b/nixpkgs/pkgs/tools/filesystems/mkspiffs/default.nix
new file mode 100644
index 000000000000..30312ec7dc7b
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/mkspiffs/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchFromGitHub, git }:
+
+# Changing the variables CPPFLAGS and BUILD_CONFIG_NAME can be done by
+# overriding the same-named attributes. See ./presets.nix for examples.
+
+stdenv.mkDerivation rec {
+  pname = "mkspiffs";
+  version = "0.2.3";
+
+  src = fetchFromGitHub {
+    owner = "igrr";
+    repo = "mkspiffs";
+    rev = version;
+    fetchSubmodules = true;
+    sha256 = "1fgw1jqdlp83gv56mgnxpakky0q6i6f922niis4awvxjind8pbm1";
+  };
+
+  nativeBuildInputs = [ git ];
+  buildFlags = [ "dist" ];
+  installPhase = ''
+    mkdir -p $out/bin
+    cp mkspiffs $out/bin
+  '';
+
+  meta = with lib; {
+    description = "Tool to build and unpack SPIFFS images";
+    license = licenses.mit;
+    homepage = "https://github.com/igrr/mkspiffs";
+    maintainers = with maintainers; [ haslersn ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/mkspiffs/presets.nix b/nixpkgs/pkgs/tools/filesystems/mkspiffs/presets.nix
new file mode 100644
index 000000000000..d4008b2fa3c3
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/mkspiffs/presets.nix
@@ -0,0 +1,20 @@
+{ lib, mkspiffs }:
+
+# We provide the same presets as the upstream
+
+lib.mapAttrs (
+  name: { CPPFLAGS }:
+  mkspiffs.overrideAttrs {
+    inherit CPPFLAGS;
+    BUILD_CONFIG_NAME = "-${name}";
+  }
+) {
+  arduino-esp8266.CPPFLAGS = [
+    "-DSPIFFS_USE_MAGIC_LENGTH=0"
+    "-DSPIFFS_ALIGNED_OBJECT_INDEX_TABLES=1"
+  ];
+
+  arduino-esp32.CPPFLAGS = [ "-DSPIFFS_OBJ_META_LEN=4" ];
+
+  esp-idf.CPPFLAGS = [ "-DSPIFFS_OBJ_META_LEN=4" ];
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/moosefs/default.nix b/nixpkgs/pkgs/tools/filesystems/moosefs/default.nix
new file mode 100644
index 000000000000..55b796ec3254
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/moosefs/default.nix
@@ -0,0 +1,57 @@
+{ lib, stdenv
+, fetchFromGitHub
+, python3
+, fuse
+, pkg-config
+, libpcap
+, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "moosefs";
+  version = "3.0.117";
+
+  src = fetchFromGitHub {
+    owner = pname;
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-6zBMAi9ruPPlcnpdgqwl35QZ5u4MyFPUa70yvGTkHpo=";
+  };
+
+  nativeBuildInputs = [
+    pkg-config
+  ];
+
+  buildInputs =
+    [ fuse libpcap zlib python3 ];
+
+  strictDeps = true;
+
+  buildFlags = lib.optionals stdenv.isDarwin [ "CPPFLAGS=-UHAVE_STRUCT_STAT_ST_BIRTHTIME" ];
+
+  # Fix the build on macOS with macFUSE installed
+  postPatch = lib.optionalString stdenv.isDarwin ''
+    substituteInPlace configure --replace \
+      "/usr/local/lib/pkgconfig" "/nonexistent"
+  '';
+
+  preBuild = lib.optionalString stdenv.isDarwin ''
+    substituteInPlace config.h --replace \
+      "#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1" \
+      "#undef HAVE_STRUCT_STAT_ST_BIRTHTIME"
+  '';
+
+  postInstall = ''
+    substituteInPlace $out/sbin/mfscgiserv --replace "datapath=\"$out" "datapath=\""
+  '';
+
+  doCheck = true;
+
+  meta = with lib; {
+    homepage = "https://moosefs.com";
+    description = "Open Source, Petabyte, Fault-Tolerant, Highly Performing, Scalable Network Distributed File System";
+    platforms = platforms.unix;
+    license = licenses.gpl2;
+    maintainers = [ maintainers.mfossen ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/mount-zip/default.nix b/nixpkgs/pkgs/tools/filesystems/mount-zip/default.nix
new file mode 100644
index 000000000000..74d9b1d370b8
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/mount-zip/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchFromGitHub, fuse, boost, gcc, icu, libzip, pandoc
+, pkg-config }:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "mount-zip";
+  version = "1.0.11";
+
+  src = fetchFromGitHub {
+    owner = "google";
+    repo = "mount-zip";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-67GaZdmDuUc8ixeRP86xA/+n1PRqwwIEe7JK9OZGUC8=";
+  };
+
+  nativeBuildInputs = [ boost gcc icu pandoc pkg-config ];
+  buildInputs = [ fuse libzip ];
+
+  makeFlags = [ "prefix=$(out)" ];
+
+  meta = with lib; {
+    description = "FUSE file system for ZIP archives";
+    homepage = "https://github.com/google/mount-zip";
+    longDescription = ''
+      mount-zip is a tool allowing to open, explore and extract ZIP archives.
+
+      This project is a fork of fuse-zip.
+    '';
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ arti5an ];
+    platforms = platforms.linux;
+  };
+})
diff --git a/nixpkgs/pkgs/tools/filesystems/mountain-duck/default.nix b/nixpkgs/pkgs/tools/filesystems/mountain-duck/default.nix
new file mode 100644
index 000000000000..a881eb4f998f
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/mountain-duck/default.nix
@@ -0,0 +1,35 @@
+{ lib
+, stdenvNoCC
+, fetchurl
+, unzip
+}:
+stdenvNoCC.mkDerivation (finalAttrs: {
+  pname = "mountain-duck";
+  version = "4.14.1.21330";
+
+  src = fetchurl {
+    url = "https://dist.mountainduck.io/Mountain%20Duck-${finalAttrs.version}.zip";
+    sha256 = "0wcnqwzrhzgjpm7pqzbn4fbnwc5rnmw56gma0a1961d5j9vqcs49";
+  };
+  dontUnpack = true;
+
+  nativeBuildInputs = [ unzip ];
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/Applications
+    unzip -d $out/Applications $src
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Mount server and cloud storage as a disk on macOS and Windows";
+    homepage = "https://mountainduck.io";
+    license = licenses.unfree;
+    sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
+    maintainers = with maintainers; [ emilytrau Enzime ];
+    platforms = platforms.darwin;
+  };
+})
diff --git a/nixpkgs/pkgs/tools/filesystems/mp3fs/default.nix b/nixpkgs/pkgs/tools/filesystems/mp3fs/default.nix
new file mode 100644
index 000000000000..6f872500e6b1
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/mp3fs/default.nix
@@ -0,0 +1,50 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, flac
+, fuse
+, lame
+, libid3tag
+, libvorbis
+, autoreconfHook
+, pkg-config
+, pandoc
+}:
+
+stdenv.mkDerivation rec {
+  pname = "mp3fs";
+  version = "1.1.1";
+
+  src = fetchFromGitHub {
+    owner = "khenriks";
+    repo = "mp3fs";
+    rev = "v${version}";
+    sha256 = "sha256-dF+DfkNKvYOucS6KjYR1MMGxayM+1HVS8mbmaavmgKM=";
+  };
+
+  postPatch = ''
+    substituteInPlace src/mp3fs.cc \
+      --replace "#include <fuse_darwin.h>" "" \
+      --replace "osxfuse_version()" "fuse_version()"
+  '';
+
+  buildInputs = [ flac fuse lame libid3tag libvorbis ];
+  nativeBuildInputs = [ autoreconfHook pkg-config pandoc ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "FUSE file system that transparently transcodes to MP3";
+    longDescription = ''
+      A read-only FUSE filesystem which transcodes between audio formats
+      (currently FLAC and Ogg Vorbis to MP3) on the fly when opened and read.
+      This can let you use a FLAC or Ogg Vorbis collection with software
+      and/or hardware which only understands the MP3 format, or transcode
+      files through simple drag-and-drop in a file browser.
+    '';
+    homepage = "https://khenriks.github.io/mp3fs/";
+    license = licenses.gpl3Plus;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ Luflosi ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/mtdutils/default.nix b/nixpkgs/pkgs/tools/filesystems/mtdutils/default.nix
new file mode 100644
index 000000000000..0ca64234e5f0
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/mtdutils/default.nix
@@ -0,0 +1,45 @@
+{ lib, stdenv, fetchgit, autoreconfHook, pkg-config, cmocka, acl, libuuid, lzo, zlib, zstd }:
+
+stdenv.mkDerivation rec {
+  pname = "mtd-utils";
+  version = "2.1.6";
+
+  src = fetchgit {
+    url = "git://git.infradead.org/mtd-utils.git";
+    rev = "v${version}";
+    sha256 = "sha256-NMYzUPt/91lv8f7E1ytX91SqwbBEOtHjCL54EcumcZA=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ] ++ lib.optional doCheck cmocka;
+  buildInputs = [ acl libuuid lzo zlib zstd ];
+
+  enableParallelBuilding = true;
+
+  configureFlags = with lib; [
+    (enableFeature doCheck "unit-tests")
+    (enableFeature doCheck "tests")
+  ];
+
+  makeFlags = [
+    "AR:=$(AR)"
+  ];
+
+  doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
+
+  outputs = [ "out" "dev" ];
+
+  postInstall = ''
+    mkdir -p $dev/lib
+    mv *.a $dev/lib/
+    mv include $dev/
+  '';
+
+  meta = with lib; {
+    description = "Tools for MTD filesystems";
+    downloadPage = "https://git.infradead.org/mtd-utils.git";
+    license = licenses.gpl2Plus;
+    homepage = "http://www.linux-mtd.infradead.org/";
+    maintainers = with maintainers; [ viric ];
+    platforms = with platforms; linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/mtools/UNUSED-darwin.patch b/nixpkgs/pkgs/tools/filesystems/mtools/UNUSED-darwin.patch
new file mode 100644
index 000000000000..46b790afd30a
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/mtools/UNUSED-darwin.patch
@@ -0,0 +1,11 @@
+--- mtools/sysincludes.h.orig	2017-04-01 20:59:46.083196540 +0100
++++ mtools/sysincludes.h	2017-04-01 20:59:12.855030456 +0100
+@@ -103,7 +103,7 @@
+ # define PACKED __attribute__ ((packed))
+ # if __GNUC__ == 2 && __GNUC_MINOR__ > 6 || __GNUC__ >= 3
+ /* gcc 2.6.3 doesn't have "unused" */		/* mool */
+-#  define UNUSED(x) x __attribute__ ((unused));x
++#  define UNUSED(x) x
+ #  define UNUSEDP __attribute__ ((unused))
+ # else
+ #  define UNUSED(x) x
diff --git a/nixpkgs/pkgs/tools/filesystems/mtools/default.nix b/nixpkgs/pkgs/tools/filesystems/mtools/default.nix
new file mode 100644
index 000000000000..9045699e2e32
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/mtools/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchurl, libiconv }:
+
+stdenv.mkDerivation rec {
+  pname = "mtools";
+  version = "4.0.43";
+
+  src = fetchurl {
+    url = "mirror://gnu/mtools/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-VB4XlmXcTicrlgLyB0JDWRoVfaicxHBk2oxYKdvSszk=";
+  };
+
+  patches = lib.optional stdenv.isDarwin ./UNUSED-darwin.patch;
+
+  # fails to find X on darwin
+  configureFlags = lib.optional stdenv.isDarwin "--without-x";
+
+  buildInputs = lib.optional stdenv.isDarwin libiconv;
+
+  doCheck = true;
+
+  passthru = {
+    updateScript = ./update.sh;
+  };
+
+  meta = with lib; {
+    homepage = "https://www.gnu.org/software/mtools/";
+    description = "Utilities to access MS-DOS disks";
+    platforms = platforms.unix;
+    license = licenses.gpl3;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/mtools/update.sh b/nixpkgs/pkgs/tools/filesystems/mtools/update.sh
new file mode 100755
index 000000000000..8fd6505490fa
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/mtools/update.sh
@@ -0,0 +1,6 @@
+#!/usr/bin/env nix-shell
+#!nix-shell -i bash -p curl common-updater-scripts
+set -eu -o pipefail
+
+version="$(curl -s --list-only ftp://ftp.gnu.org/gnu/mtools/ | sed 's/^.*-\([0-9]\+\.[0-9]\+\.[0-9]\+\).*$/\1/' | sort -n | uniq | tail -n1)"
+update-source-version mtools "$version"
diff --git a/nixpkgs/pkgs/tools/filesystems/mtpfs/default.nix b/nixpkgs/pkgs/tools/filesystems/mtpfs/default.nix
new file mode 100644
index 000000000000..0a6623bfdc4a
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/mtpfs/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchurl, pkg-config, fuse, libmtp, glib, libmad, libid3tag }:
+
+stdenv.mkDerivation rec {
+  pname = "mtpfs";
+  version = "1.1";
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ fuse libmtp glib libid3tag libmad ];
+
+  src = fetchurl {
+    url = "https://www.adebenham.com/files/mtp/mtpfs-${version}.tar.gz";
+    sha256 = "07acrqb17kpif2xcsqfqh5j4axvsa4rnh6xwnpqab5b9w5ykbbqv";
+  };
+
+  meta = with lib; {
+    homepage = "https://github.com/cjd/mtpfs";
+    description = "FUSE Filesystem providing access to MTP devices";
+    platforms = platforms.all;
+    license = licenses.gpl3;
+    maintainers = [ maintainers.qknight ];
+    broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/mtpfs.x86_64-darwin
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/netatalk/000-no-suid.patch b/nixpkgs/pkgs/tools/filesystems/netatalk/000-no-suid.patch
new file mode 100644
index 000000000000..194c1f5fac9f
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/netatalk/000-no-suid.patch
@@ -0,0 +1,11 @@
+diff --git a/bin/afppasswd/Makefile.am b/bin/afppasswd/Makefile.am
+index 578eac1..d17aa22 100644
+--- a/bin/afppasswd/Makefile.am
++++ b/bin/afppasswd/Makefile.am
+@@ -16,5 +16,5 @@ AM_CFLAGS = @SSL_CFLAGS@ -I$(top_srcdir)/sys \
+ 
+ install-exec-hook:
+ if HAVE_OPENSSL
+-	chmod u+s $(DESTDIR)$(bindir)/afppasswd
++#	chmod u+s $(DESTDIR)$(bindir)/afppasswd
+ endif
diff --git a/nixpkgs/pkgs/tools/filesystems/netatalk/001-omit-localstatedir-creation.patch b/nixpkgs/pkgs/tools/filesystems/netatalk/001-omit-localstatedir-creation.patch
new file mode 100644
index 000000000000..01c4ee9ba478
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/netatalk/001-omit-localstatedir-creation.patch
@@ -0,0 +1,19 @@
+diff --git a/config/Makefile.am b/config/Makefile.am
+index c98a2ab..58b7f0a 100644
+--- a/config/Makefile.am
++++ b/config/Makefile.am
+@@ -36,10 +36,10 @@ endif
+ #
+ 
+ install-data-local: install-config-files
+-	mkdir -pm 0755 $(DESTDIR)$(localstatedir)/netatalk/
+-	mkdir -pm 0755 $(DESTDIR)$(localstatedir)/netatalk/CNID/
+-	$(INSTALL_DATA) $(srcdir)/README $(DESTDIR)$(localstatedir)/netatalk/
+-	$(INSTALL_DATA) $(srcdir)/README $(DESTDIR)$(localstatedir)/netatalk/CNID/
++#	mkdir -pm 0755 $(DESTDIR)$(localstatedir)/netatalk/
++#	mkdir -pm 0755 $(DESTDIR)$(localstatedir)/netatalk/CNID/
++#	$(INSTALL_DATA) $(srcdir)/README $(DESTDIR)$(localstatedir)/netatalk/
++#	$(INSTALL_DATA) $(srcdir)/README $(DESTDIR)$(localstatedir)/netatalk/CNID/
+ 
+ uninstall-local:
+ 	@for f in $(CONFFILES) $(GENFILES); do \
diff --git a/nixpkgs/pkgs/tools/filesystems/netatalk/default.nix b/nixpkgs/pkgs/tools/filesystems/netatalk/default.nix
new file mode 100644
index 000000000000..950d10640bf0
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/netatalk/default.nix
@@ -0,0 +1,73 @@
+{ lib
+, stdenv
+, fetchurl
+, acl
+, autoreconfHook
+, avahi
+, db
+, libevent
+, libgcrypt
+, libiconv
+, openssl
+, pam
+, perl
+, pkg-config
+, python3
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "netatalk";
+  version = "3.1.18";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/netatalk/netatalk/netatalk-${finalAttrs.version}.tar.bz2";
+    hash = "sha256-htIJ3Hd2pLoXhFFk0uN2pGnO43aiexiuMYmOP0ukFlU=";
+  };
+
+  patches = [
+    ./000-no-suid.patch
+    ./001-omit-localstatedir-creation.patch
+  ];
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+    perl
+    python3
+    python3.pkgs.wrapPython
+  ];
+
+  buildInputs = [
+    acl
+    avahi
+    db
+    libevent
+    libgcrypt
+    libiconv
+    openssl
+    pam
+  ];
+
+  configureFlags = [
+    "--with-bdb=${db.dev}"
+    "--with-ssl-dir=${openssl.dev}"
+    "--with-lockfile=/run/lock/netatalk"
+    "--localstatedir=/var/lib"
+  ];
+
+  postInstall = ''
+    sed -i -e "s%/usr/bin/env python%${python3}/bin/python3%" $out/bin/afpstats
+    buildPythonPath ${python3.pkgs.dbus-python}
+    patchPythonScript $out/bin/afpstats
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Apple Filing Protocol Server";
+    homepage = "http://netatalk.sourceforge.net/";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ jcumming ];
+  };
+})
diff --git a/nixpkgs/pkgs/tools/filesystems/nilfs-utils/default.nix b/nixpkgs/pkgs/tools/filesystems/nilfs-utils/default.nix
new file mode 100644
index 000000000000..5f3b5e534ca3
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/nilfs-utils/default.nix
@@ -0,0 +1,51 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, libuuid, libselinux
+, e2fsprogs }:
+
+stdenv.mkDerivation rec {
+  pname = "nilfs-utils";
+  version = "2.2.9";
+
+  src = fetchFromGitHub {
+    owner = "nilfs-dev";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-XqViUvPj2BHO3bGs9xBO3VpRq9XqnwBptHvMwBOntqo=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  buildInputs = [ libuuid libselinux ];
+
+  postPatch = ''
+    # Fix up hardcoded paths.
+    substituteInPlace lib/cleaner_exec.c --replace /sbin/ $out/bin/
+    substituteInPlace sbin/mkfs/mkfs.c --replace /sbin/ ${lib.getBin e2fsprogs}/bin/
+  '';
+
+  # According to upstream, libmount should be detected automatically but the
+  # build system fails to do this. This is likely a bug with their build system
+  # hence it is explicitly enabled here.
+  configureFlags = [ "--with-libmount" ];
+
+  installFlags = [
+    "sysconfdir=${placeholder "out"}/etc"
+    "root_sbindir=${placeholder "out"}/sbin"
+  ];
+
+  # FIXME: https://github.com/NixOS/patchelf/pull/98 is in, but stdenv
+  # still doesn't use it
+  #
+  # To make sure patchelf doesn't mistakenly keep the reference via
+  # build directory
+  postInstall = ''
+    find . -name .libs -exec rm -rf -- {} +
+  '';
+
+  meta = with lib; {
+    description = "NILFS utilities";
+    maintainers = [ maintainers.raskin ];
+    platforms = platforms.linux;
+    license =  with licenses; [ gpl2 lgpl21 ];
+    downloadPage = "http://nilfs.sourceforge.net/en/download.html";
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/ntfs-3g/autoconf-sbin-helpers.patch b/nixpkgs/pkgs/tools/filesystems/ntfs-3g/autoconf-sbin-helpers.patch
new file mode 100644
index 000000000000..5e896063ba6a
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/ntfs-3g/autoconf-sbin-helpers.patch
@@ -0,0 +1,98 @@
+diff --git a/configure.ac b/configure.ac
+index 9aa25bd5..c7c0437b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -185,6 +185,30 @@ AC_ARG_ENABLE(
+ 	]
+ )
+ 
++AC_ARG_WITH(
++	[mount-helper],
++	[AS_HELP_STRING([--with-mount-helper=BIN],[use the specified binary as mount helper @<:@default=/sbin/mount@:>@])],
++	[mount_helper="$withval"],
++	[mount_helper="/sbin/mount"]
++)
++AC_DEFINE_UNQUOTED([MOUNT_HELPER], ["$mount_helper"], [Binary used as mount helper.])
++
++AC_ARG_WITH(
++	[umount-helper],
++	[AS_HELP_STRING([--with-umount-helper=BIN],[use the specified binary as umount helper @<:@default=/sbin/umount@:>@])],
++	[umount_helper="$withval"],
++	[umount_helper="/sbin/umount"]
++)
++AC_DEFINE_UNQUOTED([UMOUNT_HELPER], ["$umount_helper"], [Binary used as umount helper.])
++
++AC_ARG_WITH(
++	[modprobe-helper],
++	[AS_HELP_STRING([--with-modprobe-helper=BIN],[use the specified binary as modprobe helper @<:@default=/sbin/modprobe@:>@])],
++	[modprobe_helper="$withval"],
++	[modprobe_helper="/sbin/modprobe"]
++)
++AC_DEFINE_UNQUOTED([MODPROBE_HELPER], ["$modprobe_helper"], [Binary used as modprobe helper.])
++
+ # pthread_rwlock_t requires _GNU_SOURCE
+ AC_GNU_SOURCE
+ 
+diff --git a/libfuse-lite/mount_util.c b/libfuse-lite/mount_util.c
+index 8b317224..ee75ace6 100644
+--- a/libfuse-lite/mount_util.c
++++ b/libfuse-lite/mount_util.c
+@@ -89,10 +89,10 @@ int fuse_mnt_add_mount(const char *progname, const char *fsname,
+             exit(1);
+         }
+         rmdir(tmp);
+-        execle("/sbin/mount", "/sbin/mount", "-F", type, "-o", opts,
++        execle(MOUNT_HELPER, MOUNT_HELPER, "-F", type, "-o", opts,
+               fsname, mnt, NULL, &env);
+-        fprintf(stderr, "%s: failed to execute /sbin/mount: %s\n", progname,
+-                strerror(errno));
++        fprintf(stderr, "%s: failed to execute %s: %s\n", progname,
++                MOUNT_HELPER, strerror(errno));
+         exit(1);
+     }
+     res = waitpid(res, &status, 0);
+@@ -126,14 +126,14 @@ int fuse_mnt_umount(const char *progname, const char *mnt, int lazy)
+ 
+         setuid(geteuid());
+         if (lazy) {
+-            execle("/sbin/umount", "/sbin/umount", mnt,
++            execle(UMOUNT_HELPER, UMOUNT_HELPER, mnt,
+                    NULL, &env);
+         } else {
+-            execle("/sbin/umount", "/sbin/umount", "-f", mnt,
++            execle(UMOUNT_HELPER, UMOUNT_HELPER, "-f", mnt,
+                    NULL, &env);
+         }
+-        fprintf(stderr, "%s: failed to execute /sbin/umount: %s\n", progname,
+-                strerror(errno));
++        fprintf(stderr, "%s: failed to execute %s: %s\n", progname,
++                UMOUNT_HELPER, strerror(errno));
+         exit(1);
+     }
+     res = waitpid(res, &status, 0);
+diff --git a/src/lowntfs-3g.c b/src/lowntfs-3g.c
+index 9330500c..dd18a93f 100644
+--- a/src/lowntfs-3g.c
++++ b/src/lowntfs-3g.c
+@@ -4463,7 +4463,7 @@ static fuse_fstype load_fuse_module(void)
+ 	int i;
+ 	struct stat st;
+ 	pid_t pid;
+-	const char *cmd = "/sbin/modprobe";
++	const char *cmd = MODPROBE_HELPER;
+ 	char *env = (char*)NULL;
+ 	struct timespec req = { 0, 100000000 };   /* 100 msec */
+ 	fuse_fstype fstype;
+diff --git a/src/ntfs-3g.c b/src/ntfs-3g.c
+index d8227e71..f5d77252 100644
+--- a/src/ntfs-3g.c
++++ b/src/ntfs-3g.c
+@@ -4171,7 +4171,7 @@ static fuse_fstype load_fuse_module(void)
+ 	int i;
+ 	struct stat st;
+ 	pid_t pid;
+-	const char *cmd = "/sbin/modprobe";
++	const char *cmd = MODPROBE_HELPER;
+ 	char *env = (char*)NULL;
+ 	struct timespec req = { 0, 100000000 };   /* 100 msec */
+ 	fuse_fstype fstype;
diff --git a/nixpkgs/pkgs/tools/filesystems/ntfs-3g/consistent-sbindir-usage.patch b/nixpkgs/pkgs/tools/filesystems/ntfs-3g/consistent-sbindir-usage.patch
new file mode 100644
index 000000000000..29a35ecb1dd1
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/ntfs-3g/consistent-sbindir-usage.patch
@@ -0,0 +1,48 @@
+diff --git a/ntfsprogs/Makefile.am b/ntfsprogs/Makefile.am
+index 08228322..a390d8c7 100644
+--- a/ntfsprogs/Makefile.am
++++ b/ntfsprogs/Makefile.am
+@@ -165,7 +165,7 @@ extras:	libs $(EXTRA_PROGRAMS)
+ 
+ if ENABLE_MOUNT_HELPER
+ install-exec-hook:
+-	$(INSTALL) -d $(DESTDIR)/$(sbindir)
++	$(INSTALL) -d $(DESTDIR)$(sbindir)
+ 	$(LN_S) -f $(sbindir)/mkntfs $(DESTDIR)$(sbindir)/mkfs.ntfs
+ 
+ install-data-hook:
+@@ -173,7 +173,7 @@ install-data-hook:
+ 	$(LN_S) -f mkntfs.8 $(DESTDIR)$(man8dir)/mkfs.ntfs.8
+ 
+ uninstall-local:
+-	$(RM) -f $(DESTDIR)/sbin/mkfs.ntfs
++	$(RM) -f $(DESTDIR)$(sbindir)/mkfs.ntfs
+ 	$(RM) -f $(DESTDIR)$(man8dir)/mkfs.ntfs.8
+ endif
+ 
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 8d984083..ea407067 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -66,9 +66,9 @@ endif
+ 
+ if ENABLE_MOUNT_HELPER
+ install-exec-local:	install-rootbinPROGRAMS
+-	$(MKDIR_P) "$(DESTDIR)/sbin"
+-	$(LN_S) -f "$(rootbindir)/ntfs-3g" "$(DESTDIR)/sbin/mount.ntfs-3g"
+-	$(LN_S) -f "$(rootbindir)/lowntfs-3g" "$(DESTDIR)/sbin/mount.lowntfs-3g"
++	$(MKDIR_P) "$(DESTDIR)$(rootsbindir)"
++	$(LN_S) -f "$(rootbindir)/ntfs-3g" "$(DESTDIR)$(rootsbindir)/mount.ntfs-3g"
++	$(LN_S) -f "$(rootbindir)/lowntfs-3g" "$(DESTDIR)$(rootsbindir)/mount.lowntfs-3g"
+ 
+ install-data-local:	install-man8
+ 	$(LN_S) -f ntfs-3g.8 "$(DESTDIR)$(man8dir)/mount.ntfs-3g.8"
+@@ -76,7 +76,7 @@ install-data-local:	install-man8
+ 
+ uninstall-local:
+ 	$(RM) -f "$(DESTDIR)$(man8dir)/mount.ntfs-3g.8"
+-	$(RM) -f "$(DESTDIR)/sbin/mount.ntfs-3g" "$(DESTDIR)/sbin/mount.lowntfs-3g"
++	$(RM) -f "$(DESTDIR)$(rootsbindir)/mount.ntfs-3g" "$(DESTDIR)$(rootsbindir)/mount.lowntfs-3g"
+ endif
+ 
+ endif # ENABLE_NTFS_3G
diff --git a/nixpkgs/pkgs/tools/filesystems/ntfs-3g/default.nix b/nixpkgs/pkgs/tools/filesystems/ntfs-3g/default.nix
new file mode 100644
index 000000000000..56d6bdc7fba2
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/ntfs-3g/default.nix
@@ -0,0 +1,65 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config
+, gettext, mount, libuuid, kmod, macfuse-stubs, DiskArbitration
+, crypto ? false, libgcrypt, gnutls
+}:
+
+stdenv.mkDerivation rec {
+  pname = "ntfs3g";
+  version = "2022.10.3";
+
+  outputs = [ "out" "dev" "man" "doc" ];
+
+  src = fetchFromGitHub {
+    owner = "tuxera";
+    repo = "ntfs-3g";
+    rev = version;
+    sha256 = "sha256-nuFTsGkm3zmSzpwmhyY7Ke0VZfZU0jHOzEWaLBbglQk=";
+  };
+
+  buildInputs = [ gettext libuuid ]
+    ++ lib.optionals crypto [ gnutls libgcrypt ]
+    ++ lib.optionals stdenv.isDarwin [ macfuse-stubs DiskArbitration ];
+
+  # Note: libgcrypt is listed here non-optionally because its m4 macros are
+  # being used in ntfs-3g's configure.ac.
+  nativeBuildInputs = [ autoreconfHook libgcrypt pkg-config ];
+
+  patches = [
+    # https://github.com/tuxera/ntfs-3g/pull/39
+    ./autoconf-sbin-helpers.patch
+    ./consistent-sbindir-usage.patch
+  ];
+
+  configureFlags = [
+    "--disable-ldconfig"
+    "--exec-prefix=\${prefix}"
+    "--enable-mount-helper"
+    "--enable-posix-acls"
+    "--enable-xattr-mappings"
+    "--${if crypto then "enable" else "disable"}-crypto"
+    "--enable-extras"
+    "--with-mount-helper=${mount}/bin/mount"
+    "--with-umount-helper=${mount}/bin/umount"
+  ] ++ lib.optionals stdenv.isLinux [
+    "--with-modprobe-helper=${kmod}/bin/modprobe"
+  ];
+
+  postInstall =
+    ''
+      # Prefer ntfs-3g over the ntfs driver in the kernel.
+      ln -sv mount.ntfs-3g $out/sbin/mount.ntfs
+    '';
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "https://github.com/tuxera/ntfs-3g";
+    description = "FUSE-based NTFS driver with full write support";
+    maintainers = with maintainers; [ dezgeg ];
+    platforms = with platforms; darwin ++ linux;
+    license = with licenses; [
+      gpl2Plus # ntfs-3g itself
+      lgpl2Plus # fuse-lite
+    ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/orangefs/default.nix b/nixpkgs/pkgs/tools/filesystems/orangefs/default.nix
new file mode 100644
index 000000000000..0b4ec481fc71
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/orangefs/default.nix
@@ -0,0 +1,70 @@
+{ lib, stdenv, fetchurl, fetchpatch, bison, flex, autoreconfHook
+, openssl, db, attr, perl, tcsh
+} :
+
+stdenv.mkDerivation rec {
+  pname = "orangefs";
+  version = "2.9.8";
+
+  src = fetchurl {
+    url = "http://download.orangefs.org/current/source/orangefs-${version}.tar.gz";
+    sha256 = "0c2yla615j04ygclfavh8g5miqhbml2r0zs2c5mvkacf9in7p7sq";
+  };
+
+  patches = [
+    # Pull upstream fix for -fno-common toolchains
+    (fetchpatch {
+      name = "fno-common.patch";
+      url = "https://github.com/waltligon/orangefs/commit/f472beb50356bea657d1c32f1ca8a73e4718fd57.patch";
+      sha256 = "0jaq1ffdxgymjciddsy8h8r87nwbif4v5yv4wd7jxysn25a0hdai";
+    })
+  ];
+
+  nativeBuildInputs = [ bison flex perl autoreconfHook ];
+  buildInputs = [ openssl db attr tcsh ];
+
+  postPatch = ''
+    # Issue introduced by attr-2.4.48
+    substituteInPlace src/apps/user/ofs_setdirhint.c --replace attr/xattr.h sys/xattr.h
+
+    # Do not try to install empty sysconfdir
+    substituteInPlace Makefile.in --replace 'install -d $(sysconfdir)' ""
+
+    # perl interpreter needs to be fixed or build fails
+    patchShebangs ./src/apps/admin/pvfs2-genconfig
+
+    # symlink points to a location in /usr
+    rm ./src/client/webpack/ltmain.sh
+  '';
+
+  configureFlags = [
+    "--sysconfdir=/etc/orangefs"
+    "--enable-shared"
+    "--enable-fast"
+    "--with-ssl=${lib.getDev openssl}"
+  ];
+
+
+  enableParallelBuilding = true;
+
+  postInstall = ''
+    # install useful helper scripts
+    install examples/keys/pvfs2-gen-keys.sh $out/bin
+  '';
+
+  postFixup = ''
+    for f in pvfs2-getmattr pvfs2-setmattr; do
+      substituteInPlace $out/bin/$f --replace '#!/bin/csh' '#!${tcsh}/bin/tcsh'
+    done
+
+    sed -i 's:openssl:${openssl}/bin/openssl:' $out/bin/pvfs2-gen-keys.sh
+  '';
+
+  meta = with lib; {
+    description = "Scale-out network file system for use on high-end computing systems";
+    homepage = "http://www.orangefs.org/";
+    license = with licenses;  [ asl20 bsd3 gpl2 lgpl21 lgpl21Plus openldap ];
+    platforms = [ "x86_64-linux" ];
+    maintainers = with maintainers; [ markuskowa ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/rar2fs/default.nix b/nixpkgs/pkgs/tools/filesystems/rar2fs/default.nix
new file mode 100644
index 000000000000..3b42a7890fbd
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/rar2fs/default.nix
@@ -0,0 +1,40 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, fuse
+, unrar
+}:
+
+stdenv.mkDerivation rec {
+  pname = "rar2fs";
+  version = "1.29.6";
+
+  src = fetchFromGitHub {
+    owner = "hasse69";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-b8zMCzSFJewXMQOuaKwMJx//Wq9vT/bUj6XS/jDBBBo=";
+  };
+
+  postPatch = ''
+    substituteInPlace get-version.sh \
+      --replace "which echo" "echo"
+  '';
+
+  nativeBuildInputs = [ autoreconfHook ];
+  buildInputs = [ fuse unrar ];
+
+  configureFlags = [
+    "--with-unrar=${unrar.src}/unrar"
+    "--disable-static-unrar"
+  ];
+
+  meta = with lib; {
+    description = "FUSE file system for reading RAR archives";
+    homepage = "https://hasse69.github.io/rar2fs/";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ kraem wegank ];
+    platforms = with platforms; linux ++ freebsd;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/rdfind/default.nix b/nixpkgs/pkgs/tools/filesystems/rdfind/default.nix
new file mode 100644
index 000000000000..c363ee561374
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/rdfind/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchpatch, fetchurl, nettle }:
+
+stdenv.mkDerivation rec {
+  pname = "rdfind";
+  version = "1.5.0";
+
+  src = fetchurl {
+    url = "https://rdfind.pauldreik.se/${pname}-${version}.tar.gz";
+    sha256 = "103hfqzgr6izmj57fcy4jsa2nmb1ax43q4b5ij92pcgpaq9fsl21";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "include-limits.patch";
+      url = "https://github.com/pauldreik/rdfind/commit/61877de88d782b63b17458a61fcc078391499b29.patch";
+      sha256 = "0igzm4833cn905pj84lgr88nd5gx35dnjl8kl8vrwk7bpyii6a8l";
+    })
+  ];
+
+  buildInputs = [ nettle ];
+
+  meta = with lib; {
+    homepage = "https://rdfind.pauldreik.se/";
+    description = "Removes or hardlinks duplicate files very swiftly";
+    license = licenses.gpl2Plus;
+    maintainers = [ maintainers.wmertens ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/reiser4progs/default.nix b/nixpkgs/pkgs/tools/filesystems/reiser4progs/default.nix
new file mode 100644
index 000000000000..9f9b3bd5c2ed
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/reiser4progs/default.nix
@@ -0,0 +1,37 @@
+{lib, stdenv, fetchurl, libaal}:
+
+stdenv.mkDerivation rec {
+  pname = "reiser4progs";
+  version = "2.0.5";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/reiser4/reiser4-utils/${pname}-${version}.tar.gz";
+    sha256 = "sha256-DBR2C5h6ue4aqHmDG50jCLXe13DSWAYwfibrzTM+7Sw=";
+  };
+
+  buildInputs = [libaal];
+
+  hardeningDisable = [ "format" ];
+
+  preConfigure = ''
+    substituteInPlace configure --replace " -static" ""
+  '';
+
+  preInstall = ''
+    substituteInPlace Makefile --replace ./run-ldconfig true
+  '';
+
+  # this required for wipefreespace
+  postInstall = ''
+    mkdir -p $out/lib
+    cp ./libmisc/.libs/libmisc.a $out/lib/libreiser4misc.a.la
+  '';
+
+  meta = with lib; {
+    inherit version;
+    homepage = "https://sourceforge.net/projects/reiser4/";
+    description = "Reiser4 utilities";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/reiserfsprogs/default.nix b/nixpkgs/pkgs/tools/filesystems/reiserfsprogs/default.nix
new file mode 100644
index 000000000000..a3dd60635350
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/reiserfsprogs/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchurl, libuuid, autoreconfHook, e2fsprogs, acl }:
+
+stdenv.mkDerivation rec {
+  pname = "reiserfsprogs";
+  version = "3.6.27";
+
+  src = fetchurl {
+    url = "https://www.kernel.org/pub/linux/kernel/people/jeffm/reiserfsprogs/v${version}/${pname}-${version}.tar.xz";
+    hash = "sha256-DpW2f6d0ajwtWRRem5wv60pr5ShT6DtJexgurlCOYuM=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+  buildInputs = [ libuuid e2fsprogs acl ];
+
+  env.NIX_CFLAGS_COMPILE = toString [ "-std=gnu90" "-D_GNU_SOURCE" ];
+
+  meta = {
+    inherit version;
+    homepage = "http://www.namesys.com/";
+    description = "ReiserFS utilities";
+    license = lib.licenses.gpl2;
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/rmfuse/default.nix b/nixpkgs/pkgs/tools/filesystems/rmfuse/default.nix
new file mode 100644
index 000000000000..ace05d061665
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/rmfuse/default.nix
@@ -0,0 +1,49 @@
+{ lib
+, python3
+, fetchFromGitHub
+}:
+
+python3.pkgs.buildPythonApplication rec {
+  pname = "rmfuse";
+  version = "unstable-2021-06-06";
+
+  format = "pyproject";
+
+  src = fetchFromGitHub {
+    owner = "rschroll";
+    repo = "rmfuse";
+    rev = "3796b8610c8a965a60a417fc0bf8ea5200b71fd2";
+    hash = "sha256-W3kS6Kkmp8iWMOYFL7r1GyjSQvFotBXQCuTMK0vyHQ8=";
+  };
+
+  postPatch = ''
+    substituteInPlace pyproject.toml \
+      --replace 'bidict = "^' 'bidict = ">='
+  '';
+
+  nativeBuildInputs = with python3.pkgs; [
+    poetry-core
+  ];
+
+  propagatedBuildInputs = with python3.pkgs; [
+    bidict
+    rmrl
+    rmcl
+    pyfuse3
+    xdg
+  ];
+
+  meta = {
+    description = "FUSE access to the reMarkable Cloud";
+    homepage = "https://github.com/rschroll/rmfuse";
+    license = lib.licenses.mit;
+    longDescription = ''
+      RMfuse provides access to your reMarkable Cloud files in the form of a
+      FUSE filesystem. These files are exposed either in their original format,
+      or as PDF files that contain your annotations. This lets you manage files
+      in the reMarkable Cloud using the same tools you use on your local
+      system.
+    '';
+    maintainers = with lib.maintainers; [ adisbladis ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/rmount/default.nix b/nixpkgs/pkgs/tools/filesystems/rmount/default.nix
new file mode 100644
index 000000000000..1d8ced17aae0
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/rmount/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, nmap, jq, cifs-utils, sshfs, fetchFromGitHub, makeWrapper }:
+
+stdenv.mkDerivation rec {
+
+  pname   = "rmount";
+  version = "1.1.0";
+
+  src = fetchFromGitHub {
+    rev = "v${version}";
+    owner = "Luis-Hebendanz";
+    repo = "rmount";
+    sha256 = "0j1ayncw1nnmgna7vyx44vwinh4ah1b0l5y8agc7i4s8clbvy3h0";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  installPhase = ''
+    install -D ${src}/rmount.man  $out/share/man/man1/rmount.1
+    install -D ${src}/rmount.bash $out/bin/rmount
+    install -D ${src}/config.json $out/share/config.json
+
+    wrapProgram $out/bin/rmount --prefix PATH : ${lib.makeBinPath [ nmap jq cifs-utils sshfs ]}
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/Luis-Hebendanz/rmount";
+    description = "Remote mount utility which parses a json file";
+    license = licenses.mit;
+    maintainers = [ maintainers.luis ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/rnm/default.nix b/nixpkgs/pkgs/tools/filesystems/rnm/default.nix
new file mode 100644
index 000000000000..69ba0270ecc0
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/rnm/default.nix
@@ -0,0 +1,33 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, gmp
+, jpcre2
+, pcre2
+}:
+
+stdenv.mkDerivation rec {
+  pname = "rnm";
+  version = "4.0.9";
+
+  src = fetchFromGitHub {
+    owner = "neurobin";
+    repo = "rnm";
+    rev = "refs/tags/${version}";
+    hash = "sha256-cMWIxRuL7UCDjGr26+mfEYBPRA/dxEt0Us5qU92TelY=";
+  };
+
+  buildInputs = [
+    gmp
+    jpcre2
+    pcre2
+  ];
+
+  meta = with lib; {
+    homepage = "https://neurobin.org/projects/softwares/unix/rnm/";
+    description = "Bulk rename utility";
+    changelog = "https://github.com/neurobin/rnm/blob/${version}/ChangeLog";
+    platforms = lib.platforms.all;
+    license = licenses.gpl3Only;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/romdirfs/default.nix b/nixpkgs/pkgs/tools/filesystems/romdirfs/default.nix
new file mode 100644
index 000000000000..0304508d41eb
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/romdirfs/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, fuse }:
+
+stdenv.mkDerivation rec {
+  pname = "romdirfs";
+  version = "1.2";
+
+  src = fetchFromGitHub {
+    owner = "mlafeldt";
+    repo = "romdirfs";
+    rev = "v${version}";
+    sha256 = "1jbsmpklrycz5q86qmzvbz4iz2g5fvd7p9nca160aw2izwpws0g7";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [ fuse ];
+
+  meta = with lib; {
+    description = "FUSE for access Playstation 2 IOP IOPRP images and BIOS dumps";
+    homepage = "https://github.com/mlafeldt/romdirfs";
+    license = licenses.gpl3;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/s3backer/default.nix b/nixpkgs/pkgs/tools/filesystems/s3backer/default.nix
new file mode 100644
index 000000000000..bfe9f2274756
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/s3backer/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchFromGitHub
+, autoreconfHook, pkg-config
+, fuse, curl, expat }:
+
+stdenv.mkDerivation rec {
+  pname = "s3backer";
+  version = "2.0.2";
+
+  src = fetchFromGitHub {
+    sha256 = "sha256-xmOtL4v3UxdjrL09sSfXyF5FoMrNerSqG9nvEuwMvNM=";
+    rev = version;
+    repo = "s3backer";
+    owner = "archiecobbs";
+  };
+
+  patches = [
+    # from upstream, after latest release
+    # https://github.com/archiecobbs/s3backer/commit/303a669356fa7cd6bc95ac7076ce51b1cab3970a
+    ./fix-darwin-builds.patch
+  ];
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = [ fuse curl expat ];
+
+  # AC_CHECK_DECLS doesn't work with clang
+  postPatch = lib.optionalString stdenv.cc.isClang ''
+    substituteInPlace configure.ac --replace \
+      'AC_CHECK_DECLS(fdatasync)' ""
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/archiecobbs/s3backer";
+    description = "FUSE-based single file backing store via Amazon S3";
+    license = licenses.gpl2Plus;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/s3backer/fix-darwin-builds.patch b/nixpkgs/pkgs/tools/filesystems/s3backer/fix-darwin-builds.patch
new file mode 100644
index 000000000000..e5755f1cb9b0
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/s3backer/fix-darwin-builds.patch
@@ -0,0 +1,25 @@
+From 303a669356fa7cd6bc95ac7076ce51b1cab3970a Mon Sep 17 00:00:00 2001
+From: Adrian Ho <the.gromgit@gmail.com>
+Date: Tue, 6 Sep 2022 10:49:10 +0800
+Subject: [PATCH] Enable macOS builds
+
+macOS requires explicit `environ` declaration.
+---
+ s3backer.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/s3backer.h b/s3backer.h
+index ccc9053..383e246 100644
+--- a/s3backer.h
++++ b/s3backer.h
+@@ -90,6 +90,10 @@
+ #include <zlib.h>
+ #include <fuse.h>
+ 
++#ifdef __APPLE__
++extern char **environ;
++#endif
++
+ #ifndef FUSE_OPT_KEY_DISCARD
+ #define FUSE_OPT_KEY_DISCARD -4
+ #endif
\ No newline at end of file
diff --git a/nixpkgs/pkgs/tools/filesystems/s3fs/default.nix b/nixpkgs/pkgs/tools/filesystems/s3fs/default.nix
new file mode 100644
index 000000000000..88f2f8a08771
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/s3fs/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, curl, openssl, libxml2, fuse }:
+
+stdenv.mkDerivation rec {
+  pname = "s3fs-fuse";
+  version = "1.93";
+
+  src = fetchFromGitHub {
+    owner  = "s3fs-fuse";
+    repo   = "s3fs-fuse";
+    rev    = "v${version}";
+    sha256 = "sha256-7rLHnQlyJDOn/RikOrrEAQ7O+4T+26vNGiTkOgNH75Q=";
+  };
+
+  buildInputs = [ curl openssl libxml2 fuse ];
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+
+  configureFlags = [
+    "--with-openssl"
+  ];
+
+  postInstall = ''
+    ln -s $out/bin/s3fs $out/bin/mount.s3fs
+  '';
+
+  meta = with lib; {
+    description = "Mount an S3 bucket as filesystem through FUSE";
+    homepage = "https://github.com/s3fs-fuse/s3fs-fuse";
+    changelog = "https://github.com/s3fs-fuse/s3fs-fuse/raw/v${version}/ChangeLog";
+    maintainers = [ ];
+    license = licenses.gpl2Only;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/sandboxfs/default.nix b/nixpkgs/pkgs/tools/filesystems/sandboxfs/default.nix
new file mode 100644
index 000000000000..bafa39272727
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/sandboxfs/default.nix
@@ -0,0 +1,34 @@
+{ stdenv
+, lib
+, rustPlatform
+, fetchCrate
+, pkg-config
+, installShellFiles
+, fuse
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "sandboxfs";
+  version = "0.2.0";
+
+  src = fetchCrate {
+    inherit pname version;
+    sha256 = "sha256-nrrkFYAf7HqaGFruolNTkXzy4ID6/vipxd+fOCKYARM=";
+  };
+
+  cargoSha256 = "sha256-izz10ePmEt2xxOyR4NODIMAcY9d4ODo677mq+DVf4RI=";
+
+  nativeBuildInputs = [ pkg-config installShellFiles ];
+
+  buildInputs = [ fuse ];
+
+  postInstall = "installManPage man/sandboxfs.1";
+
+  meta = with lib; {
+    broken = stdenv.isDarwin;
+    description = "A virtual file system for sandboxing";
+    homepage = "https://github.com/bazelbuild/sandboxfs";
+    license = with licenses; [ asl20 ];
+    maintainers = with maintainers; [ jeremyschlatter ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/sasquatch/default.nix b/nixpkgs/pkgs/tools/filesystems/sasquatch/default.nix
new file mode 100644
index 000000000000..258814b8905b
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/sasquatch/default.nix
@@ -0,0 +1,75 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchurl
+, xz
+, lzo
+, zlib
+, zstd
+, lz4
+, lz4Support ? false
+}:
+
+let
+  patch = fetchFromGitHub
+    {
+      # NOTE: This uses my personal fork for now, until
+      # https://github.com/devttys0/sasquatch/pull/40 is merged.
+      # I, cole-h, will keep this fork available until that happens.
+      owner = "cole-h";
+      repo = "sasquatch";
+      rev = "6edc54705454c6410469a9cb5bc58e412779731a";
+      sha256 = "x+PuPYGD4Pd0fcJtlLWByGy/nggsmZkxwSXxJfPvUgo=";
+    } + "/patches/patch0.txt";
+in
+stdenv.mkDerivation rec {
+  pname = "sasquatch";
+  version = "4.4";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/squashfs/squashfs${version}.tar.gz";
+    sha256 = "qYGz8/IFS1ouZYhRo8BqJGCtBKmopkXgr+Bjpj/bsH4=";
+  };
+
+  buildInputs = [
+    xz
+    lzo
+    zlib
+    zstd
+  ]
+  ++ lib.optionals lz4Support [ lz4 ];
+
+  patches = [ patch ];
+  patchFlags = [ "-p0" ];
+
+  postPatch = ''
+    # Drop blanket -Werror to avoid build failure on fresh toolchains
+    # like gcc-11.
+    substituteInPlace squashfs-tools/Makefile --replace ' -Werror' ' '
+    cd squashfs-tools
+  '';
+
+  # Workaround build failure on -fno-common toolchains like upstream
+  # gcc-10. Otherwise build fails as:
+  #   ld: unsquashfs_xattr.o:/build/squashfs4.4/squashfs-tools/error.h:34: multiple definition of
+  #     `verbose'; unsquashfs.o:/build/squashfs4.4/squashfs-tools/error.h:34: first defined here
+  env.NIX_CFLAGS_COMPILE = "-fcommon";
+
+  installFlags = [ "INSTALL_DIR=\${out}/bin" ];
+
+  makeFlags = [
+    "XZ_SUPPORT=1"
+    "CC=${stdenv.cc.targetPrefix}cc"
+    "CXX=${stdenv.cc.targetPrefix}c++"
+    "AR=${stdenv.cc.targetPrefix}ar"
+  ]
+    ++ lib.optional lz4Support "LZ4_SUPPORT=1";
+
+  meta = with lib; {
+    homepage = "https://github.com/devttys0/sasquatch";
+    description = "Set of patches to the standard unsquashfs utility (part of squashfs-tools) that attempts to add support for as many hacked-up vendor-specific SquashFS implementations as possible";
+    license = licenses.gpl2Plus;
+    maintainers = [ maintainers.pamplemousse ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/sdat2img/default.nix b/nixpkgs/pkgs/tools/filesystems/sdat2img/default.nix
new file mode 100644
index 000000000000..4176eabad401
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/sdat2img/default.nix
@@ -0,0 +1,26 @@
+{ lib, fetchFromGitHub, python3Packages }:
+
+python3Packages.buildPythonApplication {
+  pname = "sdat2img";
+  version = "unstable-2021-11-09";
+
+  src = fetchFromGitHub {
+    repo = "sdat2img";
+    owner = "xpirt";
+    rev = "b432c988a412c06ff24d196132e354712fc18929";
+    sha256 = "sha256-NCbf9H0hoJgeDtP6cQY0H280BQqgKXv3ConZ87QixVY=";
+  };
+
+  format = "other";
+  installPhase = ''
+    install -D $src/sdat2img.py $out/bin/sdat2img
+  '';
+
+  meta = {
+    description = "Convert sparse Android data image (.dat) into filesystem ext4 image (.img)";
+    homepage = "https://github.com/xpirt/sdat2img";
+    license = lib.licenses.mit;
+    maintainers = [ lib.maintainers.xaverdh ];
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/securefs/default.nix b/nixpkgs/pkgs/tools/filesystems/securefs/default.nix
new file mode 100644
index 000000000000..791c01d8eed8
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/securefs/default.nix
@@ -0,0 +1,39 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, fuse
+}:
+
+stdenv.mkDerivation rec {
+  pname = "securefs";
+  version = "0.13.1";
+
+  src = fetchFromGitHub {
+    owner = "netheril96";
+    repo = "securefs";
+    rev = version;
+    fetchSubmodules = true;
+    hash = "sha256-7xjGuN7jcLgfGkaBoSj+WsBpM806PPGzeBs7DnI+fwc=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ fuse ];
+
+  meta = with lib; {
+    inherit (src.meta) homepage;
+    description = "Transparent encryption filesystem";
+    longDescription = ''
+      Securefs is a filesystem in userspace (FUSE) that transparently encrypts
+      and authenticates data stored. It is particularly designed to secure
+      data stored in the cloud.
+      Securefs mounts a regular directory onto a mount point. The mount point
+      appears as a regular filesystem, where one can read/write/create files,
+      directories and symbolic links. The underlying directory will be
+      automatically updated to contain the encrypted and authenticated
+      contents.
+    '';
+    license = with licenses; [ bsd2 mit ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/sftpman/default.nix b/nixpkgs/pkgs/tools/filesystems/sftpman/default.nix
new file mode 100644
index 000000000000..267b2b649c30
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/sftpman/default.nix
@@ -0,0 +1,25 @@
+{ lib, python3Packages, fetchFromGitHub }:
+
+python3Packages.buildPythonApplication rec {
+  pname = "sftpman";
+  version = "1.2.2";
+
+  src = fetchFromGitHub {
+    owner = "spantaleev";
+    repo = pname;
+    rev = version;
+    hash = "sha256-YxqN4+u0nYUWehbyRhjddIo2sythH3E0fiPSyrUlWhM=";
+  };
+
+  checkPhase = ''
+    $out/bin/sftpman help
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/spantaleev/sftpman";
+    description = "Application that handles sshfs/sftp file systems mounting";
+    license = licenses.gpl3;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ contrun ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/simg2img/default.nix b/nixpkgs/pkgs/tools/filesystems/simg2img/default.nix
new file mode 100644
index 000000000000..69ac44257aa5
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/simg2img/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchFromGitHub, zlib }:
+
+stdenv.mkDerivation rec {
+  pname = "simg2img";
+  version = "1.1.4";
+
+  src = fetchFromGitHub {
+    owner = "anestisb";
+    repo = "android-simg2img";
+    rev = version;
+    sha256 = "1xm9kaqs2w8c7a4psv78gv66gild88mpgjn5lj087d7jh1jxy7bf";
+  };
+
+  buildInputs = [ zlib ];
+
+  makeFlags = [ "PREFIX=$(out)" "DEP_CXX:=$(CXX)" ];
+
+  meta = with lib; {
+    description = "Tool to convert Android sparse images to raw images";
+    homepage = "https://github.com/anestisb/android-simg2img";
+    license = licenses.asl20;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ dezgeg arkivm ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/simple-mtpfs/default.nix b/nixpkgs/pkgs/tools/filesystems/simple-mtpfs/default.nix
new file mode 100644
index 000000000000..3cb2aa97007b
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/simple-mtpfs/default.nix
@@ -0,0 +1,31 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, autoreconfHook
+, autoconf-archive
+, pkg-config
+, fuse
+, libmtp
+}:
+stdenv.mkDerivation rec {
+  pname = "simple-mtpfs";
+  version = "0.4.0";
+
+  src = fetchFromGitHub {
+    owner = "phatina";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-vAqi2owa4LJK7y7S7TwkPAqDxzyHrZZBTu0MBwMT0gI=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook autoconf-archive pkg-config ];
+  buildInputs = [ fuse libmtp ];
+
+  meta = with lib; {
+    description = "Simple MTP fuse filesystem driver";
+    homepage = "https://github.com/phatina/simple-mtpfs";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ laalsaas ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/smbnetfs/default.nix b/nixpkgs/pkgs/tools/filesystems/smbnetfs/default.nix
new file mode 100644
index 000000000000..a1831d44ada4
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/smbnetfs/default.nix
@@ -0,0 +1,22 @@
+{ lib, stdenv, fetchurl, fuse, samba, pkg-config, glib, autoconf, attr, libsecret }:
+
+stdenv.mkDerivation rec {
+  pname = "smbnetfs";
+  version = "0.6.3";
+  src = fetchurl {
+    url = "mirror://sourceforge/project/smbnetfs/smbnetfs/SMBNetFS-${version}/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-6sN7l2n76cP0uvPrZMYaa1mtTyqgXf3culoaxK301WA=";
+  };
+
+  nativeBuildInputs = [ pkg-config autoconf ];
+  buildInputs = [ fuse samba glib attr libsecret ];
+
+  meta = with lib; {
+    description = "A FUSE FS for mounting Samba shares";
+    maintainers = with maintainers; [ raskin ];
+    platforms = platforms.linux;
+    license = licenses.gpl2;
+    downloadPage = "https://sourceforge.net/projects/smbnetfs/files/smbnetfs";
+    homepage = "https://sourceforge.net/projects/smbnetfs/";
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/snapraid/default.nix b/nixpkgs/pkgs/tools/filesystems/snapraid/default.nix
new file mode 100644
index 000000000000..d945a4a40094
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/snapraid/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "snapraid";
+  version = "12.2";
+
+  src = fetchFromGitHub {
+    owner = "amadvance";
+    repo = "snapraid";
+    rev = "v${version}";
+    sha256 = "sha256-3wy442tv3m1CSOAj1cngTWRiqX934c/7V2YL6j30+3U=";
+  };
+
+  VERSION = version;
+
+  doCheck = !(stdenv.isDarwin && stdenv.isx86_64);
+
+  nativeBuildInputs = [ autoreconfHook ];
+  buildInputs = [ ];
+
+  meta = {
+    homepage = "http://www.snapraid.it/";
+    description = "A backup program for disk arrays";
+    license = lib.licenses.gpl3;
+    maintainers = [ lib.maintainers.makefu ];
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/squashfs-tools-ng/default.nix b/nixpkgs/pkgs/tools/filesystems/squashfs-tools-ng/default.nix
new file mode 100644
index 000000000000..ecb9d18fd6c0
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/squashfs-tools-ng/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, lib, fetchurl, doxygen, graphviz, perl, pkg-config
+, bzip2, lz4, lzo, xz, zlib, zstd
+}:
+
+stdenv.mkDerivation rec {
+  pname = "squashfs-tools-ng";
+  version = "1.2.0";
+
+  src = fetchurl {
+    url = "https://infraroot.at/pub/squashfs/squashfs-tools-ng-${version}.tar.xz";
+    sha256 = "sha256-1zYHYJXVhJdWQKeM0VVM4VzL3r3XPXebfR7IAEgyt+c=";
+  };
+
+  nativeBuildInputs = [ doxygen graphviz pkg-config perl ];
+  buildInputs = [ bzip2 zlib xz lz4 lzo zstd ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "https://github.com/AgentD/squashfs-tools-ng";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ qyliss ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/squashfs/4k-align.patch b/nixpkgs/pkgs/tools/filesystems/squashfs/4k-align.patch
new file mode 100644
index 000000000000..bbb4d99329a7
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/squashfs/4k-align.patch
@@ -0,0 +1,100 @@
+This patch is an old patch; see below for the original message body. The patch
+has been updated several times to be compatible with new releases.
+
+ * To apply to squashfs 4.4, commit 52eb4c279cd283ed9802dd1ceb686560b22ffb67.
+ * To apply to squashfs 4.5, commit 0496d7c3de3e09da37ba492081c86159806ebb07.
+ * To apply to squashfs 4.6, commit f7623b3d9953a1190fec181708c9489ef3522b9f.
+
+From af8a6dca694ddd38d8a775a2b5f9a24fe2d10153 Mon Sep 17 00:00:00 2001
+From: Amin Hassani <ahassani@google.com>
+Date: Thu, 15 Dec 2016 10:43:15 -0800
+Subject: [PATCH] mksquashfs 4K aligns the files inside the squashfs image
+
+Files inside a squashfs image are not necessarily 4k (4096)
+aligned. This patch starts each file in a 4k aligned address and pads
+zero to the end of the file until it reaches the next 4k aligned
+address. This will not change the size of the compressed
+blocks (especially the last one) and hence it will not change how the
+files are being loaded in kernel or unsquashfs. However on average this
+increases the size of the squashfs image which can be calculated by the
+following formula:
+
+increased_size = (number_of_unfragmented_files_in_image + number of fragments) * 2048
+
+The 4k alignment can be enabled by flag '-4k-align'
+---
+ squashfs-tools/mksquashfs.c | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git a/squashfs-tools/mksquashfs.c b/squashfs-tools/mksquashfs.c
+index 3429aac..db164c2 100644
+--- a/squashfs-tools/mksquashfs.c
++++ b/squashfs-tools/mksquashfs.c
+@@ -82,6 +82,8 @@ int noI = FALSE;
+ int noId = FALSE;
+ int noD = FALSE;
+ int noX = FALSE;
++int do_4k_align = FALSE;
++#define ALIGN_UP(bytes, size) (bytes = (bytes + size - 1) & ~(size - 1))
+ 
+ /* block size used to build filesystem */
+ int block_size = SQUASHFS_FILE_SIZE;
+@@ -1624,6 +1626,9 @@ static void unlock_fragments()
+ 	 * queue at this time.
+ 	 */
+ 	while(!queue_empty(locked_fragment)) {
++		// 4k align the start of remaining queued fragments.
++		if(do_4k_align)
++			ALIGN_UP(bytes, 4096);
+ 		write_buffer = queue_get(locked_fragment);
+ 		frg = write_buffer->block;	
+ 		size = SQUASHFS_COMPRESSED_SIZE_BLOCK(fragment_table[frg].size);
+@@ -2627,6 +2632,9 @@ static void *frag_deflator(void *arg)
+ 		write_buffer->size = compressed_size;
+ 		pthread_mutex_lock(&fragment_mutex);
+ 		if(fragments_locked == FALSE) {
++			// 4k align the start of each fragment.
++			if(do_4k_align)
++				ALIGN_UP(bytes, 4096);
+ 			fragment_table[file_buffer->block].size = c_byte;
+ 			fragment_table[file_buffer->block].start_block = bytes;
+ 			write_buffer->block = bytes;
+@@ -3021,6 +3029,10 @@ static struct file_info *write_file_blocks(int *status, struct dir_ent *dir_ent,
+ 	struct file_info *file;
+ 	int bl_hash = 0;
+ 
++	// 4k align the start of each file.
++	if(do_4k_align)
++		ALIGN_UP(bytes, 4096);
++
+ 	if(pre_duplicate(read_size, dir_ent->inode, read_buffer, &bl_hash))
+ 		return write_file_blocks_dup(status, dir_ent, read_buffer, dup, bl_hash);
+ 
+@@ -6169,6 +6181,7 @@ static void print_options(FILE *stream, char *name, int total_mem)
+ 	fprintf(stream, "or metadata.  This is\n\t\t\tequivalent to ");
+ 	fprintf(stream, "specifying -noI -noD -noF and -noX\n");
+ 	fprintf(stream, "\nFilesystem build options:\n");
++	fprintf(stream, "-4k-align\t\tenables 4k alignment of all files\n");
+ 	fprintf(stream, "-tar\t\t\tread uncompressed tar file from standard in (stdin)\n");
+ 	fprintf(stream, "-no-strip\t\tact like tar, and do not strip leading ");
+ 	fprintf(stream, "directories\n\t\t\tfrom source files\n");
+@@ -6690,6 +6703,7 @@ static void print_summary()
+ 		"compressed", no_fragments ? "no" : noF ? "uncompressed" :
+ 		"compressed", no_xattrs ? "no" : noX ? "uncompressed" :
+ 		"compressed", noI || noId ? "uncompressed" : "compressed");
++	printf("\t4k %saligned\n", do_4k_align ? "" : "un");
+ 	printf("\tduplicates are %sremoved\n", duplicate_checking ? "" :
+ 		"not ");
+ 	printf("Filesystem size %.2f Kbytes (%.2f Mbytes)\n", bytes / 1024.0,
+@@ -8417,6 +8431,8 @@ print_compressor_options:
+ 		} else if(strcmp(argv[i], "-comp") == 0) {
+ 			/* parsed previously */
+ 			i++;
++		} else if(strcmp(argv[i], "-4k-align") == 0) {
++			do_4k_align = TRUE;
+ 		} else {
+ 			ERROR("%s: invalid option\n\n", argv[0]);
+ 			print_options(stderr, argv[0], total_mem);
+-- 
+2.39.2
+
diff --git a/nixpkgs/pkgs/tools/filesystems/squashfs/default.nix b/nixpkgs/pkgs/tools/filesystems/squashfs/default.nix
new file mode 100644
index 000000000000..ae658330b280
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/squashfs/default.nix
@@ -0,0 +1,66 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, help2man
+, lz4
+, lzo
+, nixosTests
+, which
+, xz
+, zlib
+, zstd
+}:
+
+stdenv.mkDerivation rec {
+  pname = "squashfs";
+  version = "4.6.1";
+
+  src = fetchFromGitHub {
+    owner = "plougher";
+    repo = "squashfs-tools";
+    rev = version;
+    hash = "sha256-C/awQpp1Q/0adx3YVNTq6ruEAzcjL5G7SkOCgpvAA50=";
+  };
+
+  patches = [
+    # This patch adds an option to pad filesystems (increasing size) in
+    # exchange for better chunking / binary diff calculation.
+    ./4k-align.patch
+  ];
+
+  strictDeps = true;
+  nativeBuildInputs = [ which ]
+    # when cross-compiling help2man cannot run the cross-compiled binary
+    ++ lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform) [ help2man ];
+  buildInputs = [ zlib xz zstd lz4 lzo ];
+
+  preBuild = ''
+    cd squashfs-tools
+  '' ;
+
+  installFlags = [
+    "INSTALL_DIR=${placeholder "out"}/bin"
+    "INSTALL_MANPAGES_DIR=${placeholder "out"}/share/man/man1"
+  ];
+
+  makeFlags = [
+    "XZ_SUPPORT=1"
+    "ZSTD_SUPPORT=1"
+    "LZ4_SUPPORT=1"
+    "LZMA_XZ_SUPPORT=1"
+    "LZO_SUPPORT=1"
+  ];
+
+  passthru.tests = {
+    nixos-iso-boots-and-verifies = nixosTests.boot.biosCdrom;
+  };
+
+  meta = with lib; {
+    homepage = "https://github.com/plougher/squashfs-tools";
+    description = "Tool for creating and unpacking squashfs filesystems";
+    platforms = platforms.unix;
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ ruuda ];
+    mainProgram = "mksquashfs";
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/squashfuse/default.nix b/nixpkgs/pkgs/tools/filesystems/squashfuse/default.nix
new file mode 100644
index 000000000000..c1c374ac0340
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/squashfuse/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, libtool, fuse,
+  pkg-config, lz4, xz, zlib, lzo, zstd }:
+
+stdenv.mkDerivation rec {
+
+  pname = "squashfuse";
+  version = "0.5.0";
+
+  src = fetchFromGitHub {
+    owner = "vasi";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-nCdAO5WPYt/aHdNnfkIJqz0T59COgsSGeXho4bFZVTY=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook libtool pkg-config ];
+  buildInputs = [ lz4 xz zlib lzo zstd fuse ];
+
+  meta = {
+    description = "FUSE filesystem to mount squashfs archives";
+    homepage = "https://github.com/vasi/squashfuse";
+    maintainers = [  ];
+    platforms = lib.platforms.unix;
+    license = "BSD-2-Clause";
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/ssdfs-utils/default.nix b/nixpkgs/pkgs/tools/filesystems/ssdfs-utils/default.nix
new file mode 100644
index 000000000000..7ed8173d38fc
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/ssdfs-utils/default.nix
@@ -0,0 +1,47 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, libtool
+, libuuid
+, zlib
+}:
+
+stdenv.mkDerivation {
+  # The files and commit messages in the repository refer to the package
+  # as ssdfs-utils, not ssdfs-tools.
+  pname = "ssdfs-utils";
+  # The version is taken from `configure.ac`, there are no tags.
+  version = "4.35";
+
+  src = fetchFromGitHub {
+    owner = "dubeyko";
+    repo = "ssdfs-tools";
+    rev = "fe18072c9b1a670c06d1819205ad12e08312838f";
+    hash = "sha256-eVduJa4ewkVDHkxZkj2GO2uNMcMubyGo+4RkhXb9KFA=";
+  };
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    autoreconfHook
+  ];
+
+  buildInputs = [
+    libtool
+    libuuid
+    zlib
+  ];
+
+  passthru = {
+    updateScript = ./update.sh;
+  };
+
+  meta = with lib; {
+    description = "SSDFS file system utilities";
+    homepage = "https://github.com/dubeyko/ssdfs-tools";
+    license = licenses.bsd3Clear;
+    maintainers = with maintainers; [ ners ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/ssdfs-utils/update.sh b/nixpkgs/pkgs/tools/filesystems/ssdfs-utils/update.sh
new file mode 100755
index 000000000000..b30d7bd3357c
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/ssdfs-utils/update.sh
@@ -0,0 +1,14 @@
+#!/usr/bin/env nix-shell
+#!nix-shell -i bash -p curl gnugrep common-updater-scripts
+set -euo pipefail
+
+owner=dubeyko
+repo=ssdfs-tools
+
+version="$(curl --silent https://raw.githubusercontent.com/${owner}/${repo}/master/configure.ac | \
+    grep 'AC_INIT(ssdfs' | \
+    egrep -o '[0-9\.]{3,}')"
+
+rev=$(curl -s -H "Accept: application/vnd.github.VERSION.sha" https://api.github.com/repos/${owner}/${repo}/commits/master)
+
+update-source-version ssdfs-utils "$version" --rev="$rev"
diff --git a/nixpkgs/pkgs/tools/filesystems/sshfs-fuse/common.nix b/nixpkgs/pkgs/tools/filesystems/sshfs-fuse/common.nix
new file mode 100644
index 000000000000..932c7693dc88
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/sshfs-fuse/common.nix
@@ -0,0 +1,62 @@
+{ version, sha256, platforms, patches ? [ ] }:
+
+{ lib, stdenv, fetchFromGitHub
+, meson, pkg-config, ninja, docutils, makeWrapper
+, fuse3, macfuse-stubs, glib
+, which, python3Packages
+, openssh
+}:
+
+let
+  fuse = if stdenv.isDarwin then macfuse-stubs else fuse3;
+in stdenv.mkDerivation rec {
+  pname = "sshfs-fuse";
+  inherit version;
+
+  src = fetchFromGitHub {
+    owner = "libfuse";
+    repo = "sshfs";
+    rev = "sshfs-${version}";
+    inherit sha256;
+  };
+
+  inherit patches;
+
+  nativeBuildInputs = [ meson pkg-config ninja docutils makeWrapper ];
+  buildInputs = [ fuse glib ];
+  nativeCheckInputs = [ which python3Packages.pytest ];
+
+  env.NIX_CFLAGS_COMPILE = lib.optionalString
+    (stdenv.hostPlatform.system == "i686-linux")
+    "-D_FILE_OFFSET_BITS=64";
+
+  postInstall = ''
+    mkdir -p $out/sbin
+    ln -sf $out/bin/sshfs $out/sbin/mount.sshfs
+  '' + lib.optionalString (!stdenv.isDarwin) ''
+    wrapProgram $out/bin/sshfs --prefix PATH : "${openssh}/bin"
+  '';
+
+  # doCheck = true;
+  checkPhase = lib.optionalString (!stdenv.isDarwin) ''
+    # The tests need fusermount:
+    mkdir bin
+    cp ${fuse}/bin/fusermount3 bin/fusermount
+    export PATH=bin:$PATH
+    # Can't access /dev/fuse within the sandbox: "FUSE kernel module does not seem to be loaded"
+    substituteInPlace test/util.py --replace "/dev/fuse" "/dev/null"
+    # TODO: "fusermount executable not setuid, and we are not root"
+    # We should probably use a VM test instead
+    ${python3Packages.python.interpreter} -m pytest test/
+  '';
+
+  meta = with lib; {
+    inherit platforms;
+    description = "FUSE-based filesystem that allows remote filesystems to be mounted over SSH";
+    longDescription = macfuse-stubs.warning;
+    homepage = "https://github.com/libfuse/sshfs";
+    license = licenses.gpl2Plus;
+    mainProgram = "sshfs";
+    maintainers = with maintainers; [ primeos ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/sshfs-fuse/default.nix b/nixpkgs/pkgs/tools/filesystems/sshfs-fuse/default.nix
new file mode 100644
index 000000000000..2f11bb0047ad
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/sshfs-fuse/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, callPackage, fetchpatch }:
+
+let mkSSHFS = args: callPackage (import ./common.nix args) { };
+in if stdenv.isDarwin then
+  mkSSHFS {
+    version = "2.10"; # macFUSE isn't yet compatible with libfuse 3.x
+    sha256 = "1dmw4kx6vyawcywiv8drrajnam0m29mxfswcp4209qafzx3mjlp1";
+    patches = [
+      # remove reference to fuse_darwin.h which doens't exist on recent macFUSE
+      ./fix-fuse-darwin-h.patch
+
+      # From https://github.com/libfuse/sshfs/pull/185:
+      # > With this patch, setting I/O size to a reasonable large value, will
+      # > result in much improved performance, e.g.: -o iosize=1048576
+      (fetchpatch {
+        name = "fix-configurable-blksize.patch";
+        url = "https://github.com/libfuse/sshfs/commit/667cf34622e2e873db776791df275c7a582d6295.patch";
+        sha256 = "0d65lawd2g2aisk1rw2vl65dgxywf4vqgv765n9zj9zysyya8a54";
+      })
+    ];
+    platforms = lib.platforms.darwin;
+  }
+else
+  mkSSHFS {
+    version = "3.7.3";
+    sha256 = "0s2hilqixjmv4y8n67zaq374sgnbscp95lgz5ignp69g3p1vmhwz";
+    platforms = lib.platforms.linux;
+  }
diff --git a/nixpkgs/pkgs/tools/filesystems/sshfs-fuse/fix-fuse-darwin-h.patch b/nixpkgs/pkgs/tools/filesystems/sshfs-fuse/fix-fuse-darwin-h.patch
new file mode 100644
index 000000000000..045cc0e61f33
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/sshfs-fuse/fix-fuse-darwin-h.patch
@@ -0,0 +1,14 @@
+diff --git a/sshfs.c b/sshfs.c
+index 97eaf06..d442577 100644
+--- a/sshfs.c
++++ b/sshfs.c
+@@ -14,9 +14,6 @@
+ #if !defined(__CYGWIN__)
+ #include <fuse_lowlevel.h>
+ #endif
+-#ifdef __APPLE__
+-#  include <fuse_darwin.h>
+-#endif
+ #include <assert.h>
+ #include <stdio.h>
+ #include <stdlib.h>
diff --git a/nixpkgs/pkgs/tools/filesystems/stratis-cli/default.nix b/nixpkgs/pkgs/tools/filesystems/stratis-cli/default.nix
new file mode 100644
index 000000000000..e927f2daf256
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/stratis-cli/default.nix
@@ -0,0 +1,48 @@
+{ lib
+, python3Packages
+, fetchFromGitHub
+, nixosTests
+}:
+
+python3Packages.buildPythonApplication rec {
+  pname = "stratis-cli";
+  version = "3.6.0";
+  format = "pyproject";
+
+  src = fetchFromGitHub {
+    owner = "stratis-storage";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-mLmjMofdr0U+Bfnkde7lJqPXkd1ICPYdlcsOm2nOcQA=";
+  };
+
+  propagatedBuildInputs = with python3Packages; [
+    dbus-client-gen
+    dbus-python-client-gen
+    justbytes
+    packaging
+    psutil
+    python-dateutil
+    wcwidth
+  ];
+
+  nativeCheckInputs = with python3Packages; [
+    pytestCheckHook
+  ];
+
+  disabledTestPaths = [
+    # tests below require dbus daemon
+    "tests/whitebox/integration"
+  ];
+
+  pythonImportsCheck = [ "stratis_cli" ];
+
+  passthru.tests = nixosTests.stratis;
+
+  meta = with lib; {
+    description = "CLI for the Stratis project";
+    homepage = "https://stratis-storage.github.io";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ nickcao ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/stratisd/Cargo.lock b/nixpkgs/pkgs/tools/filesystems/stratisd/Cargo.lock
new file mode 100644
index 000000000000..7fbf8fc968f3
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/stratisd/Cargo.lock
@@ -0,0 +1,1641 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "aho-corasick"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "android-tzdata"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
+
+[[package]]
+name = "android_system_properties"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "anstream"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163"
+dependencies = [
+ "anstyle",
+ "anstyle-parse",
+ "anstyle-query",
+ "anstyle-wincon",
+ "colorchoice",
+ "is-terminal",
+ "utf8parse",
+]
+
+[[package]]
+name = "anstyle"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd"
+
+[[package]]
+name = "anstyle-parse"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333"
+dependencies = [
+ "utf8parse",
+]
+
+[[package]]
+name = "anstyle-query"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b"
+dependencies = [
+ "windows-sys",
+]
+
+[[package]]
+name = "anstyle-wincon"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188"
+dependencies = [
+ "anstyle",
+ "windows-sys",
+]
+
+[[package]]
+name = "assert_cmd"
+version = "2.0.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "86d6b683edf8d1119fe420a94f8a7e389239666aa72e65495d91c00462510151"
+dependencies = [
+ "anstyle",
+ "bstr",
+ "doc-comment",
+ "predicates",
+ "predicates-core",
+ "predicates-tree",
+ "wait-timeout",
+]
+
+[[package]]
+name = "assert_matches"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9"
+
+[[package]]
+name = "async-trait"
+version = "0.1.68"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.29",
+]
+
+[[package]]
+name = "autocfg"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
+
+[[package]]
+name = "bindgen"
+version = "0.68.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "726e4313eb6ec35d2730258ad4e15b547ee75d6afaa1361a922e78e59b7d8078"
+dependencies = [
+ "bitflags 2.4.0",
+ "cexpr",
+ "clang-sys",
+ "lazy_static",
+ "lazycell",
+ "peeking_take_while",
+ "proc-macro2",
+ "quote",
+ "regex",
+ "rustc-hash",
+ "shlex",
+ "syn 2.0.29",
+]
+
+[[package]]
+name = "bit-set"
+version = "0.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1"
+dependencies = [
+ "bit-vec",
+]
+
+[[package]]
+name = "bit-vec"
+version = "0.6.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb"
+
+[[package]]
+name = "bitflags"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
+
+[[package]]
+name = "bitflags"
+version = "2.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635"
+
+[[package]]
+name = "block-buffer"
+version = "0.10.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "bstr"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a246e68bb43f6cd9db24bea052a53e40405417c5fb372e3d1a8a7f770a564ef5"
+dependencies = [
+ "memchr",
+ "once_cell",
+ "regex-automata",
+ "serde",
+]
+
+[[package]]
+name = "bumpalo"
+version = "3.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1"
+
+[[package]]
+name = "byteorder"
+version = "1.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
+
+[[package]]
+name = "cc"
+version = "1.0.79"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f"
+
+[[package]]
+name = "cexpr"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"
+dependencies = [
+ "nom",
+]
+
+[[package]]
+name = "cfg-if"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
+
+[[package]]
+name = "cfg-if"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+
+[[package]]
+name = "chrono"
+version = "0.4.26"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5"
+dependencies = [
+ "android-tzdata",
+ "iana-time-zone",
+ "num-traits",
+ "winapi",
+]
+
+[[package]]
+name = "clang-sys"
+version = "1.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f"
+dependencies = [
+ "glob",
+ "libc",
+ "libloading",
+]
+
+[[package]]
+name = "clap"
+version = "4.3.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2686c4115cb0810d9a984776e197823d08ec94f176549a89a9efded477c456dc"
+dependencies = [
+ "clap_builder",
+]
+
+[[package]]
+name = "clap_builder"
+version = "4.3.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2e53afce1efce6ed1f633cf0e57612fe51db54a1ee4fd8f8503d078fe02d69ae"
+dependencies = [
+ "anstream",
+ "anstyle",
+ "bitflags 1.3.2",
+ "clap_lex",
+ "strsim",
+]
+
+[[package]]
+name = "clap_lex"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b"
+
+[[package]]
+name = "colorchoice"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7"
+
+[[package]]
+name = "core-foundation-sys"
+version = "0.8.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa"
+
+[[package]]
+name = "cpufeatures"
+version = "0.2.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "03e69e28e9f7f77debdedbaafa2866e1de9ba56df55a8bd7cfc724c25a09987c"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "crc"
+version = "3.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe"
+dependencies = [
+ "crc-catalog",
+]
+
+[[package]]
+name = "crc-catalog"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9cace84e55f07e7301bae1c519df89cdad8cc3cd868413d3fdbdeca9ff3db484"
+
+[[package]]
+name = "crypto-common"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
+dependencies = [
+ "generic-array",
+ "typenum",
+]
+
+[[package]]
+name = "data-encoding"
+version = "2.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308"
+
+[[package]]
+name = "dbus"
+version = "0.9.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1bb21987b9fb1613058ba3843121dd18b163b254d8a6e797e144cbac14d96d1b"
+dependencies = [
+ "libc",
+ "libdbus-sys",
+ "winapi",
+]
+
+[[package]]
+name = "dbus-tree"
+version = "0.9.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f456e698ae8e54575e19ddb1f9b7bce2298568524f215496b248eb9498b4f508"
+dependencies = [
+ "dbus",
+]
+
+[[package]]
+name = "devicemapper"
+version = "0.34.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9ff98688149bf6128f259f0009f98eb8ad82584aa0aae143081fdfde513d3d13"
+dependencies = [
+ "bitflags 2.4.0",
+ "devicemapper-sys",
+ "env_logger",
+ "lazy_static",
+ "log",
+ "nix 0.26.2",
+ "rand",
+ "retry",
+ "semver",
+ "serde",
+]
+
+[[package]]
+name = "devicemapper-sys"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "734fba4d2e6b551396439ea7dd4f56980b11bb096bbf505d4a259943b228367b"
+dependencies = [
+ "bindgen",
+]
+
+[[package]]
+name = "difflib"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8"
+
+[[package]]
+name = "digest"
+version = "0.10.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
+dependencies = [
+ "block-buffer",
+ "crypto-common",
+]
+
+[[package]]
+name = "doc-comment"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10"
+
+[[package]]
+name = "either"
+version = "1.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91"
+
+[[package]]
+name = "env_logger"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0"
+dependencies = [
+ "humantime",
+ "is-terminal",
+ "log",
+ "regex",
+ "termcolor",
+]
+
+[[package]]
+name = "errno"
+version = "0.2.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1"
+dependencies = [
+ "errno-dragonfly",
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "errno"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a"
+dependencies = [
+ "errno-dragonfly",
+ "libc",
+ "windows-sys",
+]
+
+[[package]]
+name = "errno-dragonfly"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf"
+dependencies = [
+ "cc",
+ "libc",
+]
+
+[[package]]
+name = "fastrand"
+version = "1.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be"
+dependencies = [
+ "instant",
+]
+
+[[package]]
+name = "float-cmp"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4"
+dependencies = [
+ "num-traits",
+]
+
+[[package]]
+name = "fnv"
+version = "1.0.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
+
+[[package]]
+name = "futures"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40"
+dependencies = [
+ "futures-channel",
+ "futures-core",
+ "futures-executor",
+ "futures-io",
+ "futures-sink",
+ "futures-task",
+ "futures-util",
+]
+
+[[package]]
+name = "futures-channel"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2"
+dependencies = [
+ "futures-core",
+ "futures-sink",
+]
+
+[[package]]
+name = "futures-core"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c"
+
+[[package]]
+name = "futures-executor"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0"
+dependencies = [
+ "futures-core",
+ "futures-task",
+ "futures-util",
+]
+
+[[package]]
+name = "futures-io"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964"
+
+[[package]]
+name = "futures-macro"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.29",
+]
+
+[[package]]
+name = "futures-sink"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e"
+
+[[package]]
+name = "futures-task"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65"
+
+[[package]]
+name = "futures-util"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533"
+dependencies = [
+ "futures-channel",
+ "futures-core",
+ "futures-io",
+ "futures-macro",
+ "futures-sink",
+ "futures-task",
+ "memchr",
+ "pin-project-lite",
+ "pin-utils",
+ "slab",
+]
+
+[[package]]
+name = "generic-array"
+version = "0.14.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
+dependencies = [
+ "typenum",
+ "version_check",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.2.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427"
+dependencies = [
+ "cfg-if 1.0.0",
+ "libc",
+ "wasi",
+]
+
+[[package]]
+name = "glob"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
+
+[[package]]
+name = "hermit-abi"
+version = "0.2.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "hermit-abi"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b"
+
+[[package]]
+name = "humantime"
+version = "2.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
+
+[[package]]
+name = "iana-time-zone"
+version = "0.1.57"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613"
+dependencies = [
+ "android_system_properties",
+ "core-foundation-sys",
+ "iana-time-zone-haiku",
+ "js-sys",
+ "wasm-bindgen",
+ "windows",
+]
+
+[[package]]
+name = "iana-time-zone-haiku"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
+dependencies = [
+ "cc",
+]
+
+[[package]]
+name = "instant"
+version = "0.1.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
+dependencies = [
+ "cfg-if 1.0.0",
+]
+
+[[package]]
+name = "io-lifetimes"
+version = "1.0.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2"
+dependencies = [
+ "hermit-abi 0.3.2",
+ "libc",
+ "windows-sys",
+]
+
+[[package]]
+name = "iocuddle"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d8972d5be69940353d5347a1344cb375d9b457d6809b428b05bb1ca2fb9ce007"
+
+[[package]]
+name = "is-terminal"
+version = "0.4.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f"
+dependencies = [
+ "hermit-abi 0.3.2",
+ "io-lifetimes",
+ "rustix",
+ "windows-sys",
+]
+
+[[package]]
+name = "itertools"
+version = "0.10.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"
+dependencies = [
+ "either",
+]
+
+[[package]]
+name = "itertools"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57"
+dependencies = [
+ "either",
+]
+
+[[package]]
+name = "itoa"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6"
+
+[[package]]
+name = "js-sys"
+version = "0.3.64"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a"
+dependencies = [
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "lazy_static"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
+
+[[package]]
+name = "lazycell"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
+
+[[package]]
+name = "libblkid-rs"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b43fd7c0de11a5209aff91fb625c118fc15173ae3dd0ac11e8f61a1b4d1a863"
+dependencies = [
+ "either",
+ "libblkid-rs-sys",
+ "libc",
+ "uuid",
+]
+
+[[package]]
+name = "libblkid-rs-sys"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "163068067b2faf263fb2fc3daff137b45608ee185044ca849dc41438aa38e23a"
+dependencies = [
+ "bindgen",
+ "cc",
+]
+
+[[package]]
+name = "libc"
+version = "0.2.149"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b"
+
+[[package]]
+name = "libcryptsetup-rs"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "73d2aa26d63e5289d6fac1e7e0be2e248ded9b5dfb3e2c345820d060c537d4b6"
+dependencies = [
+ "bitflags 2.4.0",
+ "either",
+ "lazy_static",
+ "libc",
+ "libcryptsetup-rs-sys",
+ "log",
+ "pkg-config",
+ "semver",
+ "serde_json",
+ "uuid",
+]
+
+[[package]]
+name = "libcryptsetup-rs-sys"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "20fc299fd05078d353a895d940fc463d1008d94258fc8096c095467549324707"
+dependencies = [
+ "bindgen",
+ "cc",
+ "pkg-config",
+ "semver",
+]
+
+[[package]]
+name = "libdbus-sys"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "06085512b750d640299b79be4bad3d2fa90a9c00b1fd9e1b46364f66f0485c72"
+dependencies = [
+ "pkg-config",
+]
+
+[[package]]
+name = "libloading"
+version = "0.7.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f"
+dependencies = [
+ "cfg-if 1.0.0",
+ "winapi",
+]
+
+[[package]]
+name = "libm"
+version = "0.2.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4"
+
+[[package]]
+name = "libmount"
+version = "0.1.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "23c4c2ad2d5cbd2f5a05620c3daf45930add53ec207fa99ce5eec971089dc35f"
+dependencies = [
+ "libc",
+ "nix 0.14.1",
+ "quick-error",
+]
+
+[[package]]
+name = "libudev"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "78b324152da65df7bb95acfcaab55e3097ceaab02fb19b228a9eb74d55f135e0"
+dependencies = [
+ "libc",
+ "libudev-sys",
+]
+
+[[package]]
+name = "libudev-sys"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3c8469b4a23b962c1396b9b451dda50ef5b283e8dd309d69033475fa9b334324"
+dependencies = [
+ "libc",
+ "pkg-config",
+]
+
+[[package]]
+name = "linux-raw-sys"
+version = "0.3.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519"
+
+[[package]]
+name = "log"
+version = "0.4.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4"
+
+[[package]]
+name = "loopdev"
+version = "0.4.0"
+source = "git+https://github.com/mulkieran/loopdev?branch=bump-bindgen-reduce-version-0.68.1#63e6105d5599d9df00041de873d7fc91f53b9f20"
+dependencies = [
+ "bindgen",
+ "errno 0.2.8",
+ "libc",
+]
+
+[[package]]
+name = "memchr"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
+
+[[package]]
+name = "memoffset"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "minimal-lexical"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
+
+[[package]]
+name = "mio"
+version = "0.8.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2"
+dependencies = [
+ "libc",
+ "wasi",
+ "windows-sys",
+]
+
+[[package]]
+name = "nix"
+version = "0.14.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c722bee1037d430d0f8e687bbdbf222f27cc6e4e68d5caf630857bb2b6dbdce"
+dependencies = [
+ "bitflags 1.3.2",
+ "cc",
+ "cfg-if 0.1.10",
+ "libc",
+ "void",
+]
+
+[[package]]
+name = "nix"
+version = "0.26.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a"
+dependencies = [
+ "bitflags 1.3.2",
+ "cfg-if 1.0.0",
+ "libc",
+ "memoffset",
+ "pin-utils",
+ "static_assertions",
+]
+
+[[package]]
+name = "nom"
+version = "7.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
+dependencies = [
+ "memchr",
+ "minimal-lexical",
+]
+
+[[package]]
+name = "normalize-line-endings"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be"
+
+[[package]]
+name = "num-traits"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd"
+dependencies = [
+ "autocfg",
+ "libm",
+]
+
+[[package]]
+name = "num_cpus"
+version = "1.15.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b"
+dependencies = [
+ "hermit-abi 0.2.6",
+ "libc",
+]
+
+[[package]]
+name = "once_cell"
+version = "1.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"
+
+[[package]]
+name = "peeking_take_while"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
+
+[[package]]
+name = "pin-project-lite"
+version = "0.2.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116"
+
+[[package]]
+name = "pin-utils"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
+
+[[package]]
+name = "pkg-config"
+version = "0.3.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964"
+
+[[package]]
+name = "ppv-lite86"
+version = "0.2.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
+
+[[package]]
+name = "predicates"
+version = "3.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09963355b9f467184c04017ced4a2ba2d75cbcb4e7462690d388233253d4b1a9"
+dependencies = [
+ "anstyle",
+ "difflib",
+ "float-cmp",
+ "itertools 0.10.5",
+ "normalize-line-endings",
+ "predicates-core",
+ "regex",
+]
+
+[[package]]
+name = "predicates-core"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174"
+
+[[package]]
+name = "predicates-tree"
+version = "1.0.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf"
+dependencies = [
+ "predicates-core",
+ "termtree",
+]
+
+[[package]]
+name = "pretty-hex"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c6fa0831dd7cc608c38a5e323422a0077678fa5744aa2be4ad91c4ece8eec8d5"
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.66"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "proptest"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4e35c06b98bf36aba164cc17cb25f7e232f5c4aeea73baa14b8a9f0d92dbfa65"
+dependencies = [
+ "bit-set",
+ "bitflags 1.3.2",
+ "byteorder",
+ "lazy_static",
+ "num-traits",
+ "rand",
+ "rand_chacha",
+ "rand_xorshift",
+ "regex-syntax 0.6.29",
+ "rusty-fork",
+ "tempfile",
+ "unarray",
+]
+
+[[package]]
+name = "quick-error"
+version = "1.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
+
+[[package]]
+name = "quote"
+version = "1.0.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "rand"
+version = "0.8.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
+dependencies = [
+ "libc",
+ "rand_chacha",
+ "rand_core",
+]
+
+[[package]]
+name = "rand_chacha"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
+dependencies = [
+ "ppv-lite86",
+ "rand_core",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.6.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
+dependencies = [
+ "getrandom",
+]
+
+[[package]]
+name = "rand_xorshift"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f"
+dependencies = [
+ "rand_core",
+]
+
+[[package]]
+name = "redox_syscall"
+version = "0.3.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29"
+dependencies = [
+ "bitflags 1.3.2",
+]
+
+[[package]]
+name = "regex"
+version = "1.8.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-syntax 0.7.2",
+]
+
+[[package]]
+name = "regex-automata"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
+
+[[package]]
+name = "regex-syntax"
+version = "0.6.29"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
+
+[[package]]
+name = "regex-syntax"
+version = "0.7.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78"
+
+[[package]]
+name = "retry"
+version = "1.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac95c60a949a63fd2822f4964939662d8f2c16c4fa0624fd954bc6e703b9a3f6"
+
+[[package]]
+name = "rustc-hash"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
+
+[[package]]
+name = "rustix"
+version = "0.37.25"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d4eb579851244c2c03e7c24f501c3432bed80b8f720af1d6e5b0e0f01555a035"
+dependencies = [
+ "bitflags 1.3.2",
+ "errno 0.3.1",
+ "io-lifetimes",
+ "libc",
+ "linux-raw-sys",
+ "windows-sys",
+]
+
+[[package]]
+name = "rusty-fork"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f"
+dependencies = [
+ "fnv",
+ "quick-error",
+ "tempfile",
+ "wait-timeout",
+]
+
+[[package]]
+name = "ryu"
+version = "1.0.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041"
+
+[[package]]
+name = "semver"
+version = "1.0.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed"
+
+[[package]]
+name = "serde"
+version = "1.0.188"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e"
+dependencies = [
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.188"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.29",
+]
+
+[[package]]
+name = "serde_json"
+version = "1.0.97"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bdf3bf93142acad5821c99197022e170842cdbc1c30482b98750c688c640842a"
+dependencies = [
+ "itoa",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "sha2"
+version = "0.10.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8"
+dependencies = [
+ "cfg-if 1.0.0",
+ "cpufeatures",
+ "digest",
+]
+
+[[package]]
+name = "shlex"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3"
+
+[[package]]
+name = "signal-hook-registry"
+version = "1.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "slab"
+version = "0.4.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "socket2"
+version = "0.4.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662"
+dependencies = [
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "static_assertions"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
+
+[[package]]
+name = "stratisd"
+version = "3.6.1"
+dependencies = [
+ "assert_cmd",
+ "assert_matches",
+ "async-trait",
+ "bindgen",
+ "byteorder",
+ "chrono",
+ "clap",
+ "crc",
+ "data-encoding",
+ "dbus",
+ "dbus-tree",
+ "devicemapper",
+ "either",
+ "env_logger",
+ "futures",
+ "iocuddle",
+ "itertools 0.11.0",
+ "lazy_static",
+ "libblkid-rs",
+ "libc",
+ "libcryptsetup-rs",
+ "libcryptsetup-rs-sys",
+ "libmount",
+ "libudev",
+ "log",
+ "loopdev",
+ "nix 0.26.2",
+ "pkg-config",
+ "predicates",
+ "pretty-hex",
+ "proptest",
+ "rand",
+ "regex",
+ "retry",
+ "serde",
+ "serde_derive",
+ "serde_json",
+ "sha2",
+ "stratisd_proc_macros",
+ "tempfile",
+ "termios",
+ "tokio",
+ "uuid",
+]
+
+[[package]]
+name = "stratisd_proc_macros"
+version = "0.2.1"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "strsim"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
+
+[[package]]
+name = "syn"
+version = "1.0.109"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "syn"
+version = "2.0.29"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "tempfile"
+version = "3.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6"
+dependencies = [
+ "autocfg",
+ "cfg-if 1.0.0",
+ "fastrand",
+ "redox_syscall",
+ "rustix",
+ "windows-sys",
+]
+
+[[package]]
+name = "termcolor"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6"
+dependencies = [
+ "winapi-util",
+]
+
+[[package]]
+name = "termios"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "411c5bf740737c7918b8b1fe232dca4dc9f8e754b8ad5e20966814001ed0ac6b"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "termtree"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76"
+
+[[package]]
+name = "tokio"
+version = "1.28.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "94d7b1cfd2aa4011f2de74c2c4c63665e27a71006b0a192dcd2710272e73dfa2"
+dependencies = [
+ "autocfg",
+ "libc",
+ "mio",
+ "num_cpus",
+ "pin-project-lite",
+ "signal-hook-registry",
+ "socket2",
+ "tokio-macros",
+ "windows-sys",
+]
+
+[[package]]
+name = "tokio-macros"
+version = "2.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.29",
+]
+
+[[package]]
+name = "typenum"
+version = "1.16.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba"
+
+[[package]]
+name = "unarray"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94"
+
+[[package]]
+name = "unicode-ident"
+version = "1.0.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0"
+
+[[package]]
+name = "utf8parse"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
+
+[[package]]
+name = "uuid"
+version = "1.3.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0fa2982af2eec27de306107c027578ff7f423d65f7250e40ce0fea8f45248b81"
+dependencies = [
+ "getrandom",
+ "serde",
+]
+
+[[package]]
+name = "version_check"
+version = "0.9.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
+
+[[package]]
+name = "void"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
+
+[[package]]
+name = "wait-timeout"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "wasi"
+version = "0.11.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
+
+[[package]]
+name = "wasm-bindgen"
+version = "0.2.87"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342"
+dependencies = [
+ "cfg-if 1.0.0",
+ "wasm-bindgen-macro",
+]
+
+[[package]]
+name = "wasm-bindgen-backend"
+version = "0.2.87"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd"
+dependencies = [
+ "bumpalo",
+ "log",
+ "once_cell",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.29",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-macro"
+version = "0.2.87"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d"
+dependencies = [
+ "quote",
+ "wasm-bindgen-macro-support",
+]
+
+[[package]]
+name = "wasm-bindgen-macro-support"
+version = "0.2.87"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.29",
+ "wasm-bindgen-backend",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-shared"
+version = "0.2.87"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1"
+
+[[package]]
+name = "winapi"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
+dependencies = [
+ "winapi-i686-pc-windows-gnu",
+ "winapi-x86_64-pc-windows-gnu",
+]
+
+[[package]]
+name = "winapi-i686-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+
+[[package]]
+name = "winapi-util"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "winapi-x86_64-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+
+[[package]]
+name = "windows"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f"
+dependencies = [
+ "windows-targets",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
+dependencies = [
+ "windows-targets",
+]
+
+[[package]]
+name = "windows-targets"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5"
+dependencies = [
+ "windows_aarch64_gnullvm",
+ "windows_aarch64_msvc",
+ "windows_i686_gnu",
+ "windows_i686_msvc",
+ "windows_x86_64_gnu",
+ "windows_x86_64_gnullvm",
+ "windows_x86_64_msvc",
+]
+
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc"
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1"
+
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"
diff --git a/nixpkgs/pkgs/tools/filesystems/stratisd/default.nix b/nixpkgs/pkgs/tools/filesystems/stratisd/default.nix
new file mode 100644
index 000000000000..ea519112b1cf
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/stratisd/default.nix
@@ -0,0 +1,123 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, rustPlatform
+, cargo
+, rustc
+, pkg-config
+, asciidoc
+, ncurses
+, glibc
+, dbus
+, cryptsetup
+, util-linux
+, udev
+, lvm2
+, systemd
+, xfsprogs
+, thin-provisioning-tools
+, clevis
+, jose
+, jq
+, curl
+, tpm2-tools
+, coreutils
+, clevisSupport ? false
+, nixosTests
+}:
+
+stdenv.mkDerivation rec {
+  pname = "stratisd";
+  version = "3.6.1";
+
+  src = fetchFromGitHub {
+    owner = "stratis-storage";
+    repo = pname;
+    rev = "refs/tags/stratisd-v${version}";
+    hash = "sha256-qpuJzsN6AXqvKtKBDZZEmviWBpPR0qNuq+3tIHGSWLs=";
+  };
+
+  cargoDeps = rustPlatform.importCargoLock {
+    lockFile = ./Cargo.lock;
+    outputHashes = {
+      "loopdev-0.4.0" = "sha256-YS0hqxphxbbImT/mn/XBzkgabK2kbIym5VqG3XDVAx8=";
+    };
+  };
+
+  postPatch = ''
+    substituteInPlace udev/61-stratisd.rules \
+      --replace stratis-base32-decode "$out/lib/udev/stratis-base32-decode" \
+      --replace stratis-str-cmp       "$out/lib/udev/stratis-str-cmp"
+
+    substituteInPlace systemd/stratis-fstab-setup \
+      --replace stratis-min           "$out/bin/stratis-min" \
+      --replace systemd-ask-password  "${systemd}/bin/systemd-ask-password" \
+      --replace sleep                 "${coreutils}/bin/sleep" \
+      --replace udevadm               "${udev}/bin/udevadm"
+  '';
+
+  nativeBuildInputs = [
+    rustPlatform.cargoSetupHook
+    rustPlatform.bindgenHook
+    cargo
+    rustc
+    pkg-config
+    asciidoc
+    ncurses # tput
+  ];
+
+  buildInputs = [
+    glibc
+    glibc.static
+    dbus
+    cryptsetup
+    util-linux
+    udev
+    lvm2
+  ];
+
+  outputs = [ "out" "initrd" ];
+
+  env.EXECUTABLES_PATHS = lib.makeBinPath ([
+    xfsprogs
+    thin-provisioning-tools
+  ] ++ lib.optionals clevisSupport [
+    clevis
+    jose
+    jq
+    cryptsetup
+    curl
+    tpm2-tools
+    coreutils
+  ]);
+
+  makeFlags = [ "PREFIX=${placeholder "out"}" "INSTALL=install" ];
+  buildFlags = [ "build-all" ];
+
+  doCheck = true;
+  checkTarget = "test";
+
+  # remove files for supporting dracut
+  postInstall = ''
+    mkdir -p "$initrd/bin"
+    cp "dracut/90stratis/stratis-rootfs-setup" "$initrd/bin"
+    mkdir -p "$initrd/lib/systemd/system"
+    substitute "dracut/90stratis/stratisd-min.service" "$initrd/lib/systemd/system/stratisd-min.service" \
+      --replace /usr "$out" \
+      --replace mkdir "${coreutils}/bin/mkdir"
+    mkdir -p "$initrd/lib/udev/rules.d"
+    cp udev/61-stratisd.rules "$initrd/lib/udev/rules.d"
+    rm -r "$out/lib/dracut"
+    rm -r "$out/lib/systemd/system-generators"
+  '';
+
+  passthru.tests = nixosTests.stratis;
+
+  meta = with lib; {
+    description = "Easy to use local storage management for Linux";
+    homepage = "https://stratis-storage.github.io";
+    license = licenses.mpl20;
+    maintainers = with maintainers; [ nickcao ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/stuffbin/default.nix b/nixpkgs/pkgs/tools/filesystems/stuffbin/default.nix
new file mode 100644
index 000000000000..2640ba8b8519
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/stuffbin/default.nix
@@ -0,0 +1,25 @@
+{ lib, buildGoModule, fetchFromGitHub }:
+
+buildGoModule rec {
+  pname = "stuffbin";
+  version = "1.1.0";
+
+  vendorHash = null;
+
+  src = fetchFromGitHub {
+    owner = "knadh";
+    repo = "stuffbin";
+    rev = "v${version}";
+    sha256 = "sha256-M72xNh7bKUMLzA+M8bJB++kJ5KCrkboQm1v8BasP3Yo=";
+  };
+
+  ldflags = [ "-s" "-w" "-X main.version=${version}" ];
+
+  meta = with lib; {
+    description = "Compress and embed static files and assets into Go binaries and access them with a virtual file system in production";
+    homepage = "https://github.com/knadh/stuffbin";
+    changelog = "https://github.com/knadh/stuffbin/releases/tag/v${version}";
+    maintainers = with maintainers; [ raitobezarius ];
+    license = licenses.mit;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/supertag/cargo-lock-update-lexical-core.patch b/nixpkgs/pkgs/tools/filesystems/supertag/cargo-lock-update-lexical-core.patch
new file mode 100644
index 000000000000..70c941ddd125
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/supertag/cargo-lock-update-lexical-core.patch
@@ -0,0 +1,27 @@
+--- a/Cargo.lock
++++ b/Cargo.lock
+@@ -1,5 +1,7 @@
+ # This file is automatically @generated by Cargo.
+ # It is not intended for manual editing.
++version = 3
++
+ [[package]]
+ name = "adler32"
+ version = "1.2.0"
+@@ -530,13 +532,13 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
+ 
+ [[package]]
+ name = "lexical-core"
+-version = "0.7.4"
++version = "0.7.6"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "db65c6da02e61f55dae90a0ae427b2a5f6b3e8db09f58d10efab23af92592616"
++checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe"
+ dependencies = [
+  "arrayvec",
+  "bitflags 1.2.1",
+- "cfg-if 0.1.10",
++ "cfg-if 1.0.0",
+  "ryu",
+  "static_assertions",
+ ]
diff --git a/nixpkgs/pkgs/tools/filesystems/supertag/default.nix b/nixpkgs/pkgs/tools/filesystems/supertag/default.nix
new file mode 100644
index 000000000000..cee8ae3ead44
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/supertag/default.nix
@@ -0,0 +1,43 @@
+{ lib, rustPlatform, fetchFromGitHub
+, pkg-config
+, dbus, fuse, sqlite
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "supertag";
+  version = "0.1.4";
+
+  src = fetchFromGitHub {
+    owner = "amoffat";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0jzm7pn38hlr96n0z8gqfsfdbw48y0nnbsgjdq7hpgwmcgvgqdam";
+  };
+
+  # lexical-core is outdated and incompatible with newer versions of rust
+  # patches Cargo.lock to include a more up-to-date version of lexical-core
+  cargoPatches = [ ./cargo-lock-update-lexical-core.patch ];
+
+  cargoSha256 = "sha256-W5Emkbe1jI9Z+irMckD/3gJO47rACa9E5k5dqAFC1yQ=";
+
+  nativeBuildInputs = [ rustPlatform.bindgenHook pkg-config ];
+  buildInputs = [ dbus fuse sqlite ];
+
+  # The test are requiring extended permissions.
+  doCheck = false;
+
+  meta = with lib; {
+    description = "A tag-based filesystem";
+    longDescription = ''
+      Supertag is a tag-based filesystem, written in Rust, for Linux and MacOS.
+      It provides a tag-based view of your files by removing the hierarchy
+      constraints typically imposed on files and folders. In other words, it
+      allows you to think about your files not as objects stored in folders, but
+      as objects that can be filtered by folders.
+    '';
+    homepage = "https://github.com/amoffat/supertag";
+    license = licenses.agpl3Plus;
+    platforms = [ "i686-linux" "x86_64-linux" ];
+    maintainers = with maintainers; [ oxzi ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/svnfs/default.nix b/nixpkgs/pkgs/tools/filesystems/svnfs/default.nix
new file mode 100644
index 000000000000..e892d89dc3b3
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/svnfs/default.nix
@@ -0,0 +1,44 @@
+{ lib, stdenv, fetchurl, autoreconfHook, subversion, fuse, apr, perl }:
+
+stdenv.mkDerivation rec {
+  pname = "svnfs";
+  version = "0.4";
+
+  src = fetchurl {
+    url = "http://www.jmadden.eu/wp-content/uploads/svnfs/svnfs-${version}.tgz";
+    sha256 = "1lrzjr0812lrnkkwk60bws9k1hq2iibphm0nhqyv26axdsygkfky";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+  buildInputs = [ subversion fuse apr perl ];
+
+  # autoconf's AC_CHECK_HEADERS and AC_CHECK_LIBS fail to detect libfuse on
+  # Darwin if FUSE_USE_VERSION isn't set at configure time.
+  #
+  # NOTE: Make sure the value of FUSE_USE_VERSION specified here matches the
+  # actual version used in the source code:
+  #
+  #     $ tar xf "$(nix-build -A svnfs.src)"
+  #     $ grep -R FUSE_USE_VERSION
+  configureFlags = lib.optionals stdenv.isDarwin [ "CFLAGS=-DFUSE_USE_VERSION=25" ];
+
+  # why is this required?
+  preConfigure=''
+    export LD_LIBRARY_PATH=${subversion.out}/lib
+  '';
+
+  # -fcommon: workaround build failure on -fno-common toolchains like upstream
+  # gcc-10. Otherwise build fails as:
+  #   ld: svnclient.o:/build/svnfs-0.4/src/svnfs.h:40: multiple definition of
+  #     `dirbuf'; svnfs.o:/build/svnfs-0.4/src/svnfs.h:40: first defined here
+  env.NIX_CFLAGS_COMPILE = "-I ${subversion.dev}/include/subversion-1 -fcommon";
+  NIX_LDFLAGS="-lsvn_client-1 -lsvn_subr-1";
+
+  meta = {
+    description = "FUSE filesystem for accessing Subversion repositories";
+    homepage = "https://www.jmadden.eu/index.php/svnfs/";
+    license = lib.licenses.gpl2Only;
+    maintainers = [lib.maintainers.marcweber];
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/tar2ext4/default.nix b/nixpkgs/pkgs/tools/filesystems/tar2ext4/default.nix
new file mode 100644
index 000000000000..2168bc1aa312
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/tar2ext4/default.nix
@@ -0,0 +1,22 @@
+{ lib, buildGoModule, fetchFromGitHub }:
+
+buildGoModule rec {
+  pname = "tar2ext4";
+  version = "0.11.1";
+
+  src = fetchFromGitHub {
+    owner = "microsoft";
+    repo = "hcsshim";
+    rev = "v${version}";
+    sha256 = "sha256-iz8trRuGyIpGbRX+qYyKKS9gR8daLTRzKmlxE94eDzo=";
+  };
+
+  sourceRoot = "${src.name}/cmd/tar2ext4";
+  vendorHash = null;
+
+  meta = with lib; {
+    description = "Convert a tar archive to an ext4 image";
+    maintainers = with maintainers; [ qyliss ];
+    license = licenses.mit;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/tmsu/default.nix b/nixpkgs/pkgs/tools/filesystems/tmsu/default.nix
new file mode 100644
index 000000000000..aa3057202c74
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/tmsu/default.nix
@@ -0,0 +1,42 @@
+{ lib, buildGoPackage, fetchFromGitHub, installShellFiles }:
+
+buildGoPackage rec {
+  pname = "tmsu";
+  version = "0.7.5";
+  goPackagePath = "github.com/oniony/TMSU";
+
+  src = fetchFromGitHub {
+    owner = "oniony";
+    repo = "tmsu";
+    rev = "v${version}";
+    sha256 = "0834hah7p6ad81w60ifnxyh9zn09ddfgrll04kwjxwp7ypbv38wq";
+  };
+
+  goDeps = ./deps.nix;
+
+  nativeBuildInputs = [ installShellFiles ];
+
+  preBuild = ''
+    mv go/src/${goPackagePath} src
+    mv src/src/${goPackagePath} go/src/${goPackagePath}
+    export GOPATH=$PWD:$GOPATH
+  '';
+
+  postInstall = ''
+    # can't do "mv TMSU tmsu" on case-insensitive filesystems
+    mv $out/bin/{TMSU,tmsu.tmp}
+    mv $out/bin/{tmsu.tmp,tmsu}
+
+    cp src/misc/bin/* $out/bin/
+    installManPage src/misc/man/tmsu.1
+    installShellCompletion --zsh src/misc/zsh/_tmsu
+  '';
+
+  meta = with lib; {
+    homepage    = "http://www.tmsu.org";
+    description = "A tool for tagging your files using a virtual filesystem";
+    maintainers = with maintainers; [ pSub ];
+    license     = licenses.gpl3Plus;
+    platforms   = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/tmsu/deps.nix b/nixpkgs/pkgs/tools/filesystems/tmsu/deps.nix
new file mode 100644
index 000000000000..7dee6324b672
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/tmsu/deps.nix
@@ -0,0 +1,39 @@
+# This file was generated by https://github.com/kamilchm/go2nix v1.3.0
+[
+  {
+    goPackagePath = "github.com/hanwen/go-fuse";
+    fetch = {
+      type = "git";
+      url = "https://github.com/hanwen/go-fuse";
+      rev = "0f728ba15b38579efefc3dc47821882ca18ffea7";
+      sha256 = "05ymw2pp58avf19wvi0cgdzqf3d88k1jdf6ldj4hmhbkm3waqf7l";
+    };
+  }
+  {
+    goPackagePath = "github.com/mattn/go-sqlite3";
+    fetch = {
+      type = "git";
+      url = "https://github.com/mattn/go-sqlite3";
+      rev = "98a44bcf5949f178c8116fa30e62c9ac2ef65927";
+      sha256 = "108rk74ringkkyx05zlq5khh32fsfi0przyzrpsr1r5j57xrhxj0";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/crypto";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/crypto";
+      rev = "3c4aac89819a5fdc28d906456729d3423fd46969";
+      sha256 = "16q9ay6bl28zrnb377p8lvrs2nd98h7i6y3yi8ccjwzg1czbfdsi";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/sys";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/sys";
+      rev = "1957bb5e6d1f523308b49060df02171d06ddfc77";
+      sha256 = "0imqk4l9785rw7ddvywyf8zn7k3ga6f17ky8rmf8wrri7nknr03f";
+    };
+  }
+]
diff --git a/nixpkgs/pkgs/tools/filesystems/u3-tool/default.nix b/nixpkgs/pkgs/tools/filesystems/u3-tool/default.nix
new file mode 100644
index 000000000000..6abab83b0fd0
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/u3-tool/default.nix
@@ -0,0 +1,21 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "u3-tool";
+  version = "0.3";
+
+  enableParallelBuilding = true;
+
+  src = fetchurl {
+    url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz";
+    sha256 = "1p9c9kibd1pdbdfa0nd0i3n7bvzi3xg0chm38jg3xfl8gsn0390f";
+  };
+
+  meta = with lib; {
+    description = "Tool for controlling the special features of a 'U3 smart drive' USB Flash disk";
+    homepage = "https://sourceforge.net/projects/u3-tool/";
+    license = licenses.gpl2;
+    platforms = with platforms; linux;
+    maintainers = with maintainers; [ makefu ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/ubi_reader/default.nix b/nixpkgs/pkgs/tools/filesystems/ubi_reader/default.nix
new file mode 100644
index 000000000000..0d2e059b78f0
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/ubi_reader/default.nix
@@ -0,0 +1,29 @@
+{ lib
+, python3
+, fetchFromGitHub
+}:
+
+python3.pkgs.buildPythonApplication rec {
+  pname = "ubi_reader";
+  version = "0.8.5";
+  format = "setuptools";
+
+  src = fetchFromGitHub {
+    owner = "jrspruitt";
+    repo = pname;
+    rev = "v${version}-master";
+    hash = "sha256-tjQs1F9kcFrC9FDkfdnax0C8O8Bg7blkpL7GU56eeWU=";
+  };
+
+  propagatedBuildInputs = with python3.pkgs; [ python-lzo ];
+
+  # There are no tests in the source
+  doCheck = false;
+
+  meta = with lib; {
+    description = "Collection of Python scripts for reading information about and extracting data from UBI and UBIFS images";
+    homepage = "https://github.com/jrspruitt/ubi_reader";
+    license = licenses.gpl3Only;
+    maintainers = with maintainers; [ vlaci ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/ubidump/default.nix b/nixpkgs/pkgs/tools/filesystems/ubidump/default.nix
new file mode 100644
index 000000000000..623cef884476
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/ubidump/default.nix
@@ -0,0 +1,41 @@
+{ lib, fetchFromGitHub, python3 }:
+
+python3.pkgs.buildPythonApplication rec {
+
+  pname = "ubidump";
+  version = "unstable-2019-09-11";
+  format = "other";
+
+  src = fetchFromGitHub {
+    owner = "nlitsme";
+    repo = pname;
+    rev = "0691f1a9a38604c2baf8c9af6b826eb2632af74a";
+    sha256 = "1hiivlgni4r3nd5n2rzl5qzw6y2wpjpmyls5lybrc8imd6rmj3w2";
+  };
+
+  propagatedBuildInputs = with python3.pkgs; [ crcmod python-lzo setuptools ];
+
+  dontBuild = true;
+
+  patchPhase = ''
+    sed -i '1s;^;#!${python3.interpreter}\n;' ubidump.py
+    patchShebangs ubidump.py
+  '';
+
+  installPhase = ''
+    install -D -m755 ubidump.py $out/bin/ubidump
+    wrapProgram $out/bin/ubidump --set PYTHONPATH $PYTHONPATH
+  '';
+
+  installCheckPhase = ''
+    $out/bin/ubidump -h  > /dev/null
+  '';
+
+  meta = with lib; {
+    description = "View or extract the contents of UBIFS images";
+    homepage = "https://github.com/nlitsme/ubidump";
+    license = licenses.mit;
+    maintainers = with maintainers; [ sgo ];
+  };
+}
+
diff --git a/nixpkgs/pkgs/tools/filesystems/udftools/default.nix b/nixpkgs/pkgs/tools/filesystems/udftools/default.nix
new file mode 100644
index 000000000000..f50f98d33dc2
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/udftools/default.nix
@@ -0,0 +1,42 @@
+{ lib, stdenv, fetchFromGitHub, ncurses, readline, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "udftools";
+  version = "2.0";
+  src = fetchFromGitHub {
+    owner = "pali";
+    repo = "udftools";
+    rev = version;
+    sha256 = "0mz04h3rki6ljwfs15z83gf4vv816w7xgz923waiqgmfj9xpvx87";
+  };
+
+  buildInputs = [ ncurses readline ];
+  nativeBuildInputs = [ autoreconfHook ];
+
+  hardeningDisable = [ "fortify" ];
+
+  env.NIX_CFLAGS_COMPILE = "-std=gnu90";
+
+  preConfigure = ''
+    sed -e '1i#include <limits.h>' -i cdrwtool/cdrwtool.c -i pktsetup/pktsetup.c
+    sed -e 's@[(]char[*][)]spm [+]=@spm = ((char*) spm) + @' -i wrudf/wrudf.c
+    sed -e '27i#include <string.h>' -i include/udf_endian.h
+    sed -e '38i#include <string.h>' -i wrudf/wrudf-cdrw.c
+    sed -e '12i#include <string.h>' -i wrudf/wrudf-cdr.c
+    sed -e '37i#include <stdlib.h>' -i wrudf/ide-pc.c
+    sed -e '46i#include <sys/sysmacros.h>' -i mkudffs/main.c
+
+    sed -e "s@\$(DESTDIR)/lib/udev/rules.d@$out/lib/udev/rules.d@" -i pktsetup/Makefile.am
+  '';
+
+  postFixup = ''
+    sed -i -e "s@/usr/sbin/pktsetup@$out/sbin/pktsetup@" $out/lib/udev/rules.d/80-pktsetup.rules
+  '';
+
+  meta = with lib; {
+    description = "UDF tools";
+    maintainers = with maintainers; [ raskin ];
+    platforms = platforms.linux;
+    license = licenses.gpl2Plus;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/unionfs-fuse/default.nix b/nixpkgs/pkgs/tools/filesystems/unionfs-fuse/default.nix
new file mode 100644
index 000000000000..4dc9ca9de6e6
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/unionfs-fuse/default.nix
@@ -0,0 +1,51 @@
+{ lib, stdenv, fetchFromGitHub, cmake, fuse }:
+
+stdenv.mkDerivation rec {
+  pname = "unionfs-fuse";
+  version = "2.2";
+
+  src = fetchFromGitHub {
+    owner = "rpodgorny";
+    repo = "unionfs-fuse";
+    rev = "v${version}";
+    sha256 = "sha256-EJryML6E0CW4kvsqMRqV3cq77j50HuylNzgaHD6CL/o=";
+  };
+
+  patches = [
+    # Prevent the unionfs daemon from being killed during
+    # shutdown. See
+    # https://www.freedesktop.org/wiki/Software/systemd/RootStorageDaemons/
+    # for details.
+    ./prevent-kill-on-shutdown.patch
+  ];
+
+  postPatch = lib.optionalString stdenv.isDarwin ''
+    substituteInPlace CMakeLists.txt \
+      --replace '/usr/local/include/osxfuse/fuse' '${fuse}/include/fuse'
+  '';
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ fuse ];
+
+  # Put the unionfs mount helper in place as mount.unionfs-fuse. This makes it
+  # possible to do:
+  #   mount -t unionfs-fuse none /dest -o dirs=/source1=RW,/source2=RO
+  #
+  # This must be done in preConfigure because the build process removes
+  # helper from the source directory during the build.
+  preConfigure = lib.optionalString (!stdenv.isDarwin) ''
+    mkdir -p $out/sbin
+    cp -a mount.unionfs $out/sbin/mount.unionfs-fuse
+    substituteInPlace $out/sbin/mount.unionfs-fuse --replace mount.fuse ${fuse}/sbin/mount.fuse
+    substituteInPlace $out/sbin/mount.unionfs-fuse --replace unionfs $out/bin/unionfs
+  '';
+
+  meta = with lib; {
+    broken = stdenv.isDarwin;
+    description = "FUSE UnionFS implementation";
+    homepage = "https://github.com/rpodgorny/unionfs-fuse";
+    license = licenses.bsd3;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ orivej ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/unionfs-fuse/prevent-kill-on-shutdown.patch b/nixpkgs/pkgs/tools/filesystems/unionfs-fuse/prevent-kill-on-shutdown.patch
new file mode 100644
index 000000000000..0a98b83282b6
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/unionfs-fuse/prevent-kill-on-shutdown.patch
@@ -0,0 +1,14 @@
+diff -ru -x '*~' unionfs-fuse-0.26-orig/src/unionfs.c unionfs-fuse-0.26/src/unionfs.c
+--- unionfs-fuse-0.26-orig/src/unionfs.c	2012-09-11 00:06:32.000000000 +0200
++++ unionfs-fuse-0.26/src/unionfs.c	2014-05-21 14:22:03.597861805 +0200
+@@ -831,6 +831,10 @@
+ 	}
+ #endif
+ 
++	/* Prevent systemd's shutdown from killing us. */
++	if (access("/etc/initrd-release", F_OK) >= 0)
++		argv[0][0] = '@';
++
+ 	umask(0);
+ 	int res = fuse_main(args.argc, args.argv, &unionfs_oper, NULL);
+ 	RETURN(uopt.doexit ? uopt.retval : res);
diff --git a/nixpkgs/pkgs/tools/filesystems/upspin/default.nix b/nixpkgs/pkgs/tools/filesystems/upspin/default.nix
new file mode 100644
index 000000000000..6ef087ff5387
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/upspin/default.nix
@@ -0,0 +1,26 @@
+{ buildGoModule, fetchFromGitHub, lib }:
+
+buildGoModule rec {
+  pname = "upspin";
+  version = "unstable-2023-02-05";
+
+  src = fetchFromGitHub {
+    owner = "upspin";
+    repo = "upspin";
+    rev = "67e250ec27d8878c0009213b8e32c6803f2727ea";
+    sha256 = "sha256-1pFDJSCUDKn4CTAg3wdB8oYPyrmd8B62zNl3m5YAqVM=";
+  };
+
+  vendorHash = "sha256-Jl++FvKyqz5WFa/Eoly+UnFsoC9Qwdaizhkq6LyJ+XQ=";
+
+  # No upstream tests
+  doCheck = false;
+
+  meta = with lib; {
+    description = "A global name space for storing data akin to a filesystem";
+    homepage = "https://upspin.io";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ orthros ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/vmfs-tools/default.nix b/nixpkgs/pkgs/tools/filesystems/vmfs-tools/default.nix
new file mode 100644
index 000000000000..b60dccc4e68f
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/vmfs-tools/default.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv
+, fetchFromGitHub
+, pkg-config
+, asciidoc
+, docbook_xsl
+, fuse
+, libuuid
+, libxslt
+}:
+
+stdenv.mkDerivation rec {
+  pname = "vmfs-tools";
+  version = "0.2.5.20160116";
+
+  src = fetchFromGitHub {
+    owner = "glandium";
+    repo = pname;
+    rev = "4ab76ef5b074bdf06e4b518ff6d50439de05ae7f";
+    sha256 = "14y412ww5hxk336ils62s3fwykfh6mx1j0iiaa5cwc615pi6qvi4";
+  };
+
+  nativeBuildInputs = [ asciidoc docbook_xsl libxslt pkg-config ];
+
+  buildInputs = [ fuse libuuid ];
+
+  enableParallelBuilding = true;
+
+  postInstall = ''
+    install -Dm444 -t $out/share/doc/${pname} AUTHORS LICENSE README TODO
+  '';
+
+  meta = with lib; {
+    description = "FUSE-based VMFS (vmware) file system tools";
+    maintainers = with maintainers; [ peterhoeg ];
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    inherit (src.meta) homepage;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/wdfs/default.nix b/nixpkgs/pkgs/tools/filesystems/wdfs/default.nix
new file mode 100644
index 000000000000..29d8b4c2887b
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/wdfs/default.nix
@@ -0,0 +1,27 @@
+{lib, stdenv, fetchurl, glib, neon, fuse, autoreconfHook, pkg-config}:
+
+stdenv.mkDerivation rec {
+  pname = "wdfs-fuse";
+  version = "1.4.2";
+
+  src = fetchurl {
+    url = "http://noedler.de/projekte/wdfs/wdfs-${version}.tar.gz";
+    sha256 = "fcf2e1584568b07c7f3683a983a9be26fae6534b8109e09167e5dff9114ba2e5";
+  };
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = [fuse glib neon];
+
+  postPatch = lib.optionalString stdenv.isDarwin ''
+    # Fix the build on macOS with macFUSE installed. Needs autoreconfHook to
+    # take effect.
+    substituteInPlace configure.ac --replace \
+      'export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH' ""
+  '';
+
+  meta = with lib; {
+    homepage = "http://noedler.de/projekte/wdfs/";
+    license = licenses.gpl2Plus;
+    description = "User-space filesystem that allows to mount a webdav share";
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/wiimms-iso-tools/default.nix b/nixpkgs/pkgs/tools/filesystems/wiimms-iso-tools/default.nix
new file mode 100644
index 000000000000..4519ee9d42a6
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/wiimms-iso-tools/default.nix
@@ -0,0 +1,48 @@
+{ lib, stdenv, fetchurl, fetchpatch, zlib, ncurses, fuse }:
+
+stdenv.mkDerivation rec {
+  pname = "wiimms-iso-tools";
+  version = "3.05a";
+
+  src = fetchurl {
+    url = "https://download.wiimm.de/source/wiimms-iso-tools/wiimms-iso-tools.source-${version}.txz";
+    hash = "sha256-5aikiPJkZf9OwD8QmQ7ijhBOtFQpkIErvb6gOvEu2L0=";
+  };
+
+  buildInputs = [ zlib ncurses fuse ];
+
+  patches = [
+    ./fix-paths.diff
+
+    # Pull pending upstream fix for ncurses-6.3:
+    #  https://github.com/Wiimm/wiimms-iso-tools/pull/14
+    (fetchpatch {
+      name = "ncurses-6.3.patch";
+      url = "https://github.com/Wiimm/wiimms-iso-tools/commit/3f1e84ec6915cc4f658092d33411985bd3eaf4e6.patch";
+      sha256 = "18cfri4y1082phg6fzh402gk5ri24wr8ff4zl8v5rlgjndh610im";
+      stripLen = 1;
+    })
+  ];
+
+  postPatch = ''
+    patchShebangs setup.sh gen-template.sh gen-text-file.sh
+    substituteInPlace setup.sh --replace gcc "$CC"
+    substituteInPlace Makefile --replace gcc "$CC"
+  '';
+
+  INSTALL_PATH = "$out";
+
+  installPhase = ''
+    mkdir "$out"
+    patchShebangs install.sh
+    ./install.sh --no-sudo
+  '';
+
+  meta = with lib; {
+    homepage = "https://wit.wiimm.de";
+    description = "A set of command line tools to manipulate Wii and GameCube ISO images and WBFS containers";
+    license = licenses.gpl2;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ nilp0inter ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/wiimms-iso-tools/fix-paths.diff b/nixpkgs/pkgs/tools/filesystems/wiimms-iso-tools/fix-paths.diff
new file mode 100644
index 000000000000..4a545e92a185
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/wiimms-iso-tools/fix-paths.diff
@@ -0,0 +1,12 @@
+diff -r -u wiimms-iso-tools.source-3.02a.patched/setup.sh wiimms-iso-tools.source-3.02a/setup.sh
+--- wiimms-iso-tools.source-3.02a.patched/setup.sh	2020-06-02 23:48:18.651495869 +0200
++++ wiimms-iso-tools.source-3.02a/setup.sh	2020-06-02 23:48:29.758162513 +0200
+@@ -57,7 +57,7 @@
+ 
+ #--------------------------------------------------
+ 
+-INSTALL_PATH=/usr/local
++ INSTALL_PATH="$out"
+ 
+ if [[ -d $INSTALL_PATH/bin ]]
+ then
diff --git a/nixpkgs/pkgs/tools/filesystems/wipefreespace/default.nix b/nixpkgs/pkgs/tools/filesystems/wipefreespace/default.nix
new file mode 100644
index 000000000000..f9d586d91d68
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/wipefreespace/default.nix
@@ -0,0 +1,53 @@
+{ stdenv
+, lib
+, fetchurl
+, e2fsprogs
+, ntfs3g
+, xfsprogs
+, reiser4progs
+, libaal
+, jfsutils
+, libuuid
+, texinfo
+}:
+
+stdenv.mkDerivation rec {
+  pname = "wipefreespace";
+  version = "2.6";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/project/wipefreespace/wipefreespace/${version}/wipefreespace-${version}.tar.gz";
+    hash = "sha256-Pt6MDQ9wSJbL4tW/qckTpFsvE9FdXIkp/QmnYSlWR/M=";
+  };
+
+  nativeBuildInputs = [
+    texinfo
+  ];
+
+  # missed: Reiser3 FAT12/16/32 MinixFS HFS+ OCFS
+  buildInputs = [
+    e2fsprogs
+    ntfs3g
+    xfsprogs
+    reiser4progs
+    libaal
+    jfsutils
+    libuuid
+  ];
+
+  strictDeps = true;
+
+  preConfigure = ''
+    export PATH=$PATH:${xfsprogs}/bin
+    export CFLAGS=-I${jfsutils}/include
+    export LDFLAGS="-L${jfsutils}/lib -L${reiser4progs}/lib"
+  '';
+
+  meta = with lib; {
+    description = "A program which will securely wipe the free space";
+    homepage = "https://wipefreespace.sourceforge.io";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ catap ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/xfsdump/default.nix b/nixpkgs/pkgs/tools/filesystems/xfsdump/default.nix
new file mode 100644
index 000000000000..a6867e3c0a5f
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/xfsdump/default.nix
@@ -0,0 +1,59 @@
+{ lib
+, stdenv
+, fetchurl
+, attr
+, gettext
+, autoconf
+, automake
+, ncurses
+, libtool
+, libuuid
+, libxfs
+}:
+
+stdenv.mkDerivation rec {
+  pname = "xfsdump";
+  version = "3.1.12";
+
+  src = fetchurl {
+    url = "mirror://kernel/linux/utils/fs/xfs/${pname}/${pname}-${version}.tar.xz";
+    sha256 = "sha256-85xMGzBrLdfsl5wOlNYP5pCD0uz5rwUcrF7zvtdyx0o=";
+  };
+
+  nativeBuildInputs = [
+    autoconf
+    automake
+    gettext
+    libtool
+  ];
+  buildInputs = [
+    attr
+    libuuid
+    libxfs
+    ncurses
+  ];
+
+  postPatch = ''
+    substituteInPlace Makefile \
+      --replace "cp include/install-sh ." "cp -f include/install-sh ."
+  '';
+
+  # Conifigure scripts don't check PATH, see xfstests derviation
+  preConfigure = ''
+    export MAKE=$(type -P make)
+    export MSGFMT=$(type -P msgfmt)
+    export MSGMERGE=$(type -P msgmerge)
+    export XGETTEXT=$(type -P xgettext)
+
+    make configure
+    patchShebangs ./install-sh
+  '';
+
+  meta = with lib; {
+    description = "XFS filesystem incremental dump utility";
+    homepage = "https://git.kernel.org/pub/scm/fs/xfs/xfsdump-dev.git/tree/doc/CHANGES";
+    license = licenses.gpl2Only;
+    maintainers = [ maintainers.lunik1 ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/xfsprogs/default.nix b/nixpkgs/pkgs/tools/filesystems/xfsprogs/default.nix
new file mode 100644
index 000000000000..ee9177e37c2d
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/xfsprogs/default.nix
@@ -0,0 +1,63 @@
+{ lib, stdenv, buildPackages, fetchurl, gettext, pkg-config
+, icu, libuuid, readline, inih, liburcu
+, nixosTests
+}:
+
+stdenv.mkDerivation rec {
+  pname = "xfsprogs";
+  version = "6.4.0";
+
+  src = fetchurl {
+    url = "mirror://kernel/linux/utils/fs/xfs/xfsprogs/${pname}-${version}.tar.xz";
+    hash = "sha256-wxhoQYv79Jo6nEf8cM3/3p2W9P8AUb0EoIgeZlRkgQQ=";
+  };
+
+  outputs = [ "bin" "dev" "out" "doc" ];
+
+  depsBuildBuild = [ buildPackages.stdenv.cc ];
+  nativeBuildInputs = [
+    gettext pkg-config
+    libuuid # codegen tool uses libuuid
+    liburcu # required by crc32selftest
+  ];
+  buildInputs = [ readline icu inih liburcu ];
+  propagatedBuildInputs = [ libuuid ]; # Dev headers include <uuid/uuid.h>
+
+  enableParallelBuilding = true;
+  # Install fails as:
+  #   make[1]: *** No rule to make target '\', needed by 'kmem.lo'.  Stop.
+  enableParallelInstalling = false;
+
+  # @sbindir@ is replaced with /run/current-system/sw/bin to fix dependency cycles
+  preConfigure = ''
+    for file in scrub/{xfs_scrub_all.cron.in,xfs_scrub@.service.in,xfs_scrub_all.service.in}; do
+      substituteInPlace "$file" \
+        --replace '@sbindir@' '/run/current-system/sw/bin'
+    done
+    patchShebangs ./install-sh
+  '';
+
+  configureFlags = [
+    "--disable-lib64"
+    "--with-systemd-unit-dir=${placeholder "out"}/lib/systemd/system"
+  ];
+
+  installFlags = [ "install-dev" ];
+
+  # FIXME: forbidden rpath
+  postInstall = ''
+    find . -type d -name .libs | xargs rm -rf
+  '';
+
+  passthru.tests = {
+    inherit (nixosTests.installer) lvm;
+  };
+
+  meta = with lib; {
+    homepage = "https://xfs.org/";
+    description = "SGI XFS utilities";
+    license = with licenses; [ gpl2Only lgpl21 gpl3Plus ];  # see https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git/tree/debian/copyright
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ dezgeg ajs124 ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/xtreemfs/default.nix b/nixpkgs/pkgs/tools/filesystems/xtreemfs/default.nix
new file mode 100644
index 000000000000..6c02117936da
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/xtreemfs/default.nix
@@ -0,0 +1,113 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, fetchpatch
+, makeWrapper
+, ant
+, attr
+, boost
+, cmake
+, file
+, fuse
+, jdk8
+, openssl
+, python3
+, valgrind
+, which
+}:
+
+stdenv.mkDerivation {
+  pname = "XtreemFS";
+  # using unstable release because stable (v1.5.1) has broken repl java plugin
+  version = "unstable-2015-06-17";
+
+  src = fetchFromGitHub {
+    rev = "7ddcb081aa125b0cfb008dc98addd260b8353ab3";
+    owner = "xtreemfs";
+    repo = "xtreemfs";
+    sha256 = "1hjmd32pla27zf98ghzz6r5ml8ry86m9dsryv1z01kxv5l95b3m0";
+  };
+
+  nativeBuildInputs = [ makeWrapper python3 ];
+  buildInputs = [ which attr ];
+
+  patches = [
+    (fetchpatch {
+      name = "protobuf-add-arm64-atomicops.patch";
+      url = "https://github.com/protocolbuffers/protobuf/commit/2ca19bd8066821a56f193e7fca47139b25c617ad.patch";
+      stripLen = 1;
+      extraPrefix = "cpp/thirdparty/protobuf-2.5.0/";
+      sha256 = "sha256-hlL5ZiJhpO3fPpcSTV+yki4zahg/OhFdIZEGF1TNTe0=";
+    })
+    (fetchpatch {
+      name = "protobuf-add-aarch64-architecture-to-platform-macros.patch";
+      url = "https://github.com/protocolbuffers/protobuf/commit/f0b6a5cfeb5f6347c34975446bda08e0c20c9902.patch";
+      stripLen = 1;
+      extraPrefix = "cpp/thirdparty/protobuf-2.5.0/";
+      sha256 = "sha256-VRl303x9g5ES/LMODcAdhsPiEmQTq/qXhE/DfvLXF84=";
+    })
+    (fetchpatch {
+      name = "xtreemfs-fix-for-boost-version-1.66.patch";
+      url = "https://github.com/xtreemfs/xtreemfs/commit/aab843cb115ab0739edf7f58fd2d4553a05374a8.patch";
+      sha256 = "sha256-y/vXI/PT1TwSy8/73+RKIgKq4pZ9i22MBxr6jo/M5l8=";
+    })
+    (fetchpatch {
+      name = "xtreemfs-fix-for-openssl_1_1.patch";
+      url = "https://github.com/xtreemfs/xtreemfs/commit/ebfdc2fff56c09f310159d92026883941e42a953.patch";
+      sha256 = "075w00ad88qm6xpm5679m0gfzkrc53w17sk7ycybf4hzxjs29ygy";
+    })
+  ];
+
+  preConfigure = ''
+    export JAVA_HOME=${jdk8}
+    export ANT_HOME=${ant}
+
+    export BOOST_INCLUDEDIR=${boost.dev}/include
+    export BOOST_LIBRARYDIR=${boost.out}/lib
+    export CMAKE_INCLUDE_PATH=${openssl.dev}/include
+    export CMAKE_LIBRARY_PATH=${lib.getLib openssl}/lib
+
+    substituteInPlace cpp/cmake/FindValgrind.cmake \
+      --replace "/usr/local" "${valgrind}"
+
+    substituteInPlace cpp/CMakeLists.txt \
+      --replace '"/lib64" "/usr/lib64"' '"${attr.out}/lib" "${fuse}/lib"'
+
+    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${fuse}/include"
+    export NIX_CFLAGS_LINK="$NIX_CFLAGS_LINK -L${fuse}/lib"
+
+    export DESTDIR=$out
+
+    substituteInPlace Makefile \
+      --replace "/usr/share/" "/share/" \
+      --replace 'BIN_DIR=$(DESTDIR)/usr/bin' "BIN_DIR=$out/bin"
+
+    substituteInPlace etc/init.d/generate_initd_scripts.sh \
+      --replace "/bin/bash" "${stdenv.shell}"
+
+    substituteInPlace cpp/thirdparty/gtest-1.7.0/configure \
+      --replace "/usr/bin/file" "${file}/bin/file"
+
+    substituteInPlace cpp/thirdparty/protobuf-2.5.0/configure \
+      --replace "/usr/bin/file" "${file}/bin/file"
+
+    substituteInPlace cpp/thirdparty/protobuf-2.5.0/gtest/configure \
+      --replace "/usr/bin/file" "${file}/bin/file"
+
+    # do not put cmake into buildInputs
+    export PATH="$PATH:${cmake}/bin"
+  '';
+
+  doCheck = false;
+
+  postInstall = ''
+    rm -r $out/sbin
+  '';
+
+  meta = {
+    description = "A distributed filesystem";
+    maintainers = with lib.maintainers; [ raskin matejc ];
+    platforms = lib.platforms.linux;
+    license = lib.licenses.bsd3;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/yandex-disk/default.nix b/nixpkgs/pkgs/tools/filesystems/yandex-disk/default.nix
new file mode 100644
index 000000000000..109781f612a2
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/yandex-disk/default.nix
@@ -0,0 +1,71 @@
+{ lib, stdenv, fetchurl, writeText, zlib, rpmextract, patchelf, which }:
+
+let
+  p = if stdenv.is64bit then {
+      arch = "x86_64";
+      gcclib = "${stdenv.cc.cc.lib}/lib64";
+      sha256 = "sha256-HH/pLZmDr6m/B3e6MHafDGnNWR83oR2y1ijVMR/LOF0=";
+      webarchive = "20220519080155";
+    }
+    else {
+      arch = "i386";
+      gcclib = "${stdenv.cc.cc.lib}/lib";
+      sha256 = "sha256-28dmdnJf+qh9r3F0quwlYXB/UqcOzcHzuzFq8vt2bf0=";
+      webarchive = "20220519080430";
+    };
+in
+stdenv.mkDerivation rec {
+
+  pname = "yandex-disk";
+  version = "0.1.6.1080";
+
+  src = fetchurl {
+    urls = [
+      "https://repo.yandex.ru/yandex-disk/rpm/stable/${p.arch}/${pname}-${version}-1.fedora.${p.arch}.rpm"
+      "https://web.archive.org/web/${p.webarchive}/https://repo.yandex.ru/yandex-disk/rpm/stable/${p.arch}/${pname}-${version}-1.fedora.${p.arch}.rpm"
+    ];
+    sha256 = p.sha256;
+  };
+
+  builder = writeText "builder.sh" ''
+    . $stdenv/setup
+    mkdir -pv $out/bin
+    mkdir -pv $out/share
+    mkdir -pv $out/etc
+
+    mkdir -pv unpacked
+    cd unpacked
+    ${rpmextract}/bin/rpmextract $src
+
+    mkdir -p $out/share/bash-completion/completions
+    cp -r -t $out/bin usr/bin/*
+    cp -r -t $out/share usr/share/*
+    cp -r -t $out/share/bash-completion/completions etc/bash_completion.d/*
+
+    sed -i 's@have@${which}/bin/which >/dev/null 2>\&1@' \
+      $out/share/bash-completion/completions/yandex-disk-completion.bash
+
+    ${patchelf}/bin/patchelf \
+      --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
+      --set-rpath "${zlib.out}/lib:${p.gcclib}" \
+      $out/bin/yandex-disk
+  '';
+
+  meta = {
+    homepage = "https://help.yandex.com/disk/cli-clients.xml";
+    description = "A free cloud file storage service";
+    maintainers = with lib.maintainers; [ smironov jagajaga ];
+    platforms = ["i686-linux" "x86_64-linux"];
+    sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
+    license = lib.licenses.unfree;
+    longDescription = ''
+      Yandex.Disk console client for Linux lets you manage files on Disk without
+      using a window interface or programs that support WebDAV. The advantages
+      of the console client compared to a WebDAV connection:
+       * low system resource requirements;
+       * faster file reading and writing speeds;
+       * faster syncing with Disk's server;
+       * no need to be constantly connected to work with files.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/zerofree/default.nix b/nixpkgs/pkgs/tools/filesystems/zerofree/default.nix
new file mode 100644
index 000000000000..1447ca36a136
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/zerofree/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchurl, installShellFiles, e2fsprogs }:
+
+let
+  manpage = fetchurl {
+    url = "https://manpages.ubuntu.com/manpages.gz/xenial/man8/zerofree.8.gz";
+    sha256 = "0y132xmjl02vw41k794psa4nmjpdyky9f6sf0h4f7rvf83z3zy4k";
+  };
+in stdenv.mkDerivation rec {
+  pname = "zerofree";
+  version = "1.1.1";
+
+  src = fetchurl {
+    url = "https://frippery.org/uml/${pname}-${version}.tgz";
+    sha256 = "0rrqfa5z103ws89vi8kfvbks1cfs74ix6n1wb6vs582vnmhwhswm";
+  };
+
+  buildInputs = [ e2fsprogs installShellFiles ];
+
+  installPhase = ''
+    mkdir -p $out/bin $out/share/zerofree
+    cp zerofree $out/bin
+    cp COPYING $out/share/zerofree/COPYING
+    installManPage ${manpage}
+  '';
+
+  meta = {
+    homepage = "https://frippery.org/uml/";
+    description = "Zero free blocks from ext2, ext3 and ext4 file-systems";
+    platforms = lib.platforms.linux;
+    license = lib.licenses.gpl2;
+    maintainers = [ lib.maintainers.theuni ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/zfstools/default.nix b/nixpkgs/pkgs/tools/filesystems/zfstools/default.nix
new file mode 100644
index 000000000000..0a4447bacc4f
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/zfstools/default.nix
@@ -0,0 +1,41 @@
+{ lib, stdenv, fetchFromGitHub, ruby, zfs, makeWrapper }:
+
+stdenv.mkDerivation rec {
+  pname = "zfstools";
+  version = "0.3.6";
+
+  src = fetchFromGitHub {
+    sha256 = "16lvw3xbmxp2pr8nixqn7lf4504zaaxvbbdnjkv4dggwd4lsdjyg";
+    rev = "v${version}";
+    repo = "zfstools";
+    owner = "bdrewery";
+  };
+
+  buildInputs = [ ruby ];
+  nativeBuildInputs = [ makeWrapper ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp bin/* $out/bin/
+
+    cp -R lib $out/
+
+    for f in $out/bin/*; do
+      wrapProgram $f \
+        --set RUBYLIB $out/lib \
+        --prefix PATH : ${zfs}/bin
+    done
+  '';
+
+  meta = with lib; {
+    inherit version;
+    inherit (src.meta) homepage;
+    description = "OpenSolaris-compatible auto-snapshotting script for ZFS";
+    longDescription = ''
+      zfstools is an OpenSolaris-like and compatible auto snapshotting script
+      for ZFS, which also supports auto snapshotting mysql databases.
+    '';
+    license = licenses.bsd2;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/zkfuse/default.nix b/nixpkgs/pkgs/tools/filesystems/zkfuse/default.nix
new file mode 100644
index 000000000000..320ccde4cc53
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/zkfuse/default.nix
@@ -0,0 +1,41 @@
+{ stdenv
+, lib
+, autoreconfHook
+, boost
+, fuse
+, log4cxx
+, zookeeper
+, zookeeper_mt
+}:
+
+stdenv.mkDerivation rec {
+  pname = "zkfuse";
+  inherit (zookeeper_mt) version src;
+
+  sourceRoot = "apache-${zookeeper.pname}-${version}/zookeeper-contrib/zookeeper-contrib-zkfuse";
+
+  nativeBuildInputs = [ autoreconfHook ];
+  buildInputs = [ zookeeper_mt log4cxx boost fuse ];
+
+  postPatch = ''
+    # Make the async API accessible, and use the proper include path.
+    sed -i src/zkadapter.h \
+        -e '/"zookeeper\.h"/i#define THREADED' \
+        -e 's,"zookeeper\.h",<zookeeper/zookeeper.h>,'
+  '';
+
+  # c++17 (gcc-11's default) breaks the build as:
+  #   zkadapter.h:616:33: error: ISO C++17 does not allow dynamic exception specifications
+  env.NIX_CFLAGS_COMPILE = toString [ "-std=c++14" ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp -v src/zkfuse $out/bin
+  '';
+
+  meta = with lib; {
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ ztzg ];
+    license = licenses.asl20;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/zpool-auto-expand-partitions/default.nix b/nixpkgs/pkgs/tools/filesystems/zpool-auto-expand-partitions/default.nix
new file mode 100644
index 000000000000..601baabd87ee
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/zpool-auto-expand-partitions/default.nix
@@ -0,0 +1,45 @@
+{ lib
+, rustPlatform
+, cloud-utils
+, fetchFromGitHub
+, pkg-config
+, util-linux
+, zfs
+}:
+rustPlatform.buildRustPackage rec {
+  pname = "zpool-auto-expand-partitions";
+  version = "0.1.0";
+
+  src = fetchFromGitHub {
+    owner = "DeterminateSystems";
+    repo = "zpool-auto-expand-partitions";
+    rev = "v${version}";
+    hash = "sha256-LA6YO6vv7VCXwFfayQVxVR80niSCo89sG0hqh0wDEh8=";
+  };
+
+  cargoHash = "sha256-5v0fqp8aro+QD/f5VudMREc8RvKQapNAoArcCKMN1Sw=";
+
+  preBuild = ''
+    substituteInPlace src/grow.rs \
+      --replace '"growpart"' '"${cloud-utils}/bin/growpart"'
+    substituteInPlace src/lsblk.rs \
+      --replace '"lsblk"' '"${util-linux}/bin/lsblk"'
+  '';
+
+  nativeBuildInputs = [
+    pkg-config
+    rustPlatform.bindgenHook
+  ];
+
+  buildInputs = [
+    util-linux
+    zfs
+  ];
+
+  meta = with lib; {
+    description = "A tool that aims to expand all partitions in a specified zpool to fill the available space";
+    homepage = "https://github.com/DeterminateSystems/zpool-auto-expand-partitions";
+    license = licenses.asl20;
+    maintainers = teams.determinatesystems.members;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/zpool-iostat-viz/default.nix b/nixpkgs/pkgs/tools/filesystems/zpool-iostat-viz/default.nix
new file mode 100644
index 000000000000..a9e4dfe8ab74
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/zpool-iostat-viz/default.nix
@@ -0,0 +1,41 @@
+{ lib
+, fetchFromGitHub
+, python3Packages
+, installShellFiles
+}:
+
+python3Packages.buildPythonApplication rec {
+  pname = "zpool-iostat-viz";
+  version = "unstable-2021-11-13";
+  format = "other";
+
+  src = fetchFromGitHub {
+    owner = "chadmiller";
+    repo = pname;
+    rev = "cdd8f3d882ab7a9990fb2d26af3e5b2bcc4bb312";
+    sha256 = "sha256-vNXD5SauBpCtP7VPTumQ0/wXfW0PjtooS21cjpAole8=";
+  };
+
+  nativeBuildInputs = [
+    installShellFiles
+    python3Packages.wrapPython
+  ];
+
+  # There is no setup.py
+  dontConfigure = true;
+  dontBuild = true;
+  doCheck = false;
+
+  installPhase = ''
+    wrapPythonPrograms
+    install -D zpool-iostat-viz $out/bin/zpool-iostat-viz
+    installManPage zpool-iostat-viz.1
+  '';
+
+  meta = with lib; {
+    description = "\"zpool iostats\" for humans; find the slow parts of your ZFS pool";
+    homepage = "https://github.com/chadmiller/zpool-iostat-viz";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ julm ];
+  };
+}