diff options
Diffstat (limited to 'nixpkgs/pkgs/tools/filesystems')
200 files changed, 11987 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..b5fe1a4e85ea --- /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.3"; + + src = fetchFromGitHub { + owner = "whoozle"; + repo = "android-file-transfer-linux"; + rev = "v${version}"; + sha256 = "sha256-UOARMtOnG6tekmOsIWRZbl2y32mR0kPD6w7IHRG8VsU="; + }; + + 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..5881d361c549 --- /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"; + version = "unstable-2023-03-12"; + + src = fetchFromGitHub { + owner = "sgan81"; + repo = "apfs-fuse"; + rev = "66b86bd525e8cb90f9012543be89b1f092b75cf3"; + hash = "sha256-uYAlqnQp0K880XEWuH1548DUA3ii53+hfsuh/T3Vwzg="; + 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; + mainProgram = "apfs-fuse"; + maintainers = with maintainers; [ ealasu ]; + platforms = platforms.unix; + }; +} 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..dbd573d5f012 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/bashmount/default.nix @@ -0,0 +1,38 @@ +{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"; + mainProgram = "bashmount"; + 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..58f6a05992e9 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/bcache-tools/default.nix @@ -0,0 +1,59 @@ +{ 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/" + ]; + + 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..091f76071a2b --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/bcachefs-tools/Cargo.lock @@ -0,0 +1,871 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "aho-corasick" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +dependencies = [ + "memchr", +] + +[[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.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15c4c2c83f81532e5845a733998b6971faca23490340a418e9b72a3ec9de12ea" + +[[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.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c677ab05e09154296dd37acecd46420c17b9713e8366facafa8fc0885167cf4c" +dependencies = [ + "anstyle", + "windows-sys", +] + +[[package]] +name = "anyhow" +version = "1.0.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" + +[[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", + "clap_complete", + "colored", + "either", + "errno 0.2.8", + "gag", + "getset", + "libc", + "log", + "parse-display", + "rpassword", + "udev", + "uuid", +] + +[[package]] +name = "bch_bindgen" +version = "0.1.0" +dependencies = [ + "anyhow", + "bindgen", + "bitfield", + "bitflags 1.3.2", + "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 1.3.2", + "cexpr", + "clang-sys", + "lazy_static", + "lazycell", + "peeking_take_while", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn 1.0.109", +] + +[[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 = "bitflags" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "cc" +version = "1.0.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] + +[[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.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +dependencies = [ + "num-traits", +] + +[[package]] +name = "clang-sys" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f" +dependencies = [ + "glob", + "libc", +] + +[[package]] +name = "clap" +version = "4.3.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb690e81c7840c0d7aade59f242ea3b41b9bc27bcd5997890e7702ae4b32e487" +dependencies = [ + "clap_builder", + "clap_derive", + "once_cell", +] + +[[package]] +name = "clap_builder" +version = "4.3.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ed2e96bc16d8d740f6f48d663eddf4b8a0983e79210fd55479b7bcd0a69860e" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", + "terminal_size", +] + +[[package]] +name = "clap_complete" +version = "4.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fc443334c81a804575546c5a8a79b4913b50e28d69232903604cada1de817ce" +dependencies = [ + "clap", +] + +[[package]] +name = "clap_derive" +version = "4.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54a9bb5758fc5dfe728d1019941681eccaf0cf8a4189b692a0ee2f2ecf90a050" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[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 = "colored" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6" +dependencies = [ + "is-terminal", + "lazy_static", + "windows-sys", +] + +[[package]] +name = "either" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" + +[[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.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f258a7194e7f7c2a7837a8913aeab7fd8c383457034fa20ce4dd3dcb813e8eb8" +dependencies = [ + "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 = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" + +[[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 1.0.109", +] + +[[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.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" + +[[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.3", + "libc", + "windows-sys", +] + +[[package]] +name = "is-terminal" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +dependencies = [ + "hermit-abi 0.3.3", + "rustix 0.38.25", + "windows-sys", +] + +[[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.150" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" + +[[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 = "linux-raw-sys" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" + +[[package]] +name = "log" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" + +[[package]] +name = "memchr" +version = "2.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" + +[[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-traits" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +dependencies = [ + "autocfg", +] + +[[package]] +name = "once_cell" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" + +[[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 0.6.29", + "syn 1.0.109", +] + +[[package]] +name = "paste" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + +[[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.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" + +[[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 1.0.109", + "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.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "regex" +version = "1.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax 0.8.2", +] + +[[package]] +name = "regex-automata" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.2", +] + +[[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.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" + +[[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.37.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" +dependencies = [ + "bitflags 1.3.2", + "errno 0.3.7", + "io-lifetimes", + "libc", + "linux-raw-sys 0.3.8", + "windows-sys", +] + +[[package]] +name = "rustix" +version = "0.38.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc99bc2d4f1fed22595588a013687477aedf3cdcfb26558c559edb67b4d9b22e" +dependencies = [ + "bitflags 2.4.1", + "errno 0.3.7", + "libc", + "linux-raw-sys 0.4.11", + "windows-sys", +] + +[[package]] +name = "shlex" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" + +[[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.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "tempfile" +version = "3.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" +dependencies = [ + "cfg-if", + "fastrand", + "redox_syscall", + "rustix 0.38.25", + "windows-sys", +] + +[[package]] +name = "terminal_size" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e6bf6f19e9f8ed8d4048dc22981458ebcf406d67e94cd422e5ecd73d63b3237" +dependencies = [ + "rustix 0.37.27", + "windows-sys", +] + +[[package]] +name = "thiserror" +version = "1.0.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[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.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + +[[package]] +name = "uuid" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" + +[[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" + +[[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.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +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.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" 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..36566dc71002 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/bcachefs-tools/default.nix @@ -0,0 +1,123 @@ +{ lib +, stdenv +, fetchFromGitHub +, pkg-config +, libuuid +, libsodium +, keyutils +, liburcu +, zlib +, libaio +, zstd +, lz4 +, attr +, udev +, nixosTests +, fuse3 +, cargo +, rustc +, rustPlatform +, makeWrapper +, writeScript +, python3 +, fuseSupport ? false +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "bcachefs-tools"; + version = "1.4.1"; + + src = fetchFromGitHub { + owner = "koverstreet"; + repo = "bcachefs-tools"; + rev = "v${finalAttrs.version}"; + hash = "sha256-+KqTiIp9dIJWG2KvgvPwXC7p754XfgvKHjvwjCdbvCs="; + }; + + 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; + + # FIXME: Try enabling this once the default linux kernel is at least 6.7 + doCheck = false; # needs bcachefs module loaded on builder + checkFlags = [ "BCACHEFS_TEST_USE_VALGRIND=no" ]; + + makeFlags = [ + "PREFIX=${placeholder "out"}" + "VERSION=${finalAttrs.version}" + "INITRAMFS_DIR=${placeholder "out"}/etc/initramfs-tools" + "BCACHEFS_FUSE=${toString fuseSupport}" + ]; + + preCheck = lib.optionalString (!fuseSupport) '' + rm tests/test_fuse.py + ''; + + # Tries to install to the 'systemd-minimal' and 'udev' nix installation paths + installFlags = [ + "PKGCONFIG_SERVICEDIR=$(out)/lib/systemd/system" + "PKGCONFIG_UDEVDIR=$(out)/lib/udev" + ]; + + postInstall = '' + substituteInPlace $out/libexec/bcachefsck_all \ + --replace "/usr/bin/python3" "${python3}/bin/python3" + ''; + + passthru = { + tests = { + smoke-test = nixosTests.bcachefs; + inherit (nixosTests.installer) bcachefsSimple bcachefsEncrypted bcachefsMulti; + }; + + updateScript = writeScript "update-bcachefs-tools-and-cargo-lock.sh" '' + #!/usr/bin/env nix-shell + #!nix-shell -i bash -p curl jq common-updater-scripts + res="$(curl ''${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} \ + -sL "https://api.github.com/repos/${finalAttrs.src.owner}/${finalAttrs.src.repo}/tags?per_page=1")" + + version="$(echo $res | jq '.[0].name | split("v") | .[1]' --raw-output)" + update-source-version ${finalAttrs.pname} "$version" --ignore-same-hash + + curl "https://raw.githubusercontent.com/${finalAttrs.src.owner}/${finalAttrs.src.repo}/v$version/rust-src/Cargo.lock" > \ + "$(git rev-parse --show-toplevel)/pkgs/tools/filesystems/bcachefs-tools/Cargo.lock" + ''; + }; + + 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..1dbb62ccb1b2 --- /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.10"; + + src = fetchFromGitHub { + owner = "Zygo"; + repo = "bees"; + rev = "v${version}"; + hash = "sha256-f3P3BEd8uO6QOZ1/2hBzdcuOSggYvHxW3g9pGftKO8g="; + }; + + 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..f7d5ce61d81c --- /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.6"; + pname = "bindfs"; + + src = fetchurl { + url = "https://bindfs.org/downloads/bindfs-${finalAttrs.version}.tar.gz"; + hash = "sha256-076zzGm7K2gCzFOViOkh/qlz7WGRsTPyAkcZMR0cwYs="; + }; + + 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..2acd137be736 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/blobfuse/default.nix @@ -0,0 +1,32 @@ +{ lib, buildGoModule, fetchFromGitHub, fuse3, testers, blobfuse }: + +let + version = "2.1.2"; + src = fetchFromGitHub { + owner = "Azure"; + repo = "azure-storage-fuse"; + rev = "blobfuse2-${version}"; + sha256 = "sha256-KzpD+6g1WwviydYE0v5pSH35zC41MrPlk5MitwAIgnE="; + }; +in buildGoModule { + pname = "blobfuse"; + inherit version src; + + vendorHash = "sha256-+Z+mkTs/8qCtYcWZIMzsW9MQsC08KDJUHNbxyc6Ro5Y="; + + 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/bonnie/default.nix b/nixpkgs/pkgs/tools/filesystems/bonnie/default.nix new file mode 100644 index 000000000000..a2f1c51e7e12 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/bonnie/default.nix @@ -0,0 +1,34 @@ +{ lib +, stdenv +, fetchurl +, fetchpatch +}: + +stdenv.mkDerivation rec { + pname = "bonnie++"; + version = "2.00a"; + + src = fetchurl { + url = "https://www.coker.com.au/bonnie++/bonnie++-${version}.tgz"; + hash = "sha256-qNM7vYG8frVZzlv25YS5tT+uo5zPtK6S5Y8nJX5Gjw4="; + }; + + patches = [ + (fetchpatch { + name = "bonnie++-2.00a-gcc11.patch"; + url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/app-benchmarks/bonnie++/files/bonnie++-2.00a-gcc11.patch?id=d0f29755e969c805fbd6240905e3925671340666"; + hash = "sha256-/cIC4HYQco5Nv1UoTELl2OGD5hdWhbz3L0+GjN/vcdE="; + }) + ]; + + enableParallelBuilding = true; + + meta = { + description = "Hard drive and file system benchmark suite"; + homepage = "http://www.coker.com.au/bonnie++/"; + license = lib.licenses.gpl2Only; + mainProgram = "bonnie++"; + maintainers = with lib.maintainers; [ wegank ]; + 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..6f154f7aeeca --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/btrfs-progs/default.nix @@ -0,0 +1,76 @@ +{ lib, stdenv, fetchurl +, buildPackages +, pkg-config +, zstd +, acl, attr, e2fsprogs, libuuid, lzo, udev, zlib +, runCommand, btrfs-progs +, gitUpdater +, udevSupport ? true +}: + +stdenv.mkDerivation rec { + pname = "btrfs-progs"; + version = "6.7.1"; + + src = fetchurl { + url = "mirror://kernel/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v${version}.tar.xz"; + hash = "sha256-JNx7l08KV7oOyoD5dEC4QN+oWw8cssAb39l2WaSAsgA="; + }; + + nativeBuildInputs = [ + pkg-config + ] ++ [ + (buildPackages.python3.withPackages (ps: with ps; [ + sphinx + sphinx-rtd-theme + ])) + ]; + + 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..efc2ddafa419 --- /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 = "Create and maintain 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..d6b39ef68e4f --- /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.10.1"; + + nativeBuildInputs = [ go ]; + buildInputs = [ ceph ]; + + src = fetchFromGitHub { + owner = "ceph"; + repo = "ceph-csi"; + rev = "v${version}"; + sha256 = "sha256-S5jv9l/Oozv0NrEEf+Bik0jnaK4AYIChFm2pU2/DQow="; + }; + + 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..ebaf6532df52 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/ceph/default.nix @@ -0,0 +1,465 @@ +{ 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 +, gnugrep +, gtest +, icu +, kmod +, libcap +, libcap_ng +, libnl +, libxml2 +, lttng-ust +, lua +, lz4 +, oath-toolkit +, openldap +, python310 +, rdkafka +, rocksdb +, snappy +, sqlite +, utf8proc +, zlib +, zstd + +# Dependencies of overridden Python dependencies, hopefully we can remove these soon. +, rustPlatform + +# 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: let cryptographyOverrideVersion = "40.0.1"; in { + # Ceph does not support `cryptography` > 40 yet: + # * https://github.com/NixOS/nixpkgs/pull/281858#issuecomment-1899358602 + # * Upstream issue: https://tracker.ceph.com/issues/63529 + # > Python Sub-Interpreter Model Used by ceph-mgr Incompatible With Python Modules Based on PyO3 + # + # We pin the older `cryptography` 40 here; + # this also forces us to pin an older `pyopenssl` because the current one + # is not compatible with older `cryptography`, see: + # https://github.com/pyca/pyopenssl/blob/d9752e44127ba36041b045417af8a0bf16ec4f1e/CHANGELOG.rst#2320-2023-05-30 + cryptography = super.cryptography.overridePythonAttrs (old: rec { + version = cryptographyOverrideVersion; + + src = fetchPypi { + inherit (old) pname; + version = cryptographyOverrideVersion; + hash = "sha256-KAPy+LHpX2FEGZJsfm9V2CivxhTKXtYVQ4d65mjMNHI="; + }; + + cargoDeps = rustPlatform.fetchCargoTarball { + inherit src; + sourceRoot = let cargoRoot = "src/rust"; in "${old.pname}-${cryptographyOverrideVersion}/${cargoRoot}"; + name = "${old.pname}-${cryptographyOverrideVersion}"; + hash = "sha256-gFfDTc2QWBWHBCycVH1dYlCsWQMVcRZfOBIau+njtDU="; + }; + + # Not using the normal `(old.patches or []) ++` pattern here to use + # the overridden package's patches, because current nixpkgs's `cryptography` + # has patches that do not apply on this old version. + patches = [ + # Fix https://nvd.nist.gov/vuln/detail/CVE-2023-49083 which has no upstream backport. + # See https://github.com/pyca/cryptography/commit/f09c261ca10a31fe41b1262306db7f8f1da0e48a#diff-f5134bf8f3cf0a5cc8601df55e50697acc866c603a38caff98802bd8e17976c5R1893 + ./python-cryptography-Cherry-pick-fix-for-CVE-2023-49083-on-cryptography-40.patch + ]; + + # Tests would require overriding `cryptography-vectors`, which is not currently + # possible/desired, see: https://github.com/NixOS/nixpkgs/pull/281858#pullrequestreview-1841421866 + doCheck = false; + }); + + # This is the most recent version of `pyopenssl` that's still compatible with `cryptography` 40. + # See https://github.com/NixOS/nixpkgs/pull/281858#issuecomment-1899358602 + pyopenssl = super.pyopenssl.overridePythonAttrs (old: rec { + version = "23.1.1"; + src = fetchPypi { + pname = "pyOpenSSL"; + inherit version; + hash = "sha256-hBSYub7GFiOxtsR+u8AjZ8B9YODhlfGXkIF/EMyNsLc="; + }; + }); + + # Ceph does not support `kubernetes` >= 19, see: + # https://github.com/NixOS/nixpkgs/pull/281858#issuecomment-1900324090 + kubernetes = super.kubernetes.overridePythonAttrs (old: rec { + version = "18.20.0"; + src = fetchFromGitHub { + owner = "kubernetes-client"; + repo = "python"; + rev = "v${version}"; + sha256 = "1sawp62j7h0yksmg9jlv4ik9b9i1a1w9syywc9mv8x89wibf5ql1"; + fetchSubmodules = true; + }; + }); + + }; + }; + + 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.1"; + src = fetchurl { + url = "https://download.ceph.com/tarballs/ceph-${version}.tar.gz"; + hash = "sha256-gHWwNHf0KtI7Hv0MwaCqP6A3YR/AWakfUZTktRyddko="; + }; +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}" ]; + + # replace /sbin and /bin based paths with direct nix store paths + # increase the `command` buffer size since 2 nix store paths cannot fit within 128 characters + preConfigure ='' + substituteInPlace src/common/module.c \ + --replace "char command[128];" "char command[256];" \ + --replace "/sbin/modinfo" "${kmod}/bin/modinfo" \ + --replace "/sbin/modprobe" "${kmod}/bin/modprobe" \ + --replace "/bin/grep" "${gnugrep}/bin/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/ceph/python-cryptography-Cherry-pick-fix-for-CVE-2023-49083-on-cryptography-40.patch b/nixpkgs/pkgs/tools/filesystems/ceph/python-cryptography-Cherry-pick-fix-for-CVE-2023-49083-on-cryptography-40.patch new file mode 100644 index 000000000000..7ca05cf7450f --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/ceph/python-cryptography-Cherry-pick-fix-for-CVE-2023-49083-on-cryptography-40.patch @@ -0,0 +1,44 @@ +commit 08dbad8552ecca85d3e38072f94eb864b143d218 +Author: Niklas Hambüchen <mail@nh2.me> +Date: Mon Jan 22 12:52:06 2024 +0000 + + Cherry-pick fix for CVE-2023-49083 + + Cherry-Picked-From: f09c261ca10a31fe41b1262306db7f8f1da0e48a + Cherry-Picked-By: Niklas Hambüchen <mail@nh2.me> + +diff --git a/src/cryptography/hazmat/backends/openssl/backend.py b/src/cryptography/hazmat/backends/openssl/backend.py +index a3fe1bce4..58e7207c4 100644 +--- a/src/cryptography/hazmat/backends/openssl/backend.py ++++ b/src/cryptography/hazmat/backends/openssl/backend.py +@@ -2383,9 +2383,12 @@ class Backend: + _Reasons.UNSUPPORTED_SERIALIZATION, + ) + ++ certs: list[x509.Certificate] = [] ++ if p7.d.sign == self._ffi.NULL: ++ return certs ++ + sk_x509 = p7.d.sign.cert + num = self._lib.sk_X509_num(sk_x509) +- certs = [] + for i in range(num): + x509 = self._lib.sk_X509_value(sk_x509, i) + self.openssl_assert(x509 != self._ffi.NULL) +diff --git a/tests/hazmat/primitives/test_pkcs7.py b/tests/hazmat/primitives/test_pkcs7.py +index 4e61c5ef5..d8170bfb9 100644 +--- a/tests/hazmat/primitives/test_pkcs7.py ++++ b/tests/hazmat/primitives/test_pkcs7.py +@@ -89,6 +89,12 @@ class TestPKCS7Loading: + mode="rb", + ) + ++ def test_load_pkcs7_empty_certificates(self, backend): ++ der = b"\x30\x0B\x06\x09\x2A\x86\x48\x86\xF7\x0D\x01\x07\x02" ++ ++ certificates = pkcs7.load_der_pkcs7_certificates(der) ++ assert certificates == [] ++ + + # We have no public verification API and won't be adding one until we get + # some requirements from users so this function exists to give us basic 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/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/dduper/default.nix b/nixpkgs/pkgs/tools/filesystems/dduper/default.nix new file mode 100644 index 000000000000..7f876df37ee1 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/dduper/default.nix @@ -0,0 +1,49 @@ +{ lib, stdenv, fetchpatch, fetchFromGitHub, btrfs-progs, python3 }: + +let + btrfsProgsPatched = btrfs-progs.overrideAttrs { + patches = [ + (fetchpatch { + url = "https://raw.githubusercontent.com/Lakshmipathi/dduper/1f1d29eff61430e118f88239545a29f0bcf3e15d/patch/btrfs-progs-v6.3.3/0001-Print-csum-for-a-given-file-on-stdout.patch"; + hash = "sha256-bO0t8QePnUbMkQQPesZlBF/khD/H8AaWHr2GkOnT6x8="; + }) + ]; + }; + 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..8f962b65a329 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/dupe-krill/default.nix @@ -0,0 +1,26 @@ +{ 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 ]; + mainProgram = "dupe-krill"; + }; +} diff --git a/nixpkgs/pkgs/tools/filesystems/duperemove/default.nix b/nixpkgs/pkgs/tools/filesystems/duperemove/default.nix new file mode 100644 index 000000000000..c1d860256804 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/duperemove/default.nix @@ -0,0 +1,52 @@ +{ lib +, stdenv +, fetchFromGitHub +, libgcrypt +, pkg-config +, glib +, linuxHeaders ? stdenv.cc.libc.linuxHeaders +, sqlite +, util-linux +, testers +, duperemove +}: + +stdenv.mkDerivation rec { + pname = "duperemove"; + version = "0.14.1"; + + src = fetchFromGitHub { + owner = "markfasheh"; + repo = "duperemove"; + rev = "v${version}"; + hash = "sha256-iMv80UKktYOhNfVA3mW6kKv8TwLZaP6MQt24t3Rchk4="; + }; + + postPatch = '' + substituteInPlace util.c --replace \ + "lscpu" "${lib.getBin util-linux}/bin/lscpu" + ''; + + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ libgcrypt glib linuxHeaders sqlite util-linux ]; + + 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..abd99731de13 --- /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.5"; + + src = fetchFromGitHub { + owner = "mhx"; + repo = "dwarfs"; + rev = "v${version}"; + fetchSubmodules = true; + hash = "sha256-Zzm2SaFR31TBBMDfgJulVbqsJBh1He2wBFzHRC/c5vg="; + }; + + 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..2dc4698f8172 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/dysk/default.nix @@ -0,0 +1,37 @@ +{ 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 ]; + mainProgram = "dysk"; + }; +} diff --git a/nixpkgs/pkgs/tools/filesystems/e2fsprogs/default.nix b/nixpkgs/pkgs/tools/filesystems/e2fsprogs/default.nix new file mode 100644 index 000000000000..a5ca282955f3 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/e2fsprogs/default.nix @@ -0,0 +1,95 @@ +{ lib, stdenv, buildPackages, fetchurl, fetchpatch, pkg-config, libuuid, gettext, texinfo +, withFuse ? stdenv.isLinux, 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 withFuse [ "fuse2fs" ]; + + depsBuildBuild = [ buildPackages.stdenv.cc ]; + nativeBuildInputs = [ pkg-config texinfo ]; + buildInputs = [ libuuid gettext ] + ++ lib.optionals withFuse [ 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 withFuse '' + 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..a3f7378c205c --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/eiciel/default.nix @@ -0,0 +1,57 @@ +{ 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; + mainProgram = "eiciel"; + }; +} diff --git a/nixpkgs/pkgs/tools/filesystems/encfs/default.nix b/nixpkgs/pkgs/tools/filesystems/encfs/default.nix new file mode 100644 index 000000000000..966c39682392 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/encfs/default.nix @@ -0,0 +1,41 @@ +{ lib, stdenv, fetchFromGitHub, fetchpatch +, 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"; + }; + + patches = lib.optionals stdenv.cc.isClang [ + # Fixes a build failure when building with newer versions of clang. + # https://github.com/vgough/encfs/pull/650 + (fetchpatch { + url = "https://github.com/vgough/encfs/commit/406b63bfe234864710d1d23329bf41d48001fbfa.patch"; + hash = "sha256-VunC5ICRJBgCXqkr7ad7DPzweRJr1bdOpo1LKNCs4zY="; + }) + ]; + + 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..e91df03f7da1 --- /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.3"; + src = fetchFromGitHub { + owner = "Mic92"; + repo = "envfs"; + rev = version; + hash = "sha256-WbMqh/MzEMfZmKl/DNBGnzG3l8unFmAYbG6feSiMz+Y="; + }; + cargoHash = "sha256-RoreNBZvTsVY87nbVibJBy4gsafFwAMctVncAhhiaP8="; + + 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..5346403fa0e0 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/erofs-utils/default.nix @@ -0,0 +1,38 @@ +{ lib, stdenv, fetchurl, autoreconfHook, pkg-config, fuse, util-linux, lz4, xz, zlib, libselinux +, fuseSupport ? stdenv.isLinux +, selinuxSupport ? false +, lzmaSupport ? 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 ] + ++ lib.optionals lzmaSupport [ xz ]; + + configureFlags = [ + "MAX_BLOCK_SIZE=4096" + ] ++ lib.optional fuseSupport "--enable-fuse" + ++ lib.optional selinuxSupport "--with-selinux" + ++ lib.optional lzmaSupport "--enable-lzma"; + + 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..bb23f58c38c6 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/ext4magic/default.nix @@ -0,0 +1,41 @@ +{ 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 ]; + mainProgram = "ext4magic"; + }; +} 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..0c3062fb11ca --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/extundelete/default.nix @@ -0,0 +1,30 @@ +{ 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 ]; + mainProgram = "extundelete"; + }; +} 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..811adfadb55b --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/f2fs-tools/default.nix @@ -0,0 +1,24 @@ +{ lib, stdenv, fetchzip, autoreconfHook, libselinux, libuuid, pkg-config }: + +stdenv.mkDerivation rec { + pname = "f2fs-tools"; + version = "1.16.0"; + + src = fetchzip { + url = "https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git/snapshot/f2fs-tools-v${version}.tar.gz"; + 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..80f7e5ecd4ae --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/fatresize/default.nix @@ -0,0 +1,27 @@ +{ 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; + mainProgram = "fatresize"; + }; +} diff --git a/nixpkgs/pkgs/tools/filesystems/fatsort/default.nix b/nixpkgs/pkgs/tools/filesystems/fatsort/default.nix new file mode 100644 index 000000000000..d1604e49a32e --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/fatsort/default.nix @@ -0,0 +1,44 @@ +{ 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; + mainProgram = "fatsort"; + }; +} 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..8bc7a899cd3b --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/file-rename/default.nix @@ -0,0 +1,31 @@ +{ 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 ]; + mainProgram = "rename"; + }; +} 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..86db1f4872a4 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/fuse-7z-ng/default.nix @@ -0,0 +1,49 @@ +{ 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; + mainProgram = "fuse-7z-ng"; + }; +} 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..58f48a264498 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/fuse-archive/default.nix @@ -0,0 +1,45 @@ +{ 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 ]; + mainProgram = "fuse-archive"; + }; + + inherit (fuse.meta) platforms; +} diff --git a/nixpkgs/pkgs/tools/filesystems/fuse-ext2/darwin-no-installer.patch b/nixpkgs/pkgs/tools/filesystems/fuse-ext2/darwin-no-installer.patch new file mode 100644 index 000000000000..6886bc4fd172 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/fuse-ext2/darwin-no-installer.patch @@ -0,0 +1,31 @@ +diff --git a/fuse-ext2/Makefile.am b/fuse-ext2/Makefile.am +index 9d3a065..c73f337 100644 +--- a/fuse-ext2/Makefile.am ++++ b/fuse-ext2/Makefile.am +@@ -113,7 +113,7 @@ fuse_ext2_CFLAGS = \ + -DHAVE_CONFIG_H \ + -I/usr/local/include + +-if DARWIN ++if FALSE + bin_PROGRAMS += \ + fuse-ext2.wait \ + fuse-ext2.install \ +@@ -151,9 +151,6 @@ endif + if DARWIN + install-exec-local: + $(INSTALL) -d "$(DESTDIR)/$(sbindir)" +- $(LN_S) -f "/Library/Filesystems/fuse-ext2.fs/Contents/Resources/mount_fuse-ext2" "$(DESTDIR)/$(sbindir)/mount_fuse-ext2" +- $(LN_S) -f "/usr/local/opt/e2fsprogs/sbin/e2label" "$(DESTDIR)/$(sbindir)/e2label" +- $(LN_S) -f "/usr/local/opt/e2fsprogs/sbin/mke2fs" "$(DESTDIR)/$(sbindir)/mke2fs" + endif + if LINUX + install-data-hook: +diff --git a/tools/Makefile.am b/tools/Makefile.am +index 52f81e1..78c418f 100644 +--- a/tools/Makefile.am ++++ b/tools/Makefile.am +@@ -1,2 +1,2 @@ + +-SUBDIRS = macosx ++SUBDIRS = diff --git a/nixpkgs/pkgs/tools/filesystems/fuse-ext2/default.nix b/nixpkgs/pkgs/tools/filesystems/fuse-ext2/default.nix new file mode 100644 index 000000000000..e608bc5a41db --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/fuse-ext2/default.nix @@ -0,0 +1,46 @@ +{ lib +, stdenv +, fetchFromGitHub +, autoreconfHook +, e2fsprogs +, fuse +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "fuse-ext2"; + version = "0.0.11"; + + src = fetchFromGitHub { + owner = "alperakcan"; + repo = "fuse-ext2"; + rev = "v${finalAttrs.version}"; + hash = "sha256-VQMftlnd6q1PdwhSIQwjffjnkhupY8MUc8E+p1tgvUM="; + }; + + patches = [ + # Remove references to paths outside the nix store + ./remove-impure-paths.patch + # Don't build macOS desktop installer + ./darwin-no-installer.patch + ]; + + nativeBuildInputs = [ + autoreconfHook + ]; + + buildInputs = [ + e2fsprogs + fuse + ]; + + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=incompatible-function-pointer-types"; + + meta = with lib; { + description = "FUSE module to mount ext2, ext3 and ext4 with read write support"; + homepage = "https://github.com/alperakcan/fuse-ext2"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ emilytrau ]; + platforms = platforms.unix; + mainProgram = "fuse-ext2"; + }; +}) diff --git a/nixpkgs/pkgs/tools/filesystems/fuse-ext2/remove-impure-paths.patch b/nixpkgs/pkgs/tools/filesystems/fuse-ext2/remove-impure-paths.patch new file mode 100644 index 000000000000..02a8b1e5a826 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/fuse-ext2/remove-impure-paths.patch @@ -0,0 +1,35 @@ +diff --git a/fuse-ext2/Makefile.am b/fuse-ext2/Makefile.am +index 9d3a065..0bb4341 100644 +--- a/fuse-ext2/Makefile.am ++++ b/fuse-ext2/Makefile.am +@@ -17,8 +17,7 @@ fuse_ext2_probe_SOURCES = \ + + fuse_ext2_probe_CFLAGS = \ + -Wall \ +- -DHAVE_CONFIG_H \ +- -I/usr/local/include ++ -DHAVE_CONFIG_H + + fuse_ext2_SOURCES = \ + fuse-ext2.h \ +@@ -98,9 +97,7 @@ umfuseext2_la_CFLAGS = \ + -Wall \ + -DHAVE_CONFIG_H \ + -D_GNU_SOURCE \ +- $(DEVELFLAGS) \ +- -I$(includedir)/umview \ +- -I/usr/local/include ++ $(DEVELFLAGS) + + umfuseext2_la_LDFLAGS = \ + -module \ +@@ -110,8 +107,7 @@ umfuseext2_la_LDFLAGS = \ + + fuse_ext2_CFLAGS = \ + -Wall \ +- -DHAVE_CONFIG_H \ +- -I/usr/local/include ++ -DHAVE_CONFIG_H + + if DARWIN + bin_PROGRAMS += \ 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..6afbda9f27cd --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/fuse-overlayfs/default.nix @@ -0,0 +1,32 @@ +{ 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; + mainProgram = "fuse-overlayfs"; + }; +} diff --git a/nixpkgs/pkgs/tools/filesystems/fuseiso/default.nix b/nixpkgs/pkgs/tools/filesystems/fuseiso/default.nix new file mode 100644 index 000000000000..b731e9c7cc96 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/fuseiso/default.nix @@ -0,0 +1,56 @@ +{ 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; + mainProgram = "fuseiso"; + }; +} diff --git a/nixpkgs/pkgs/tools/filesystems/fwanalyzer/default.nix b/nixpkgs/pkgs/tools/filesystems/fwanalyzer/default.nix new file mode 100644 index 000000000000..26fd45fa90ea --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/fwanalyzer/default.nix @@ -0,0 +1,40 @@ +{ 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 ]; + mainProgram = "fwanalyzer"; + }; +} diff --git a/nixpkgs/pkgs/tools/filesystems/garage/default.nix b/nixpkgs/pkgs/tools/filesystems/garage/default.nix new file mode 100644 index 000000000000..e34822845b40 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/garage/default.nix @@ -0,0 +1,110 @@ +{ 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; + }; + + postPatch = '' + # Starting in 0.9.x series, Garage is using mold in local development + # and this leaks in this packaging, we remove it to use the default linker. + rm .cargo/config.toml || true + ''; + + 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"; + changelog = "https://git.deuxfleurs.fr/Deuxfleurs/garage/releases/tag/v${version}"; + 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; + mainProgram = "garage"; + }; + }; +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_5 = generic { + version = "0.8.5"; + sha256 = "sha256-YRxkjETSmI1dcHP9qTPLcOMqXx9B2uplVR3bBjJWn3I="; + cargoSha256 = "sha256-VOcymlvqqQRdT1MFzRcMuD+Xo3fc3XTuRA12tW7ZjdI="; + broken = stdenv.isDarwin; + }; + + garage_0_8 = garage_0_8_5; + + garage_0_9_1 = generic { + version = "0.9.1"; + sha256 = "sha256-AXLaifVmZU4j5D/wKn/0TzhjHZBzZW1+tMyhsAo2eBU="; + cargoSha256 = "sha256-4/+OsM73TroBB1TGqare2xASO5KhqVyNkkss0Y0JZXg="; + }; + + garage_0_9 = garage_0_9_1; + + 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..7e123c1e4800 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/gcsfuse/default.nix @@ -0,0 +1,47 @@ +{ lib +, buildGoModule +, fetchFromGitHub +}: + +buildGoModule rec { + pname = "gcsfuse"; + version = "1.4.2"; + + src = fetchFromGitHub { + owner = "googlecloudplatform"; + repo = "gcsfuse"; + rev = "v${version}"; + hash = "sha256-gayzCUL6xM56sy8a5ljwN0X0kjW56YLJtLwFOpxBsG4="; + }; + + vendorHash = "sha256-3b0qk/EfVfObG8Rqj2N5DypoOozCY4E2LQiGQmOMTOY="; + + 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..b640c99dc82f --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/genext2fs/default.nix @@ -0,0 +1,36 @@ +{ 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 ]; + mainProgram = "genext2fs"; + }; +} diff --git a/nixpkgs/pkgs/tools/filesystems/genimage/default.nix b/nixpkgs/pkgs/tools/filesystems/genimage/default.nix new file mode 100644 index 000000000000..34500447b875 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/genimage/default.nix @@ -0,0 +1,32 @@ +{ lib, stdenv, fetchurl, autoreconfHook, pkg-config, libconfuse, gettext }: + +stdenv.mkDerivation rec { + pname = "genimage"; + version = "17"; + + src = fetchurl { + url = "https://public.pengutronix.de/software/genimage/genimage-${version}.tar.xz"; + sha256 = "sha256-qHVuNWeg1NgsNrCMzB4IglC5AG1WcMaysBQYXm7GBnE="; + }; + + 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 ]; + mainProgram = "genimage"; + }; +} diff --git a/nixpkgs/pkgs/tools/filesystems/genromfs/default.nix b/nixpkgs/pkgs/tools/filesystems/genromfs/default.nix new file mode 100644 index 000000000000..6c40c4ad94cd --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/genromfs/default.nix @@ -0,0 +1,26 @@ +{ 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; + mainProgram = "genromfs"; + }; +} 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..00c73ce3e603 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/gfs2-utils/default.nix @@ -0,0 +1,32 @@ +{ lib, stdenv, fetchurl +, autoreconfHook, bison, flex, pkg-config +, bzip2, check, ncurses, util-linux, zlib +}: + +stdenv.mkDerivation rec { + pname = "gfs2-utils"; + version = "3.5.1"; + + src = fetchurl { + url = "https://pagure.io/gfs2-utils/archive/${version}/gfs2-utils-${version}.tar.gz"; + hash = "sha256-ZWzNfYuhIxGmSAe454vRjAKp9Lq7EBBSY36P7qVgZnw="; + }; + + 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..c5e388fc5ffb --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/gitfs/default.nix @@ -0,0 +1,44 @@ +{ 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 ]; + mainProgram = "gitfs"; + }; +} 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..f3ed4fb6ab98 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/go-mtpfs/default.nix @@ -0,0 +1,35 @@ +{ 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; + mainProgram = "go-mtpfs"; + }; +} 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..1865b6f57644 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/goofys/default.nix @@ -0,0 +1,37 @@ +{ 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 + mainProgram = "goofys"; + }; + +} diff --git a/nixpkgs/pkgs/tools/filesystems/gpart/default.nix b/nixpkgs/pkgs/tools/filesystems/gpart/default.nix new file mode 100644 index 000000000000..a8466d3462e8 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/gpart/default.nix @@ -0,0 +1,34 @@ +{ 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; + mainProgram = "gpart"; + }; +} diff --git a/nixpkgs/pkgs/tools/filesystems/grive2/default.nix b/nixpkgs/pkgs/tools/filesystems/grive2/default.nix new file mode 100644 index 000000000000..41afc98e7f94 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/grive2/default.nix @@ -0,0 +1,47 @@ +{ 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; + mainProgram = "grive"; + }; +} 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..3a36af72462e --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/httm/default.nix @@ -0,0 +1,42 @@ +{ 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 ]; + mainProgram = "httm"; + }; +} diff --git a/nixpkgs/pkgs/tools/filesystems/httpdirfs/default.nix b/nixpkgs/pkgs/tools/filesystems/httpdirfs/default.nix new file mode 100644 index 000000000000..6163e1a0158a --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/httpdirfs/default.nix @@ -0,0 +1,27 @@ +{ 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; + mainProgram = "httpdirfs"; + }; +} 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/ifuse/default.nix b/nixpkgs/pkgs/tools/filesystems/ifuse/default.nix new file mode 100644 index 000000000000..8f2e1f2a6ffb --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/ifuse/default.nix @@ -0,0 +1,47 @@ +{ 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 ]; + mainProgram = "ifuse"; + }; +} diff --git a/nixpkgs/pkgs/tools/filesystems/ioztat/default.nix b/nixpkgs/pkgs/tools/filesystems/ioztat/default.nix new file mode 100644 index 000000000000..b5f949ad4f2c --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/ioztat/default.nix @@ -0,0 +1,59 @@ +{ 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 ]; + mainProgram = "ioztat"; + }; +} 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..948de453ec18 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/jefferson/default.nix @@ -0,0 +1,42 @@ +{ 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 ]; + mainProgram = "jefferson"; + }; +} 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..6c5dd3d30c70 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/jmtpfs/default.nix @@ -0,0 +1,33 @@ +{ 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 ]; + mainProgram = "jmtpfs"; + }; +} diff --git a/nixpkgs/pkgs/tools/filesystems/juicefs/default.nix b/nixpkgs/pkgs/tools/filesystems/juicefs/default.nix new file mode 100644 index 000000000000..6f6dd4101597 --- /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.2"; + + src = fetchFromGitHub { + owner = "juicedata"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-Sf68N5ZKveKM6xZEqF7Ah0KGgOx1cGZpJ2lYkUlgpI0="; + }; + + vendorHash = "sha256-ofUo/3EQPhXPNeD/3to5oFir/3eAaf9WBHR4DOzcxBQ="; + + 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..fd6281a43ab6 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/kdiskmark/default.nix @@ -0,0 +1,55 @@ +{ stdenv +, lib +, wrapQtAppsHook +, qtbase +, qttools +, fio +, cmake +, polkit-qt +, extra-cmake-modules +, fetchFromGitHub +}: +stdenv.mkDerivation rec { + name = "kdiskmark"; + version = "3.1.4"; + + src = fetchFromGitHub { + owner = "jonmagon"; + repo = "kdiskmark"; + rev = version; + sha256 = "sha256-JueY7zw9PIo9ETi7pQLpw8FGRhNXYXeXEvTzZGz9lbw="; + fetchSubmodules = true; + }; + + nativeBuildInputs = [ cmake wrapQtAppsHook ]; + + buildInputs = [ + qtbase + qttools + extra-cmake-modules + polkit-qt + ]; + + preConfigure = '' + substituteInPlace CMakeLists.txt \ + --replace \$\{POLKITQT-1_POLICY_FILES_INSTALL_DIR\} $out/share/polkit-1/actions + ''; + + 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; + mainProgram = "kdiskmark"; + }; +} + 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..3d5e7f509bc4 --- /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.1.0"; + + src = fetchgit { + url = "https://invent.kde.org/system/kio-fuse.git"; + sha256 = "sha256-xVeDNkSeHCk86L07lPVokSgHNkye2tnLoCkdw4g2Jv0="; + 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/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..1ff360bc3399 --- /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.40.1"; + + src = fetchFromGitHub { + owner = "trapexit"; + repo = pname; + rev = version; + sha256 = "sha256-EeAgDkm8WyD9OCM8/tHydp/slDGPwCAljeOrUCIWAqQ="; + }; + + 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; [ 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..f5235239103d --- /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 = "20230912"; + + src = fetchFromGitHub { + owner = "trapexit"; + repo = pname; + rev = "80d6c9511da554009415d67e7c0ead1256c1fc41"; + hash = "sha256-9sn2ziIjes2squSGbjjXVch2zDFjQruWB4282p4jWcY="; + }; + + 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; [ makefu ]; + }; +} diff --git a/nixpkgs/pkgs/tools/filesystems/mhddfs/default.nix b/nixpkgs/pkgs/tools/filesystems/mhddfs/default.nix new file mode 100644 index 000000000000..58986c25dbf2 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/mhddfs/default.nix @@ -0,0 +1,36 @@ +{ 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 ]; + mainProgram = "mhddfs"; + }; +} 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..c2712376da6b --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/mkspiffs/default.nix @@ -0,0 +1,38 @@ +{ lib, stdenv, fetchFromGitHub }: + +# 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; + hash = "sha256-oa6Lmo2yb66IjtEKkZyJBgM/p7rdvmrKfgNd2rAM/Lk="; + }; + + buildFlags = [ "dist" ]; + + makeFlags = [ + "VERSION=${version}" + "SPIFFS_VERSION=unknown" + ]; + + 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; + mainProgram = "mkspiffs"; + }; +} 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..bda338108051 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/mount-zip/default.nix @@ -0,0 +1,33 @@ +{ lib, stdenv, fetchFromGitHub, fuse, boost, gcc, icu, libzip, pandoc +, pkg-config }: + +stdenv.mkDerivation (finalAttrs: { + pname = "mount-zip"; + version = "1.0.12"; + + src = fetchFromGitHub { + owner = "google"; + repo = "mount-zip"; + rev = "v${finalAttrs.version}"; + hash = "sha256-bsuGEgCrU7Gxd9oAiI39AYT9aiXufrI9CniTCfa6LCY="; + }; + + 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; + mainProgram = "mount-zip"; + }; +}) 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..0412a99beee0 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/mp3fs/default.nix @@ -0,0 +1,51 @@ +{ 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 ]; + mainProgram = "mp3fs"; + }; +} 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..d84f9cc9b9b1 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/mtpfs/default.nix @@ -0,0 +1,24 @@ +{ 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 + mainProgram = "mtpfs"; + }; +} 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..0e7c8fd42d63 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/rdfind/default.nix @@ -0,0 +1,22 @@ +{ lib, stdenv, fetchurl, nettle }: + +stdenv.mkDerivation rec { + pname = "rdfind"; + version = "1.6.0"; + + src = fetchurl { + url = "https://rdfind.pauldreik.se/${pname}-${version}.tar.gz"; + sha256 = "sha256-ekBujvGIalhpZVYEYY3Zj2cvEsamvkkm0FO+ZQcPMnk="; + }; + + 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; + mainProgram = "rdfind"; + }; +} 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..04a4d6273878 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/rmfuse/default.nix @@ -0,0 +1,52 @@ +{ lib +, python3 +, fetchFromGitHub +}: + +python3.pkgs.buildPythonApplication rec { + pname = "rmfuse"; + version = "unstable-2021-06-06"; + + pyproject = true; + + src = fetchFromGitHub { + owner = "rschroll"; + repo = "rmfuse"; + rev = "3796b8610c8a965a60a417fc0bf8ea5200b71fd2"; + hash = "sha256-W3kS6Kkmp8iWMOYFL7r1GyjSQvFotBXQCuTMK0vyHQ8="; + }; + + nativeBuildInputs = with python3.pkgs; [ + poetry-core + pythonRelaxDepsHook + ]; + + pythonRelaxDeps = [ + "bidict" + "rmrl" + "xdg" + ]; + + 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; [ ]; + mainProgram = "rmfuse"; + }; +} diff --git a/nixpkgs/pkgs/tools/filesystems/rmount/default.nix b/nixpkgs/pkgs/tools/filesystems/rmount/default.nix new file mode 100644 index 000000000000..ec4bb1392712 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/rmount/default.nix @@ -0,0 +1,33 @@ +{ 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; + mainProgram = "rmount"; + }; +} diff --git a/nixpkgs/pkgs/tools/filesystems/rnm/default.nix b/nixpkgs/pkgs/tools/filesystems/rnm/default.nix new file mode 100644 index 000000000000..479feabb8ebc --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/rnm/default.nix @@ -0,0 +1,34 @@ +{ 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; + mainProgram = "rnm"; + }; +} diff --git a/nixpkgs/pkgs/tools/filesystems/romdirfs/default.nix b/nixpkgs/pkgs/tools/filesystems/romdirfs/default.nix new file mode 100644 index 000000000000..cc711e57cdb6 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/romdirfs/default.nix @@ -0,0 +1,25 @@ +{ 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; [ ]; + mainProgram = "romdirfs"; + }; +} diff --git a/nixpkgs/pkgs/tools/filesystems/s3backer/default.nix b/nixpkgs/pkgs/tools/filesystems/s3backer/default.nix new file mode 100644 index 000000000000..3585408a2f7d --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/s3backer/default.nix @@ -0,0 +1,38 @@ +{ 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; + mainProgram = "s3backer"; + }; +} 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..76eb667bceaa --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/sandboxfs/default.nix @@ -0,0 +1,35 @@ +{ 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 ]; + mainProgram = "sandboxfs"; + }; +} diff --git a/nixpkgs/pkgs/tools/filesystems/sasquatch/default.nix b/nixpkgs/pkgs/tools/filesystems/sasquatch/default.nix new file mode 100644 index 000000000000..f8d66683fccb --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/sasquatch/default.nix @@ -0,0 +1,76 @@ +{ 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; + mainProgram = "sasquatch"; + }; +} diff --git a/nixpkgs/pkgs/tools/filesystems/sdat2img/default.nix b/nixpkgs/pkgs/tools/filesystems/sdat2img/default.nix new file mode 100644 index 000000000000..93493356eb51 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/sdat2img/default.nix @@ -0,0 +1,27 @@ +{ 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; + mainProgram = "sdat2img"; + }; +} diff --git a/nixpkgs/pkgs/tools/filesystems/securefs/default.nix b/nixpkgs/pkgs/tools/filesystems/securefs/default.nix new file mode 100644 index 000000000000..fe148e955cb2 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/securefs/default.nix @@ -0,0 +1,40 @@ +{ 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; + mainProgram = "securefs"; + }; +} diff --git a/nixpkgs/pkgs/tools/filesystems/sftpman/default.nix b/nixpkgs/pkgs/tools/filesystems/sftpman/default.nix new file mode 100644 index 000000000000..579c03992dde --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/sftpman/default.nix @@ -0,0 +1,26 @@ +{ 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 ]; + mainProgram = "sftpman"; + }; +} 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..994b785c444e --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/simple-mtpfs/default.nix @@ -0,0 +1,32 @@ +{ 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 ]; + mainProgram = "simple-mtpfs"; + }; +} diff --git a/nixpkgs/pkgs/tools/filesystems/smbnetfs/default.nix b/nixpkgs/pkgs/tools/filesystems/smbnetfs/default.nix new file mode 100644 index 000000000000..120b30cbb1d1 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/smbnetfs/default.nix @@ -0,0 +1,23 @@ +{ 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/"; + mainProgram = "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..89be607027f2 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/snapraid/default.nix @@ -0,0 +1,29 @@ +{ lib, stdenv, fetchFromGitHub, autoreconfHook }: + +stdenv.mkDerivation rec { + pname = "snapraid"; + version = "12.3"; + + src = fetchFromGitHub { + owner = "amadvance"; + repo = "snapraid"; + rev = "v${version}"; + sha256 = "sha256-pkLooA3JZV/rPlE5+JeJN1QW2xAdNu7c/iFFtT4M4vc="; + }; + + 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; + mainProgram = "snapraid"; + }; +} 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..46d2c8ed9293 --- /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.38"; + + src = fetchFromGitHub { + owner = "dubeyko"; + repo = "ssdfs-tools"; + rev = "14c0e9eb63f75c100a711493a16665c313c7bcf7"; + hash = "sha256-s8HWuUub7EzDVZTFSitW/Zg2u0PSrXnmb5fnfOyrNL0="; + }; + + 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..4c27b888bbaa --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/stratis-cli/default.nix @@ -0,0 +1,53 @@ +{ lib +, python3Packages +, fetchFromGitHub +, nixosTests +}: + +python3Packages.buildPythonApplication rec { + pname = "stratis-cli"; + version = "3.6.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "stratis-storage"; + repo = pname; + rev = "v${version}"; + hash = "sha256-mLmjMofdr0U+Bfnkde7lJqPXkd1ICPYdlcsOm2nOcQA="; + }; + + nativeBuildInputs = with python3Packages; [ + setuptools + ]; + + 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 ]; + mainProgram = "stratis"; + }; +} diff --git a/nixpkgs/pkgs/tools/filesystems/stratisd/default.nix b/nixpkgs/pkgs/tools/filesystems/stratisd/default.nix new file mode 100644 index 000000000000..ebe7c9f14ba8 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/stratisd/default.nix @@ -0,0 +1,122 @@ +{ lib +, stdenv +, fetchFromGitHub +, rustPlatform +, cargo +, rustc +, pkg-config +, asciidoc +, ncurses +, glibc +, dbus +, cryptsetup +, util-linux +, lvm2 +, systemd +, xfsprogs +, thin-provisioning-tools +, clevis +, jose +, jq +, curl +, tpm2-tools +, coreutils +, clevisSupport ? false +, nixosTests +}: + +stdenv.mkDerivation rec { + pname = "stratisd"; + version = "3.6.5"; + + src = fetchFromGitHub { + owner = "stratis-storage"; + repo = pname; + rev = "refs/tags/stratisd-v${version}"; + hash = "sha256-qgf5Q2MAY8PAYlplvTX+YjYfDFLfddpyIG4S/IIYbsU="; + }; + + cargoDeps = rustPlatform.fetchCargoTarball { + inherit pname version src; + hash = "sha256-Bu87uHEcMKB+TX8gWHD1vRazOkqJSZKQcsPiaKXrGFE="; + }; + + 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 "${systemd}/bin/udevadm" + ''; + + nativeBuildInputs = [ + rustPlatform.cargoSetupHook + rustPlatform.bindgenHook + cargo + rustc + pkg-config + asciidoc + ncurses # tput + ]; + + buildInputs = [ + glibc + glibc.static + dbus + cryptsetup + util-linux + systemd + 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 "$out/lib/dracut/modules.d/90stratis/stratis-rootfs-setup" "$initrd/bin" + mkdir -p "$initrd/lib/systemd/system" + substitute "$out/lib/dracut/modules.d/90stratis/stratisd-min.service" \ + "$initrd/lib/systemd/system/stratisd-min.service" \ + --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 // { + inherit (nixosTests.installer-systemd-stage-1) stratisRoot; + }; + + 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..6249c7f5bbd5 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/stuffbin/default.nix @@ -0,0 +1,25 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +buildGoModule rec { + pname = "stuffbin"; + version = "1.3.0"; + + vendorHash = null; + + src = fetchFromGitHub { + owner = "knadh"; + repo = "stuffbin"; + rev = "v${version}"; + sha256 = "sha256-dOlc/G2IiuMAN0LqiZtbpXLSYaOpe5cl1+cs3YhaAbg="; + }; + + 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..8aa66de8da3f --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/svnfs/default.nix @@ -0,0 +1,45 @@ +{ 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; + mainProgram = "svnfs"; + }; +} diff --git a/nixpkgs/pkgs/tools/filesystems/tar2ext4/default.nix b/nixpkgs/pkgs/tools/filesystems/tar2ext4/default.nix new file mode 100644 index 000000000000..81df5e64d9f3 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/tar2ext4/default.nix @@ -0,0 +1,23 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +buildGoModule rec { + pname = "tar2ext4"; + version = "0.11.4"; + + src = fetchFromGitHub { + owner = "microsoft"; + repo = "hcsshim"; + rev = "v${version}"; + sha256 = "sha256-bu1uLJmFSetTv1R3qyCtZxba+wxjDDSkEpBwKNZ/meM="; + }; + + 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; + mainProgram = "tar2ext4"; + }; +} 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..e666c893b798 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/u3-tool/default.nix @@ -0,0 +1,22 @@ +{ 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 ]; + mainProgram = "u3-tool"; + }; +} 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..c038042b6871 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/ubidump/default.nix @@ -0,0 +1,42 @@ +{ 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 ]; + mainProgram = "ubidump"; + }; +} + 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..3f8897c091bc --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/wdfs/default.nix @@ -0,0 +1,28 @@ +{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; + mainProgram = "wdfs"; + }; +} 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..bf2ddb391c86 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/wipefreespace/default.nix @@ -0,0 +1,54 @@ +{ 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 ]; + mainProgram = "wipefreespace"; + }; +} 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..c8c80e5ff777 --- /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 ] ++ teams.helsinki-systems.members; + }; +} 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..94907ee4fd2f --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/yandex-disk/default.nix @@ -0,0 +1,72 @@ +{ 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. + ''; + mainProgram = "yandex-disk"; + }; +} diff --git a/nixpkgs/pkgs/tools/filesystems/zerofree/default.nix b/nixpkgs/pkgs/tools/filesystems/zerofree/default.nix new file mode 100644 index 000000000000..d44e92a33c46 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/zerofree/default.nix @@ -0,0 +1,34 @@ +{ 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 ]; + mainProgram = "zerofree"; + }; +} 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..00d78af0146f --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/zkfuse/default.nix @@ -0,0 +1,42 @@ +{ 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; + mainProgram = "zkfuse"; + }; +} diff --git a/nixpkgs/pkgs/tools/filesystems/zpool-auto-expand-partitions/Cargo.lock b/nixpkgs/pkgs/tools/filesystems/zpool-auto-expand-partitions/Cargo.lock new file mode 100644 index 000000000000..3611e181a0fe --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/zpool-auto-expand-partitions/Cargo.lock @@ -0,0 +1,753 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[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 = "bindgen" +version = "0.65.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfdf7b466f9a4903edc73f95d6d2bcd5baf8ae620638762244d3f60143643cc5" +dependencies = [ + "bitflags 1.3.2", + "cexpr", + "clang-sys", + "lazy_static", + "lazycell", + "log", + "peeking_take_while", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn 2.0.39", + "which", +] + +[[package]] +name = "bindgen" +version = "0.69.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ffcebc3849946a7170a05992aac39da343a90676ab392c51a4280981d6379c2" +dependencies = [ + "bitflags 2.4.1", + "cexpr", + "clang-sys", + "lazy_static", + "lazycell", + "log", + "peeking_take_while", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn 2.0.39", + "which", +] + +[[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.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" + +[[package]] +name = "blkid" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f68440dfd06d6a97a56f8e67729316f33c7e52c31f59f16f6e9641777702bb7" +dependencies = [ + "bitflags 1.3.2", + "blkid-sys", + "libc", + "pkg-config", + "strum", + "strum_macros", + "thiserror", +] + +[[package]] +name = "blkid-sys" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc9c952498f4ffdf6ec98a7e739ca08cc8af1950efdd9f47db46d9dbdc111565" +dependencies = [ + "bindgen 0.65.1", +] + +[[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 = "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 = "3.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5177fac1ab67102d8989464efd043c6ff44191b1557ec1ddd489b4f7e1447e77" +dependencies = [ + "atty", + "bitflags 1.3.2", + "clap_derive", + "indexmap", + "lazy_static", + "os_str_bytes", + "strsim", + "termcolor", + "textwrap", +] + +[[package]] +name = "clap_derive" +version = "3.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d42c94ce7c2252681b5fed4d3627cc807b13dfc033246bd05d5b252399000e" +dependencies = [ + "heck 0.4.0", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.86", +] + +[[package]] +name = "cstr-argument" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bd9c8e659a473bce955ae5c35b116af38af11a7acb0b480e01f3ed348aeb40" +dependencies = [ + "cfg-if", + "memchr", +] + +[[package]] +name = "either" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" + +[[package]] +name = "errno" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f258a7194e7f7c2a7837a8913aeab7fd8c383457034fa20ce4dd3dcb813e8eb8" +dependencies = [ + "libc", + "windows-sys", +] + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "glob" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" + +[[package]] +name = "hashbrown" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" + +[[package]] +name = "heck" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "heck" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "home" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "indexmap" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282a6247722caba404c065016bbfa522806e51714c34f5dfc3e4a3a46fcb4223" +dependencies = [ + "autocfg", + "hashbrown", +] + +[[package]] +name = "itoa" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" + +[[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.150" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" + +[[package]] +name = "libloading" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +dependencies = [ + "cfg-if", + "winapi", +] + +[[package]] +name = "libzfs" +version = "0.6.16" +source = "git+https://github.com/DeterminateSystems/rust-libzfs?branch=fix-build-zpool-auto-expand-partitions#7c14513fb85a147ce91afa02f5a0dc3e3f788c3a" +dependencies = [ + "cstr-argument", + "foreign-types", + "lazy_static", + "libzfs-sys", + "libzfs-types", + "nvpair-sys", + "serde", + "serde_derive", +] + +[[package]] +name = "libzfs-sys" +version = "0.5.11" +source = "git+https://github.com/DeterminateSystems/rust-libzfs?branch=fix-build-zpool-auto-expand-partitions#7c14513fb85a147ce91afa02f5a0dc3e3f788c3a" +dependencies = [ + "bindgen 0.69.1", + "nvpair-sys", + "pkg-config", +] + +[[package]] +name = "libzfs-types" +version = "0.1.2" +source = "git+https://github.com/DeterminateSystems/rust-libzfs?branch=fix-build-zpool-auto-expand-partitions#7c14513fb85a147ce91afa02f5a0dc3e3f788c3a" +dependencies = [ + "serde", + "serde_derive", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" + +[[package]] +name = "log" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "memchr" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" + +[[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 = "nvpair-sys" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fc4cc751960db1094a7a732dd0706927aeae9194bf66c30fa227b70fc62b6c8" + +[[package]] +name = "once_cell" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" + +[[package]] +name = "os_str_bytes" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64" +dependencies = [ + "memchr", +] + +[[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.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58893f751c9b0412871a09abd62ecd2a00298c6c83befa223ef98c52aef40cbe" + +[[package]] +name = "prettyplease" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" +dependencies = [ + "proc-macro2", + "syn 2.0.39", +] + +[[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 1.0.86", + "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.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "regex" +version = "1.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" +dependencies = [ + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.6.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" + +[[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.38.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc99bc2d4f1fed22595588a013687477aedf3cdcfb26558c559edb67b4d9b22e" +dependencies = [ + "bitflags 2.4.1", + "errno", + "libc", + "linux-raw-sys", + "windows-sys", +] + +[[package]] +name = "rustversion" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f" + +[[package]] +name = "ryu" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" + +[[package]] +name = "serde" +version = "1.0.136" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.136" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.86", +] + +[[package]] +name = "serde_json" +version = "1.0.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "shlex" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "strum" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cae14b91c7d11c9a851d3fbc80a963198998c2a64eec840477fa92d8ce9b70bb" + +[[package]] +name = "strum_macros" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bb0dc7ee9c15cea6199cde9a127fa16a4c5819af85395457ad72d68edc85a38" +dependencies = [ + "heck 0.3.3", + "proc-macro2", + "quote", + "rustversion", + "syn 1.0.86", +] + +[[package]] +name = "syn" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a65b3f4ffa0092e9887669db0eae07941f023991ab58ea44da8fe8e2d511c6b" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "syn" +version = "2.0.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "termcolor" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "textwrap" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0066c8d12af8b5acd21e00547c3797fde4e8677254a7ee429176ccebbe93dd80" + +[[package]] +name = "thiserror" +version = "1.0.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.86", +] + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "unicode-segmentation" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99" + +[[package]] +name = "unicode-xid" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix", +] + +[[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.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +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.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "zpool_part_disks" +version = "0.1.1" +dependencies = [ + "blkid", + "clap", + "libzfs", + "serde", + "serde_json", +] 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..8fced13e93db --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/zpool-auto-expand-partitions/default.nix @@ -0,0 +1,51 @@ +{ lib +, rustPlatform +, cloud-utils +, fetchFromGitHub +, pkg-config +, util-linux +, zfs +}: +rustPlatform.buildRustPackage rec { + pname = "zpool-auto-expand-partitions"; + version = "0.1.1"; + + src = fetchFromGitHub { + owner = "DeterminateSystems"; + repo = "zpool-auto-expand-partitions"; + rev = "v${version}"; + hash = "sha256-N1znZbJULEeNR4ABSrUtHHkmz08N+CZqX6Ni7jFzc4c="; + }; + + cargoLock.lockFile = ./Cargo.lock; + # We rely on a fork of libzfs in order to bump the bindgen version to fix + # builds against LLVM 16. + cargoLock.outputHashes = { + "libzfs-0.6.16" = "sha256-kQunP/xW1Zb1q+TcgAkmZkt1yDnJo9CwF5qldikVN94="; + }; + + 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; + mainProgram = "zpool_part_disks"; + }; +} 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..4f546e544e66 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/zpool-iostat-viz/default.nix @@ -0,0 +1,42 @@ +{ 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 ]; + mainProgram = "zpool-iostat-viz"; + }; +} |