uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
42
pkgs/tools/filesystems/9pfs/default.nix
Normal file
42
pkgs/tools/filesystems/9pfs/default.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{ lib, stdenv, fetchFromGitHub, fuse }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "9pfs";
|
||||
version = "unstable-2015-09-18";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mischief";
|
||||
repo = "9pfs";
|
||||
rev = "7f4ca4cd750d650c1215b92ac3cc2a28041960e4";
|
||||
sha256 = "007s2idsn6bspmfxv1qabj39ggkgvn6gwdbhczwn04lb4c6gh3xc";
|
||||
};
|
||||
|
||||
# Upstream development has stopped and is no longer accepting patches
|
||||
# https://github.com/mischief/9pfs/pull/3
|
||||
patches = [ ./fix-darwin-build.patch ];
|
||||
|
||||
preConfigure =
|
||||
''
|
||||
substituteInPlace Makefile --replace '-g bin' ""
|
||||
installFlagsArray+=(BIN=$out/bin MAN=$out/share/man/man1)
|
||||
mkdir -p $out/bin $out/share/man/man1
|
||||
'';
|
||||
|
||||
buildInputs = [ fuse ];
|
||||
|
||||
# Workaround build failure on -fno-common toolchains like upstream
|
||||
# gcc-10. Otherwise build fails as:
|
||||
# ld: lib/auth_rpc.o:/build/source/lib/../9pfs.h:35: multiple definition of
|
||||
# `logfile'; 9pfs.o:/build/source/9pfs.h:35: first defined here
|
||||
NIX_CFLAGS_COMPILE = "-fcommon";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/mischief/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 ];
|
||||
};
|
||||
}
|
||||
47
pkgs/tools/filesystems/9pfs/fix-darwin-build.patch
Normal file
47
pkgs/tools/filesystems/9pfs/fix-darwin-build.patch
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
From 6b7863b51c97f8ecd9a93fc4347f8938f9b5c05f Mon Sep 17 00:00:00 2001
|
||||
From: midchildan <git@midchildan.org>
|
||||
Date: Tue, 30 Mar 2021 22:21:51 +0900
|
||||
Subject: [PATCH] build: fix build for macOS
|
||||
|
||||
---
|
||||
9pfs.c | 4 ++--
|
||||
libc.h | 4 ++++
|
||||
2 files changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/9pfs.c b/9pfs.c
|
||||
index 2c481bd..f5c487c 100644
|
||||
--- a/9pfs.c
|
||||
+++ b/9pfs.c
|
||||
@@ -30,7 +30,7 @@
|
||||
enum
|
||||
{
|
||||
CACHECTLSIZE = 8, /* sizeof("cleared\n") - 1 */
|
||||
- MSIZE = 8192
|
||||
+ MSIZE_9P = 8192
|
||||
};
|
||||
|
||||
void dir2stat(struct stat*, Dir*);
|
||||
@@ -505,7 +505,7 @@ main(int argc, char *argv[])
|
||||
freeaddrinfo(ainfo);
|
||||
|
||||
init9p();
|
||||
- msize = _9pversion(MSIZE);
|
||||
+ msize = _9pversion(MSIZE_9P);
|
||||
if(doauth){
|
||||
authfid = _9pauth(AUTHFID, user, NULL);
|
||||
ai = auth_proxy(authfid, auth_getkey, "proto=p9any role=client");
|
||||
diff --git a/libc.h b/libc.h
|
||||
index 099adba..aac03c5 100644
|
||||
--- a/libc.h
|
||||
+++ b/libc.h
|
||||
@@ -61,6 +61,10 @@ typedef unsigned char uchar;
|
||||
typedef unsigned long long uvlong;
|
||||
typedef long long vlong;
|
||||
|
||||
+#ifndef __GLIBC__
|
||||
+typedef unsigned long ulong;
|
||||
+#endif
|
||||
+
|
||||
typedef
|
||||
struct Qid
|
||||
{
|
||||
38
pkgs/tools/filesystems/aefs/default.nix
Normal file
38
pkgs/tools/filesystems/aefs/default.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{ lib, stdenv, fetchurl, fetchpatch, fuse }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "aefs";
|
||||
version = "0.4pre259-8843b7c";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://tarballs.nixos.org/aefs-${version}.tar.bz2";
|
||||
sha256 = "167hp58hmgdavg2mqn5dx1xgq24v08n8d6psf33jhbdabzx6a6zq";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://github.com/edolstra/aefs/commit/15d8df8b8d5dc1ee20d27a86c4d23163a67f3123.patch";
|
||||
sha256 = "0k36hsyvf8a0ji2hpghgqff2fncj0pllxn8p0rs0aj4h7j2vp4iv";
|
||||
})
|
||||
];
|
||||
|
||||
# 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";
|
||||
|
||||
buildInputs = [ fuse ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/edolstra/aefs";
|
||||
description = "A cryptographic filesystem implemented in userspace using FUSE";
|
||||
platforms = platforms.unix;
|
||||
maintainers = [ maintainers.eelco ];
|
||||
license = licenses.gpl2;
|
||||
};
|
||||
}
|
||||
30
pkgs/tools/filesystems/afpfs-ng/default.nix
Normal file
30
pkgs/tools/filesystems/afpfs-ng/default.nix
Normal file
|
|
@ -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
|
||||
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;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
@ -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}")
|
||||
41
pkgs/tools/filesystems/android-file-transfer/default.nix
Normal file
41
pkgs/tools/filesystems/android-file-transfer/default.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, mkDerivation
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, fuse
|
||||
, readline
|
||||
, pkg-config
|
||||
, qtbase
|
||||
, qttools
|
||||
, wrapQtAppsHook }:
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "android-file-transfer";
|
||||
version = "4.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "whoozle";
|
||||
repo = "android-file-transfer-linux";
|
||||
rev = "v${version}";
|
||||
sha256 = "125rq8ji83nw6chfw43i0h9c38hjqh1qjibb0gnf9wrigar9zc8b";
|
||||
};
|
||||
|
||||
patches = [ ./darwin-dont-vendor-dependencies.patch ];
|
||||
|
||||
nativeBuildInputs = [ cmake readline pkg-config wrapQtAppsHook ];
|
||||
buildInputs = [ fuse qtbase qttools ];
|
||||
|
||||
postInstall = lib.optionalString stdenv.isDarwin ''
|
||||
mkdir $out/Applications
|
||||
mv $out/*.app $out/Applications
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Reliable MTP client with minimalistic UI";
|
||||
homepage = "https://whoozle.github.io/android-file-transfer-linux/";
|
||||
license = licenses.lgpl21Plus;
|
||||
maintainers = [ maintainers.xaverdh ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
30
pkgs/tools/filesystems/apfs-fuse/default.nix
Normal file
30
pkgs/tools/filesystems/apfs-fuse/default.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ lib, stdenv, fetchFromGitHub, fuse3, bzip2, zlib, attr, cmake }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "apfs-fuse-unstable";
|
||||
version = "2020-09-28";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sgan81";
|
||||
repo = "apfs-fuse";
|
||||
rev = "ee71aa5c87c0831c1ae17048951fe9cd7579c3db";
|
||||
sha256 = "0wvsx708km1lnhghny5y69k694x0zy8vlbndswkb7sq81j1r6kwx";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
buildInputs = [ fuse3 bzip2 zlib attr ];
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
postFixup = ''
|
||||
ln -s $out/bin/apfs-fuse $out/bin/mount.fuse.apfs-fuse
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/sgan81/apfs-fuse";
|
||||
description = "FUSE driver for APFS (Apple File System)";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ ealasu ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
|
||||
}
|
||||
38
pkgs/tools/filesystems/apfsprogs/default.nix
Normal file
38
pkgs/tools/filesystems/apfsprogs/default.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "apfsprogs";
|
||||
version = "unstable-2022-02-23";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "linux-apfs";
|
||||
repo = "apfsprogs";
|
||||
rev = "5bce5c7f42843dfbbed90767640e748062e23dd2";
|
||||
sha256 = "sha256-0N+aC5paP6ZoXUD7A9lLnF2onbOJU+dqZ8oKs+dCUcg=";
|
||||
};
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
make -C apfsck $makeFlags
|
||||
make -C mkapfs $makeFlags
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
make -C apfsck install DESTDIR="$out" $installFlags
|
||||
make -C mkapfs install DESTDIR="$out" $installFlags
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Experimental APFS tools for linux";
|
||||
homepage = "https://github.com/linux-apfs/apfsprogs";
|
||||
license = licenses.gpl2Only;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ Luflosi ];
|
||||
};
|
||||
}
|
||||
20
pkgs/tools/filesystems/archivemount/default.nix
Normal file
20
pkgs/tools/filesystems/archivemount/default.nix
Normal file
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
26
pkgs/tools/filesystems/avfs/default.nix
Normal file
26
pkgs/tools/filesystems/avfs/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ lib, stdenv, fetchurl, pkg-config, fuse, xz }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "avfs";
|
||||
version = "1.1.4";
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/avf/${version}/${pname}-${version}.tar.bz2";
|
||||
sha256 = "0ax1zbw4pmggx1b784bfabdqyn39k7109cnl22p69y2phnpq2y9s";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = [ fuse xz ];
|
||||
|
||||
configureFlags = [
|
||||
"--enable-library"
|
||||
"--enable-fuse"
|
||||
];
|
||||
|
||||
meta = {
|
||||
homepage = "http://avf.sourceforge.net/";
|
||||
description = "Virtual filesystem that allows browsing of compressed files";
|
||||
platforms = lib.platforms.unix;
|
||||
license = lib.licenses.gpl2Only;
|
||||
};
|
||||
}
|
||||
37
pkgs/tools/filesystems/bashmount/default.nix
Normal file
37
pkgs/tools/filesystems/bashmount/default.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{lib, stdenv, fetchFromGitHub}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "bashmount";
|
||||
version = "4.3.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jamielinux";
|
||||
repo = "bashmount";
|
||||
rev = version;
|
||||
sha256 = "1irw47s6i1qwxd20cymzlfw5sv579cw877l27j3p66qfhgadwxrl";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp bashmount $out/bin
|
||||
|
||||
mkdir -p $out/etc
|
||||
cp bashmount.conf $out/etc
|
||||
|
||||
mkdir -p $out/share/man/man1
|
||||
gzip -c -9 bashmount.1 > bashmount.1.gz
|
||||
cp bashmount.1.gz $out/share/man/man1
|
||||
|
||||
mkdir -p $out/share/doc/bashmount
|
||||
cp COPYING $out/share/doc/bashmount
|
||||
cp NEWS $out/share/doc/bashmount
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/jamielinux/bashmount";
|
||||
description = "A menu-driven bash script for the management of removable media with udisks";
|
||||
maintainers = [ maintainers.koral ];
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
52
pkgs/tools/filesystems/bcache-tools/bcache-udev-modern.patch
Normal file
52
pkgs/tools/filesystems/bcache-tools/bcache-udev-modern.patch
Normal file
|
|
@ -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
|
||||
|
||||
63
pkgs/tools/filesystems/bcache-tools/default.nix
Normal file
63
pkgs/tools/filesystems/bcache-tools/default.nix
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
{ lib, stdenv, fetchFromGitHub, pkg-config, util-linux, bash }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "bcache-tools";
|
||||
version = "1.0.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "g2p";
|
||||
repo = "bcache-tools";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-Ors2xXRrVTf8Cq3BYnSVSfJy/nyGjT5BGLSNpxOcHR4=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ util-linux ];
|
||||
|
||||
# * Remove broken install rules (they ignore $PREFIX) for stuff we don't need
|
||||
# anyway (it's distro specific stuff).
|
||||
# * Fixup absolute path to modprobe.
|
||||
prePatch = ''
|
||||
sed -e "/INSTALL.*initramfs\/hook/d" \
|
||||
-e "/INSTALL.*initcpio\/install/d" \
|
||||
-e "/INSTALL.*dracut\/module-setup.sh/d" \
|
||||
-e "s/pkg-config/$PKG_CONFIG/" \
|
||||
-i Makefile
|
||||
'';
|
||||
|
||||
patches = [
|
||||
./bcache-udev-modern.patch
|
||||
./fix-static.patch
|
||||
];
|
||||
|
||||
makeFlags = [
|
||||
"PREFIX=${placeholder "out"}"
|
||||
"UDEVLIBDIR=${placeholder "out"}/lib/udev/"
|
||||
];
|
||||
|
||||
preBuild = ''
|
||||
sed -e "s|/bin/sh|${bash}/bin/sh|" -i *.rules
|
||||
'';
|
||||
|
||||
preInstall = ''
|
||||
mkdir -p "$out/sbin" "$out/lib/udev/rules.d" "$out/share/man/man8"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "User-space tools required for bcache (Linux block layer cache)";
|
||||
longDescription = ''
|
||||
Bcache is a Linux kernel block layer cache. It allows one or more fast
|
||||
disk drives such as flash-based solid state drives (SSDs) to act as a
|
||||
cache for one or more slower hard disk drives.
|
||||
|
||||
This package contains the required user-space tools.
|
||||
|
||||
User documentation is in Documentation/bcache.txt in the Linux kernel
|
||||
tree.
|
||||
'';
|
||||
homepage = "https://bcache.evilpiepirate.org/";
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.bjornfor ];
|
||||
};
|
||||
}
|
||||
22
pkgs/tools/filesystems/bcache-tools/fix-static.patch
Normal file
22
pkgs/tools/filesystems/bcache-tools/fix-static.patch
Normal file
|
|
@ -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;
|
||||
73
pkgs/tools/filesystems/bcachefs-tools/default.nix
Normal file
73
pkgs/tools/filesystems/bcachefs-tools/default.nix
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, docutils
|
||||
, libuuid
|
||||
, libscrypt
|
||||
, libsodium
|
||||
, keyutils
|
||||
, liburcu
|
||||
, zlib
|
||||
, libaio
|
||||
, zstd
|
||||
, lz4
|
||||
, python3Packages
|
||||
, udev
|
||||
, valgrind
|
||||
, nixosTests
|
||||
, fuse3
|
||||
, fuseSupport ? false
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "bcachefs-tools";
|
||||
version = "unstable-2022-05-02";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "koverstreet";
|
||||
repo = "bcachefs-tools";
|
||||
rev = "6f5afc0c12bbf56ffdabe5b2c5297aef255c4baa";
|
||||
sha256 = "0483zhm3gmk6fd1pn815i3fixwlwsnks3817gn7n3idbbw0kg5ng";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs .
|
||||
substituteInPlace Makefile \
|
||||
--replace "pytest-3" "pytest --verbose" \
|
||||
--replace "INITRAMFS_DIR=/etc/initramfs-tools" \
|
||||
"INITRAMFS_DIR=${placeholder "out"}/etc/initramfs-tools"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ pkg-config docutils python3Packages.python ];
|
||||
|
||||
buildInputs = [
|
||||
libuuid libscrypt libsodium keyutils liburcu zlib libaio
|
||||
zstd lz4 python3Packages.pytest udev valgrind
|
||||
] ++ lib.optional fuseSupport fuse3;
|
||||
|
||||
doCheck = false; # needs bcachefs module loaded on builder
|
||||
checkFlags = [ "BCACHEFS_TEST_USE_VALGRIND=no" ];
|
||||
checkInputs = [ valgrind ];
|
||||
|
||||
preCheck = lib.optionalString fuseSupport ''
|
||||
rm tests/test_fuse.py
|
||||
'';
|
||||
|
||||
installFlags = [ "PREFIX=${placeholder "out"}" ];
|
||||
|
||||
passthru.tests = {
|
||||
smoke-test = nixosTests.bcachefs;
|
||||
inherit (nixosTests.installer) bcachefsSimple bcachefsEncrypted bcachefsMulti;
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
}
|
||||
227
pkgs/tools/filesystems/bees/bees-service-wrapper
Executable file
227
pkgs/tools/filesystems/bees/bees-service-wrapper
Executable file
|
|
@ -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[@]}"
|
||||
82
pkgs/tools/filesystems/bees/default.nix
Normal file
82
pkgs/tools/filesystems/bees/default.nix
Normal file
|
|
@ -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.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Zygo";
|
||||
repo = "bees";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-hD6/pMRnQgPqL1M6QOuRka6ESJv9kjeKy+29nRMTY1o=";
|
||||
};
|
||||
|
||||
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";
|
||||
license = licenses.gpl3;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ chaduffy ];
|
||||
longDescription = "Best-Effort Extent-Same: bees finds not just identical files, but also identical extents within files that differ";
|
||||
};
|
||||
};
|
||||
|
||||
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 (old: {
|
||||
passthru.tests = {
|
||||
smoke-test = nixosTests.bees;
|
||||
};
|
||||
})
|
||||
25
pkgs/tools/filesystems/bindfs/default.nix
Normal file
25
pkgs/tools/filesystems/bindfs/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ lib, stdenv, fetchurl, fuse, pkg-config }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "1.15.1";
|
||||
pname = "bindfs";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://bindfs.org/downloads/${pname}-${version}.tar.gz";
|
||||
sha256 = "sha256-BN01hKbN+a9DRNQDxiGFyp+rMc465aJdAQG8EJNsaKs=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ fuse ];
|
||||
postFixup = ''
|
||||
ln -s $out/bin/bindfs $out/bin/mount.fuse.bindfs
|
||||
'';
|
||||
|
||||
meta = {
|
||||
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;
|
||||
};
|
||||
}
|
||||
38
pkgs/tools/filesystems/blobfuse/default.nix
Normal file
38
pkgs/tools/filesystems/blobfuse/default.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, curl, gnutls, libgcrypt, libuuid, fuse, boost }:
|
||||
|
||||
let
|
||||
version = "1.3.7";
|
||||
src = fetchFromGitHub {
|
||||
owner = "Azure";
|
||||
repo = "azure-storage-fuse";
|
||||
rev = "blobfuse-${version}-Linux";
|
||||
sha256 = "sha256-yihIuS4AG489U7eBi/p7H6S7Cg54kkQeNVCexxQZ60A=";
|
||||
};
|
||||
cpplite = stdenv.mkDerivation rec {
|
||||
pname = "cpplite";
|
||||
inherit version src;
|
||||
|
||||
sourceRoot = "source/cpplite";
|
||||
patches = [ ./install-adls.patch ];
|
||||
|
||||
cmakeFlags = [ "-DBUILD_ADLS=ON" "-DUSE_OPENSSL=OFF" ];
|
||||
|
||||
buildInputs = [ curl libuuid gnutls ];
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
};
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "blobfuse";
|
||||
inherit version src;
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-Wno-error=catch-value";
|
||||
|
||||
buildInputs = [ curl gnutls libgcrypt libuuid fuse boost cpplite ];
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Mount an Azure Blob storage as filesystem through FUSE";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ jbgi ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
14
pkgs/tools/filesystems/blobfuse/install-adls.patch
Normal file
14
pkgs/tools/filesystems/blobfuse/install-adls.patch
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
diff --git a/adls/CMakeLists.txt b/adls/CMakeLists.txt
|
||||
index 1fb7146..22e663a 100644
|
||||
--- a/adls/CMakeLists.txt
|
||||
+++ b/adls/CMakeLists.txt
|
||||
@@ -50,3 +50,9 @@ if(BUILD_TESTS)
|
||||
string(REGEX REPLACE "([^;]+)" "${CMAKE_CURRENT_SOURCE_DIR}/\\1" AZURE_STORAGE_ADLS_TEST_SOURCES "${AZURE_STORAGE_ADLS_TEST_SOURCES}")
|
||||
set(AZURE_STORAGE_ADLS_TEST_SOURCES ${AZURE_STORAGE_ADLS_TEST_SOURCES} PARENT_SCOPE)
|
||||
endif()
|
||||
+
|
||||
+install(TARGETS azure-storage-adls
|
||||
+ ARCHIVE DESTINATION lib
|
||||
+ LIBRARY DESTINATION lib
|
||||
+ RUNTIME DESTINATION bin)
|
||||
+
|
||||
22
pkgs/tools/filesystems/bonnie/default.nix
Normal file
22
pkgs/tools/filesystems/bonnie/default.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{ lib, stdenv, fetchurl, perl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "bonnie++";
|
||||
version = "1.98";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.coker.com.au/bonnie++/bonnie++-${version}.tgz";
|
||||
sha256 = "010bmlmi0nrlp3aq7p624sfaj5a65lswnyyxk3cnz1bqig0cn2vf";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
buildInputs = [ perl ];
|
||||
|
||||
meta = {
|
||||
homepage = "http://www.coker.com.au/bonnie++/";
|
||||
description = "Hard drive and file system benchmark suite";
|
||||
license = lib.licenses.gpl2;
|
||||
platforms = lib.platforms.linux ++ lib.platforms.darwin;
|
||||
};
|
||||
}
|
||||
63
pkgs/tools/filesystems/boxfs/default.nix
Normal file
63
pkgs/tools/filesystems/boxfs/default.nix
Normal file
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
15
pkgs/tools/filesystems/boxfs/work-around-API-borkage.patch
Normal file
15
pkgs/tools/filesystems/boxfs/work-around-API-borkage.patch
Normal file
|
|
@ -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/"
|
||||
42
pkgs/tools/filesystems/btrfs-heatmap/default.nix
Normal file
42
pkgs/tools/filesystems/btrfs-heatmap/default.nix
Normal file
|
|
@ -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 ];
|
||||
};
|
||||
}
|
||||
66
pkgs/tools/filesystems/btrfs-progs/default.nix
Normal file
66
pkgs/tools/filesystems/btrfs-progs/default.nix
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
{ lib, stdenv, fetchurl
|
||||
, pkg-config, python3, sphinx
|
||||
, zstd
|
||||
, acl, attr, e2fsprogs, libuuid, lzo, udev, zlib
|
||||
, runCommand, btrfs-progs
|
||||
, gitUpdater
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "btrfs-progs";
|
||||
version = "5.18.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://kernel/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v${version}.tar.xz";
|
||||
sha256 = "sha256-bpinXM/1LpNU2qGtKExhTEkPhEJzovpSTLrJ64QcclU=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
python3 python3.pkgs.setuptools
|
||||
sphinx
|
||||
];
|
||||
|
||||
buildInputs = [ acl attr e2fsprogs libuuid lzo python3 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 = lib.optional stdenv.hostPlatform.isMusl "--disable-backtrace";
|
||||
|
||||
makeFlags = [ "udevruledir=$(out)/lib/udev/rules.d" ];
|
||||
|
||||
installFlags = [ "install_python" ];
|
||||
|
||||
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 {
|
||||
inherit pname version;
|
||||
# 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.wiki.kernel.org/";
|
||||
license = licenses.gpl2Only;
|
||||
maintainers = with maintainers; [ raskin ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
32
pkgs/tools/filesystems/btrfs-snap/default.nix
Normal file
32
pkgs/tools/filesystems/btrfs-snap/default.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ bash, btrfs-progs, coreutils, fetchFromGitHub, gnugrep, lib, makeWrapper, stdenvNoCC, util-linuxMinimal }:
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "btrfs-snap";
|
||||
version = "1.7.3";
|
||||
src = fetchFromGitHub {
|
||||
owner = "jf647";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-SDzLjgNRuR9XpmcYCD9T10MLS+//+pWFGDiTAb8NiLQ=";
|
||||
};
|
||||
buildInputs = [ bash ];
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp btrfs-snap $out/bin/
|
||||
wrapProgram $out/bin/btrfs-snap --prefix PATH : ${lib.makeBinPath [
|
||||
btrfs-progs # btrfs
|
||||
coreutils # cut, date, head, ls, mkdir, readlink, stat, tail, touch, test, [
|
||||
gnugrep # grep
|
||||
util-linuxMinimal # logger, mount
|
||||
]}
|
||||
'';
|
||||
meta = with lib; {
|
||||
description = "btrfs-snap creates and maintains the history of snapshots of btrfs filesystems.";
|
||||
homepage = "https://github.com/jf647/btrfs-snap";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ lionello ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
30
pkgs/tools/filesystems/catcli/default.nix
Normal file
30
pkgs/tools/filesystems/catcli/default.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ lib
|
||||
, fetchFromGitHub
|
||||
, buildPythonApplication
|
||||
, docopt, anytree
|
||||
}:
|
||||
|
||||
buildPythonApplication rec {
|
||||
|
||||
pname = "catcli";
|
||||
version = "0.8.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "deadc0de6";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "1hkgf692h3akdxiwhzm3vqibh1ps661qllilf55nyk109cx79gna";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ docopt anytree ];
|
||||
|
||||
postPatch = "patchShebangs . ";
|
||||
|
||||
meta = with lib; {
|
||||
description = "The command line catalog tool for your offline data";
|
||||
homepage = "https://github.com/deadc0de6/catcli";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ petersjt014 ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
33
pkgs/tools/filesystems/ceph-csi/default.nix
Normal file
33
pkgs/tools/filesystems/ceph-csi/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ stdenv, lib, go, ceph, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ceph-csi";
|
||||
version = "3.5.1";
|
||||
|
||||
nativeBuildInputs = [ go ];
|
||||
buildInputs = [ ceph ];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ceph";
|
||||
repo = "ceph-csi";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-TKNpMRZALMBgK9kN6aVokC+JpRo18AOJIXKNb1ZGgkQ=";
|
||||
};
|
||||
|
||||
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" ];
|
||||
};
|
||||
}
|
||||
11
pkgs/tools/filesystems/ceph/0000-fix-SPDK-build-env.patch
Normal file
11
pkgs/tools/filesystems/ceph/0000-fix-SPDK-build-env.patch
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
--- a/cmake/modules/BuildSPDK.cmake
|
||||
+++ b/cmake/modules/BuildSPDK.cmake
|
||||
@@ -35,7 +35,7 @@ macro(build_spdk)
|
||||
# unset $CFLAGS, otherwise it will interfere with how SPDK sets
|
||||
# its include directory.
|
||||
# unset $LDFLAGS, otherwise SPDK will fail to mock some functions.
|
||||
- BUILD_COMMAND env -i PATH=$ENV{PATH} CC=${CMAKE_C_COMPILER} ${make_cmd} EXTRA_CFLAGS="${spdk_CFLAGS}"
|
||||
+ BUILD_COMMAND env -i PATH=$ENV{PATH} CC=${CMAKE_C_COMPILER} ${make_cmd} EXTRA_CFLAGS="${spdk_CFLAGS}" C_OPT="-mssse3"
|
||||
BUILD_IN_SOURCE 1
|
||||
INSTALL_COMMAND "true")
|
||||
unset(make_cmd)
|
||||
243
pkgs/tools/filesystems/ceph/default.nix
Normal file
243
pkgs/tools/filesystems/ceph/default.nix
Normal file
|
|
@ -0,0 +1,243 @@
|
|||
{ lib, stdenv, runCommand, fetchurl
|
||||
, ensureNewerSourcesHook
|
||||
, cmake, pkg-config
|
||||
, which, git
|
||||
, boost
|
||||
, libxml2, zlib, lz4
|
||||
, openldap, lttng-ust
|
||||
, babeltrace, gperf
|
||||
, gtest
|
||||
, cunit, snappy
|
||||
, makeWrapper
|
||||
, leveldb, oath-toolkit
|
||||
, libnl, libcap_ng
|
||||
, rdkafka
|
||||
, nixosTests
|
||||
, cryptsetup
|
||||
, sqlite
|
||||
, lua
|
||||
, icu
|
||||
, bzip2
|
||||
, doxygen
|
||||
, graphviz
|
||||
, fmt
|
||||
, python3
|
||||
|
||||
# Optional Dependencies
|
||||
, yasm ? null, fcgi ? null, expat ? null
|
||||
, curl ? null, fuse ? null
|
||||
, libedit ? null, libatomic_ops ? null
|
||||
, libs3 ? null
|
||||
|
||||
# Mallocs
|
||||
, jemalloc ? null, gperftools ? null
|
||||
|
||||
# Crypto Dependencies
|
||||
, cryptopp ? null
|
||||
, nss ? null, nspr ? null
|
||||
|
||||
# Linux Only Dependencies
|
||||
, linuxHeaders, util-linux, libuuid, udev, keyutils, rdma-core, rabbitmq-c
|
||||
, libaio ? null, libxfs ? null, zfs ? null, liburing ? null
|
||||
, ...
|
||||
}:
|
||||
|
||||
# We must have one crypto library
|
||||
assert cryptopp != null || (nss != null && nspr != null);
|
||||
|
||||
let
|
||||
shouldUsePkg = pkg: if pkg != null && pkg.meta.available then pkg else null;
|
||||
|
||||
optYasm = shouldUsePkg yasm;
|
||||
optFcgi = shouldUsePkg fcgi;
|
||||
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;
|
||||
|
||||
hasRadosgw = optFcgi != null && 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 = python.pkgs.buildPythonPackage rec{
|
||||
pname = "ceph-common";
|
||||
inherit src version;
|
||||
|
||||
sourceRoot = "ceph-${version}/src/python-common";
|
||||
|
||||
checkInputs = [ python.pkgs.pytest ];
|
||||
propagatedBuildInputs = with python.pkgs; [ pyyaml six ];
|
||||
|
||||
meta = getMeta "Ceph common module for code shared by manager modules";
|
||||
};
|
||||
|
||||
python = python3;
|
||||
|
||||
ceph-python-env = python.withPackages (ps: [
|
||||
ps.sphinx
|
||||
ps.flask
|
||||
ps.cython
|
||||
ps.setuptools
|
||||
ps.virtualenv
|
||||
# Libraries needed by the python tools
|
||||
ps.Mako
|
||||
ceph-common
|
||||
ps.cherrypy
|
||||
ps.cmd2
|
||||
ps.colorama
|
||||
ps.python-dateutil
|
||||
ps.jsonpatch
|
||||
ps.pecan
|
||||
ps.prettytable
|
||||
ps.pyopenssl
|
||||
ps.pyjwt
|
||||
ps.webob
|
||||
ps.bcrypt
|
||||
ps.scipy
|
||||
ps.six
|
||||
ps.pyyaml
|
||||
]);
|
||||
sitePackages = ceph-python-env.python.sitePackages;
|
||||
|
||||
version = "16.2.7";
|
||||
src = fetchurl {
|
||||
url = "http://download.ceph.com/tarballs/ceph-${version}.tar.gz";
|
||||
sha256 = "0n7vpdcxji49bqaa5b7zxif1r80rrkbh0dfacbibvf20kzzbn2fz";
|
||||
};
|
||||
in rec {
|
||||
ceph = stdenv.mkDerivation {
|
||||
pname = "ceph";
|
||||
inherit src version;
|
||||
|
||||
patches = [
|
||||
./0000-fix-SPDK-build-env.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config which git python.pkgs.wrapPython makeWrapper
|
||||
python.pkgs.python # for the toPythonPath function
|
||||
(ensureNewerSourcesHook { year = "1980"; })
|
||||
python
|
||||
fmt
|
||||
# for building docs/man-pages presumably
|
||||
doxygen
|
||||
graphviz
|
||||
];
|
||||
|
||||
buildInputs = cryptoLibsMap.${cryptoStr} ++ [
|
||||
boost ceph-python-env libxml2 optYasm optLibatomic_ops optLibs3
|
||||
malloc zlib openldap lttng-ust babeltrace gperf gtest cunit
|
||||
snappy lz4 oath-toolkit leveldb libnl libcap_ng rdkafka
|
||||
cryptsetup sqlite lua icu bzip2
|
||||
] ++ lib.optionals stdenv.isLinux [
|
||||
linuxHeaders util-linux libuuid udev keyutils liburing optLibaio optLibxfs optZfs
|
||||
# ceph 14
|
||||
rdma-core rabbitmq-c
|
||||
] ++ lib.optionals hasRadosgw [
|
||||
optFcgi optExpat optCurl optFuse optLibedit
|
||||
];
|
||||
|
||||
pythonPath = [ ceph-python-env "${placeholder "out"}/${ceph-python-env.sitePackages}" ];
|
||||
|
||||
preConfigure =''
|
||||
substituteInPlace src/common/module.c --replace "/sbin/modinfo" "modinfo"
|
||||
substituteInPlace src/common/module.c --replace "/sbin/modprobe" "modprobe"
|
||||
substituteInPlace src/common/module.c --replace "/bin/grep" "grep"
|
||||
|
||||
# for pybind/rgw to find internal dep
|
||||
export LD_LIBRARY_PATH="$PWD/build/lib''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
|
||||
# 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/script src/spdk src/test src/tools
|
||||
'';
|
||||
|
||||
cmakeFlags = [
|
||||
"-DWITH_SYSTEM_ROCKSDB=OFF" # breaks Bluestore
|
||||
"-DCMAKE_INSTALL_DATADIR=${placeholder "lib"}/lib"
|
||||
|
||||
"-DWITH_SYSTEM_BOOST=ON"
|
||||
"-DWITH_SYSTEM_GTEST=ON"
|
||||
"-DMGR_PYTHON_VERSION=${ceph-python-env.python.pythonVersion}"
|
||||
"-DWITH_SYSTEMD=OFF"
|
||||
"-DWITH_TESTS=OFF"
|
||||
"-DWITH_CEPHFS_SHELL=ON"
|
||||
# TODO breaks with sandbox, tries to download stuff with npm
|
||||
"-DWITH_MGR_DASHBOARD_FRONTEND=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.version = version;
|
||||
passthru.tests = { inherit (nixosTests) ceph-single-node ceph-multi-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
|
||||
'';
|
||||
}
|
||||
30
pkgs/tools/filesystems/chunkfs/default.nix
Normal file
30
pkgs/tools/filesystems/chunkfs/default.nix
Normal file
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
23
pkgs/tools/filesystems/ciopfs/default.nix
Normal file
23
pkgs/tools/filesystems/ciopfs/default.nix
Normal file
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
26
pkgs/tools/filesystems/convoy/default.nix
Normal file
26
pkgs/tools/filesystems/convoy/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# This file was generated by go2nix.
|
||||
{ lib, buildGoPackage, fetchFromGitHub, lvm2 }:
|
||||
|
||||
buildGoPackage rec {
|
||||
pname = "convoy";
|
||||
version = "0.5.2";
|
||||
|
||||
goPackagePath = "github.com/rancher/convoy";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
rev = "v${version}";
|
||||
owner = "rancher";
|
||||
repo = "convoy";
|
||||
sha256 = "09nygrxd5hril4xcfsvgjg74xxhhimznqq4sdk0f360c5ra0dbhj";
|
||||
};
|
||||
|
||||
buildInputs = [lvm2];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/rancher/convoy";
|
||||
description = "A Docker volume plugin, managing persistent container volumes";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ offline ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
41
pkgs/tools/filesystems/cpcfs/default.nix
Normal file
41
pkgs/tools/filesystems/cpcfs/default.nix
Normal file
|
|
@ -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 = "source/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;
|
||||
};
|
||||
}
|
||||
81
pkgs/tools/filesystems/cryfs/default.nix
Normal file
81
pkgs/tools/filesystems/cryfs/default.nix
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
{ lib, stdenv, fetchFromGitHub
|
||||
, cmake, pkg-config, python3
|
||||
, boost175, 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.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = version;
|
||||
hash = "sha256-NV2xCC8TaJaWDZSghO8EFuygL8hJLOdx67BWaJ2NKRw=";
|
||||
};
|
||||
|
||||
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 = [ boost175 curl fuse openssl range-v3 spdlog ]
|
||||
++ lib.optional stdenv.cc.isClang llvmPackages.openmp;
|
||||
|
||||
#checkInputs = [ 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;
|
||||
};
|
||||
}
|
||||
40
pkgs/tools/filesystems/curlftpfs/default.nix
Normal file
40
pkgs/tools/filesystems/curlftpfs/default.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{ 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
|
||||
];
|
||||
|
||||
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 = "http://curlftpfs.sourceforge.net";
|
||||
license = licenses.gpl2Only;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
13
pkgs/tools/filesystems/curlftpfs/fix-rpl_malloc.patch
Normal file
13
pkgs/tools/filesystems/curlftpfs/fix-rpl_malloc.patch
Normal file
|
|
@ -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
|
||||
30
pkgs/tools/filesystems/darling-dmg/default.nix
Normal file
30
pkgs/tools/filesystems/darling-dmg/default.nix
Normal file
|
|
@ -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 ];
|
||||
};
|
||||
}
|
||||
|
|
@ -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
|
||||
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
From 56873cf29974ff0dfc1ba1afb7022ce49e300835 Mon Sep 17 00:00:00 2001
|
||||
From: Maximilian Bosch <maximilian@mbosch.me>
|
||||
Date: Wed, 11 Nov 2020 11:58:25 +0100
|
||||
Subject: [PATCH 2/2] Make sure that the setuid-wrapped `umount` is invoked
|
||||
|
||||
---
|
||||
src/dav_fuse.c | 2 +-
|
||||
src/umount_davfs.c | 4 ++--
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/dav_fuse.c b/src/dav_fuse.c
|
||||
index 734bc1f..4501433 100644
|
||||
--- a/src/dav_fuse.c
|
||||
+++ b/src/dav_fuse.c
|
||||
@@ -187,7 +187,7 @@ dav_fuse_loop(int device, char *mpoint, size_t bufsize, time_t idle_time,
|
||||
unmounting = 1;
|
||||
pid_t pid = fork();
|
||||
if (pid == 0) {
|
||||
- execl("/bin/umount", "umount", "-il", mountpoint, NULL);
|
||||
+ execl("@wrapperDir@/umount", "umount", "-il", mountpoint, NULL);
|
||||
_exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
diff --git a/src/umount_davfs.c b/src/umount_davfs.c
|
||||
index b7019c3..75e3b4b 100644
|
||||
--- a/src/umount_davfs.c
|
||||
+++ b/src/umount_davfs.c
|
||||
@@ -122,9 +122,9 @@ main(int argc, char *argv[])
|
||||
|
||||
char *umount_command = NULL;
|
||||
if (mpoint) {
|
||||
- umount_command = ne_concat("umount -i '", mpoint, "'", NULL);
|
||||
+ umount_command = ne_concat("@wrapperDir@/umount -i '", mpoint, "'", NULL);
|
||||
} else {
|
||||
- umount_command = ne_concat("umount -i '", argv[optind], "'", NULL);
|
||||
+ umount_command = ne_concat("@wrapperDir@/umount -i '", argv[optind], "'", NULL);
|
||||
error(0, 0,
|
||||
_("\n"
|
||||
" can't evaluate PID file name;\n"
|
||||
--
|
||||
2.28.0
|
||||
|
||||
56
pkgs/tools/filesystems/davfs2/default.nix
Normal file
56
pkgs/tools/filesystems/davfs2/default.nix
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
{ lib, stdenv
|
||||
, fetchurl
|
||||
, fetchpatch
|
||||
, neon
|
||||
, procps
|
||||
, substituteAll
|
||||
, zlib
|
||||
, wrapperDir ? "/run/wrappers/bin"
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "davfs2";
|
||||
version = "1.6.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://savannah/davfs2/davfs2-${version}.tar.gz";
|
||||
sha256 = "sha256-zj65SOzlgqUck0zLDMcOZZg5FycXyv8XP2ml4q+QxcA=";
|
||||
};
|
||||
|
||||
buildInputs = [ neon zlib ];
|
||||
|
||||
patches = [
|
||||
./fix-sysconfdir.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" ];
|
||||
|
||||
makeFlags = [
|
||||
"sbindir=$(out)/sbin"
|
||||
"ssbindir=$(out)/sbin"
|
||||
];
|
||||
|
||||
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;
|
||||
};
|
||||
}
|
||||
60
pkgs/tools/filesystems/davfs2/fix-sysconfdir.patch
Normal file
60
pkgs/tools/filesystems/davfs2/fix-sysconfdir.patch
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
diff -ubr davfs2-1.4.7-orig/etc/Makefile.am davfs2-1.4.7/etc/Makefile.am
|
||||
--- davfs2-1.4.7-orig/etc/Makefile.am 2013-02-21 11:45:00.185763558 +0100
|
||||
+++ davfs2-1.4.7/etc/Makefile.am 2013-02-21 11:53:05.423197775 +0100
|
||||
@@ -24,17 +24,17 @@
|
||||
|
||||
install-data-local: $(dist_pkgdata_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
- $(mkinstalldirs) $(DESTDIR)$(pkgsysconfdir)
|
||||
- $(INSTALL_DATA) -b davfs2.conf $(DESTDIR)$(pkgsysconfdir)/davfs2.conf
|
||||
- $(INSTALL_DATA) -b -m 600 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 davfs2.conf $(out)$(pkgsysconfdir)/davfs2.conf
|
||||
+ $(INSTALL_DATA) -b -m 600 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 -ubr davfs2-1.4.7-orig/etc/Makefile.in davfs2-1.4.7/etc/Makefile.in
|
||||
--- davfs2-1.4.7-orig/etc/Makefile.in 2013-02-21 11:45:00.185763558 +0100
|
||||
+++ davfs2-1.4.7/etc/Makefile.in 2013-02-21 11:53:27.241207128 +0100
|
||||
@@ -408,19 +408,19 @@
|
||||
|
||||
install-data-local: $(dist_pkgdata_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
- $(mkinstalldirs) $(DESTDIR)$(pkgsysconfdir)
|
||||
- $(INSTALL_DATA) -b davfs2.conf $(DESTDIR)$(pkgsysconfdir)/davfs2.conf
|
||||
- $(INSTALL_DATA) -b -m 600 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 davfs2.conf $(out)$(pkgsysconfdir)/davfs2.conf
|
||||
+ $(INSTALL_DATA) -b -m 600 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
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
30
pkgs/tools/filesystems/davfs2/isdir.patch
Normal file
30
pkgs/tools/filesystems/davfs2/isdir.patch
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
diff -ur davfs2-1.4.5-old/src/dav_coda.c davfs2-1.4.5-new/src/dav_coda.c
|
||||
--- davfs2-1.4.5-old/src/dav_coda.c 2009-06-04 20:30:32.000000000 +0200
|
||||
+++ davfs2-1.4.5-new/src/dav_coda.c 2011-02-09 19:51:22.260530572 +0100
|
||||
@@ -52,6 +52,10 @@
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
+#ifdef HAVE_SYS_STAT_H
|
||||
+#include <sys/stat.h>
|
||||
+#endif
|
||||
+
|
||||
|
||||
#include "defaults.h"
|
||||
#include "mount_davfs.h"
|
||||
diff -ur davfs2-1.4.5-old/src/dav_fuse.c davfs2-1.4.5-new/src/dav_fuse.c
|
||||
--- davfs2-1.4.5-old/src/dav_fuse.c 2009-06-30 20:06:44.000000000 +0200
|
||||
+++ davfs2-1.4.5-new/src/dav_fuse.c 2011-02-09 19:52:23.938220524 +0100
|
||||
@@ -41,6 +41,12 @@
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
+#ifdef HAVE_SYS_TYPES_H
|
||||
+#include <sys/types.h>
|
||||
+#endif
|
||||
+#ifdef HAVE_SYS_STAT_H
|
||||
+#include <sys/stat.h>
|
||||
+#endif
|
||||
|
||||
#include "defaults.h"
|
||||
#include "mount_davfs.h"
|
||||
50
pkgs/tools/filesystems/dduper/default.nix
Normal file
50
pkgs/tools/filesystems/dduper/default.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
{ lib, stdenv, fetchpatch, fetchFromGitHub, btrfs-progs, python3 }:
|
||||
|
||||
let
|
||||
btrfsProgsPatched = btrfs-progs.overrideAttrs (oldAttrs: {
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "0001-Print-csum-for-a-given-file-on-stdout.patch";
|
||||
url = "https://raw.githubusercontent.com/Lakshmipathi/dduper/f45d04854a40cb52ae0e6736916d5955cb68b8ee/patch/btrfs-progs-v5.12.1/0001-Print-csum-for-a-given-file-on-stdout.patch";
|
||||
sha256 = "0c7dd44q2ww6k9nk5dh6m0f0wbd8x84vb2m61fk6a44nsv2fwz1x";
|
||||
})
|
||||
];
|
||||
});
|
||||
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;
|
||||
};
|
||||
}
|
||||
45
pkgs/tools/filesystems/dislocker/default.nix
Normal file
45
pkgs/tools/filesystems/dislocker/default.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{ lib, stdenv
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, cmake
|
||||
, pkg-config
|
||||
, mbedtls
|
||||
, 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 ];
|
||||
|
||||
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;
|
||||
};
|
||||
}
|
||||
24
pkgs/tools/filesystems/disorderfs/default.nix
Normal file
24
pkgs/tools/filesystems/disorderfs/default.nix
Normal file
|
|
@ -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 ];
|
||||
};
|
||||
}
|
||||
35
pkgs/tools/filesystems/djmount/default.nix
Normal file
35
pkgs/tools/filesystems/djmount/default.nix
Normal file
|
|
@ -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
|
||||
NIX_CFLAGS_COMPILE = "-fcommon";
|
||||
|
||||
meta = {
|
||||
homepage = "http://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;
|
||||
};
|
||||
}
|
||||
43
pkgs/tools/filesystems/dosfstools/default.nix
Normal file
43
pkgs/tools/filesystems/dosfstools/default.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{ 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 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=";
|
||||
})
|
||||
];
|
||||
|
||||
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" ];
|
||||
|
||||
checkInputs = [ xxd ];
|
||||
doCheck = true;
|
||||
|
||||
meta = {
|
||||
description = "Utilities for creating and checking FAT and VFAT file systems";
|
||||
homepage = "https://github.com/dosfstools/dosfstools";
|
||||
platforms = lib.platforms.linux ++ lib.platforms.darwin;
|
||||
license = lib.licenses.gpl3;
|
||||
};
|
||||
}
|
||||
40
pkgs/tools/filesystems/duff/default.nix
Normal file
40
pkgs/tools/filesystems/duff/default.nix
Normal file
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
27
pkgs/tools/filesystems/duperemove/default.nix
Normal file
27
pkgs/tools/filesystems/duperemove/default.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ lib, stdenv, fetchFromGitHub, libgcrypt
|
||||
, pkg-config, glib, linuxHeaders ? stdenv.cc.libc.linuxHeaders, sqlite }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "duperemove";
|
||||
version = "0.11.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "markfasheh";
|
||||
repo = "duperemove";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-WjUM52IqMDvBzeGHo7p4JcvMO5iPWPVOr8GJ3RSsnUs=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ libgcrypt glib linuxHeaders sqlite ];
|
||||
|
||||
makeFlags = [ "PREFIX=${placeholder "out"}" ];
|
||||
|
||||
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;
|
||||
};
|
||||
}
|
||||
101
pkgs/tools/filesystems/e2fsprogs/default.nix
Normal file
101
pkgs/tools/filesystems/e2fsprogs/default.nix
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
{ lib, stdenv, buildPackages, fetchurl, fetchpatch, pkg-config, libuuid, gettext, texinfo
|
||||
, fuse
|
||||
, shared ? !stdenv.hostPlatform.isStatic
|
||||
, e2fsprogs, runCommand
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "e2fsprogs";
|
||||
version = "1.46.5";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz";
|
||||
sha256 = "1fgvwbj9ihz5svzrd2l0s18k16r4qg3wimrniv71fn3vdcg0shxp";
|
||||
};
|
||||
|
||||
# fuse2fs adds 14mb of dependencies
|
||||
outputs = [ "bin" "dev" "out" "man" "info" ]
|
||||
++ lib.optionals stdenv.isLinux [ "fuse2fs" ];
|
||||
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||
nativeBuildInputs = [ pkg-config texinfo ];
|
||||
buildInputs = [ libuuid gettext ]
|
||||
++ lib.optionals stdenv.isLinux [ fuse ];
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "CVE-2022-1304.patch";
|
||||
url = "https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git/patch/?id=ab51d587bb9b229b1fade1afd02e1574c1ba5c76";
|
||||
sha256 = "sha256-YEEow34/81NBOc6F6FS6i505FCQ7GHeIz0a0qWNs7Fg=";
|
||||
})
|
||||
(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 = "";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# Remove six failing tests
|
||||
# https://github.com/NixOS/nixpkgs/issues/65471
|
||||
for test in m_image_mmp m_mmp m_mmp_bad_csum m_mmp_bad_magic t_mmp_1on t_mmp_2off; do
|
||||
rm -r "tests/$test"
|
||||
done
|
||||
'';
|
||||
|
||||
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"
|
||||
];
|
||||
|
||||
checkInputs = [ buildPackages.perl ];
|
||||
doCheck = true;
|
||||
|
||||
postInstall = ''
|
||||
# avoid cycle between outputs
|
||||
if [ -f $out/lib/${pname}/e2scrub_all_cron ]; then
|
||||
mv $out/lib/${pname}/e2scrub_all_cron $bin/bin/
|
||||
fi
|
||||
'' + lib.optionalString stdenv.isLinux ''
|
||||
mkdir -p $fuse2fs/bin
|
||||
mv $bin/bin/fuse2fs $fuse2fs/bin/fuse2fs
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
passthru.tests = {
|
||||
simple-filesystem = runCommand "e2fsprogs-create-fs" {} ''
|
||||
mkdir -p $out
|
||||
truncate -s10M $out/disc
|
||||
${e2fsprogs}/bin/mkfs.ext4 $out/disc | tee $out/success
|
||||
${e2fsprogs}/bin/e2fsck -n $out/disc | tee $out/success
|
||||
[ -e $out/success ]
|
||||
'';
|
||||
};
|
||||
meta = with lib; {
|
||||
homepage = "http://e2fsprogs.sourceforge.net/";
|
||||
changelog = "http://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 ];
|
||||
};
|
||||
}
|
||||
26
pkgs/tools/filesystems/e2tools/default.nix
Normal file
26
pkgs/tools/filesystems/e2tools/default.nix
Normal file
|
|
@ -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 ];
|
||||
};
|
||||
}
|
||||
56
pkgs/tools/filesystems/eiciel/default.nix
Normal file
56
pkgs/tools/filesystems/eiciel/default.nix
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
{ lib
|
||||
, fetchFromGitHub
|
||||
, stdenv
|
||||
, acl
|
||||
, gnome
|
||||
, gtkmm3
|
||||
, meson
|
||||
, ninja
|
||||
, pkg-config
|
||||
, wrapGAppsHook
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "eiciel";
|
||||
version = "0.9.13.1";
|
||||
|
||||
outputs = [ "out" "nautilusExtension" ];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rofirrim";
|
||||
repo = "eiciel";
|
||||
rev = version;
|
||||
sha256 = "0rhhw0h1hyg5kvxhjxkdz03vylgax6912mg8j4lvcz6wlsa4wkvj";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
acl
|
||||
gtkmm3
|
||||
gnome.nautilus
|
||||
];
|
||||
|
||||
mesonFlags = [
|
||||
"-Dnautilus-extension-dir=${placeholder "nautilusExtension"}/lib/nautilus/extensions-3.0"
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace meson.build --replace "compiler.find_library('libacl')" "compiler.find_library('acl')"
|
||||
chmod +x img/install_icons.sh
|
||||
patchShebangs img/install_icons.sh
|
||||
'';
|
||||
|
||||
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;
|
||||
};
|
||||
}
|
||||
32
pkgs/tools/filesystems/encfs/default.nix
Normal file
32
pkgs/tools/filesystems/encfs/default.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ lib, stdenv, fetchFromGitHub
|
||||
, cmake, pkg-config, perl
|
||||
, gettext, fuse, openssl, tinyxml2
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "encfs";
|
||||
version = "1.9.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
sha256 = "099rjb02knr6yz7przlnyj62ic0ag5ncs7vvcc36ikyqrmpqsdch";
|
||||
rev = "v${version}";
|
||||
repo = "encfs";
|
||||
owner = "vgough";
|
||||
};
|
||||
|
||||
buildInputs = [ gettext fuse openssl tinyxml2 ];
|
||||
nativeBuildInputs = [ cmake pkg-config perl ];
|
||||
|
||||
cmakeFlags =
|
||||
[ "-DUSE_INTERNAL_TINYXML=OFF"
|
||||
"-DBUILD_SHARED_LIBS=ON"
|
||||
"-DINSTALL_LIBENCFS=ON"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "An encrypted filesystem in user-space via FUSE";
|
||||
homepage = "https://vgough.github.io/encfs";
|
||||
license = with licenses; [ gpl3Plus lgpl3Plus ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
24
pkgs/tools/filesystems/exfat/default.nix
Normal file
24
pkgs/tools/filesystems/exfat/default.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, fuse }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "exfat";
|
||||
version = "1.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "relan";
|
||||
repo = "exfat";
|
||||
rev = "v${version}";
|
||||
sha256 = "1q29pcysv747y6dis07953dkax8k9x50b5gg99gpz6rr46xwgkgb";
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
}
|
||||
23
pkgs/tools/filesystems/exfatprogs/default.nix
Normal file
23
pkgs/tools/filesystems/exfatprogs/default.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ lib, stdenv, fetchFromGitHub, pkg-config, autoreconfHook, file }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "exfatprogs";
|
||||
version = "1.1.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-idP3wEGGJcSH4DDFLj1XPRKcLkFEsvtv0ytK89bmj5I=";
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
}
|
||||
40
pkgs/tools/filesystems/ext4magic/default.nix
Normal file
40
pkgs/tools/filesystems/ext4magic/default.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{ lib, stdenv, fetchurl, fetchpatch, file, libuuid, e2fsprogs, zlib, bzip2 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.3.2";
|
||||
pname = "ext4magic";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/ext4magic/${pname}-${version}.tar.gz";
|
||||
sha256 = "8d9c6a594f212aecf4eb5410d277caeaea3adc03d35378257dfd017ef20ea115";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://sourceforge.net/p/ext4magic/tickets/10/attachment/ext4magic-0.3.2-i_dir_acl.patch";
|
||||
sha256 = "1accydd8kigid68yir2fbihm3r3x8ws3iyznp25snkx41w6y6x8c";
|
||||
})
|
||||
./glibc-fix.patch
|
||||
];
|
||||
|
||||
buildInputs = [ file libuuid e2fsprogs zlib bzip2 ];
|
||||
installFlags = [ "PREFIX=$(out)" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Recover / undelete files from ext3 or ext4 partitions";
|
||||
longDescription = ''
|
||||
ext4magic can recover/undelete files from ext3 or ext4 partitions
|
||||
by retrieving file-information from the filesystem journal.
|
||||
|
||||
If the information in the journal are sufficient, ext4magic can
|
||||
recover the most file types, with original filename, owner and group,
|
||||
file mode bits and also the old atime/mtime stamps.
|
||||
|
||||
It's much more effective and works much better than extundelete.
|
||||
'';
|
||||
homepage = "http://ext4magic.sourceforge.net/ext4magic_en.html";
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.rkoe ];
|
||||
};
|
||||
}
|
||||
12
pkgs/tools/filesystems/ext4magic/glibc-fix.patch
Normal file
12
pkgs/tools/filesystems/ext4magic/glibc-fix.patch
Normal file
|
|
@ -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
|
||||
29
pkgs/tools/filesystems/extundelete/default.nix
Normal file
29
pkgs/tools/filesystems/extundelete/default.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ lib, stdenv, fetchurl, e2fsprogs }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
version = "0.2.4";
|
||||
pname = "extundelete";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/extundelete/extundelete-0.2.4.tar.bz2";
|
||||
sha256 = "1x0r7ylxlp9lbj3d7sqf6j2a222dwy2nfpff05jd6mkh4ihxvyd1";
|
||||
};
|
||||
|
||||
buildInputs = [ e2fsprogs ];
|
||||
|
||||
# inode field i_dir_acl was repurposed as i_size_high in e2fsprogs 1.44,
|
||||
# breaking the build
|
||||
patchPhase = ''
|
||||
substituteInPlace src/insertionops.cc \
|
||||
--replace "Directory ACL:" "High 32 bits of size:" \
|
||||
--replace "inode.i_dir_acl" "inode.i_size_high"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Utility that can recover deleted files from an ext3 or ext4 partition";
|
||||
homepage = "http://extundelete.sourceforge.net/";
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.domenkozar ];
|
||||
};
|
||||
}
|
||||
25
pkgs/tools/filesystems/f2fs-tools/default.nix
Normal file
25
pkgs/tools/filesystems/f2fs-tools/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ lib, stdenv, fetchgit, autoreconfHook, libselinux, libuuid, pkg-config }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "f2fs-tools";
|
||||
version = "1.14.0";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git";
|
||||
rev = "refs/tags/v${version}";
|
||||
sha256 = "06ss05n87i1c3149qb3n7j1qp2scv3g2adx0v6ljkl59ab9b5saj";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
||||
buildInputs = [ libselinux libuuid ];
|
||||
|
||||
patches = [ ./f2fs-tools-cross-fix.patch ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://git.kernel.org/cgit/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 ];
|
||||
};
|
||||
}
|
||||
29
pkgs/tools/filesystems/f2fs-tools/f2fs-tools-cross-fix.patch
Normal file
29
pkgs/tools/filesystems/f2fs-tools/f2fs-tools-cross-fix.patch
Normal file
|
|
@ -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])
|
||||
57
pkgs/tools/filesystems/f3/default.nix
Normal file
57
pkgs/tools/filesystems/f3/default.nix
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
{ stdenv, lib, fetchFromGitHub
|
||||
, parted, systemd ? null
|
||||
}:
|
||||
|
||||
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 = [
|
||||
parted
|
||||
]
|
||||
++ lib.optional stdenv.isLinux systemd;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
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 = "http://oss.digirati.com.br/f3/";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ makefu ];
|
||||
};
|
||||
}
|
||||
26
pkgs/tools/filesystems/fatresize/default.nix
Normal file
26
pkgs/tools/filesystems/fatresize/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ lib, stdenv, fetchFromGitHub, parted, util-linux, pkg-config }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
|
||||
version = "1.1.0";
|
||||
pname = "fatresize";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ya-mouse";
|
||||
repo = "fatresize";
|
||||
rev = "v${version}";
|
||||
sha256 = "1vhz84kxfyl0q7mkqn68nvzzly0a4xgzv76m6db0bk7xyczv1qr2";
|
||||
};
|
||||
|
||||
buildInputs = [ parted util-linux ];
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
propagatedBuildInputs = [ parted util-linux ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "The FAT16/FAT32 non-destructive resizer";
|
||||
homepage = "https://github.com/ya-mouse/fatresize";
|
||||
platforms = platforms.linux;
|
||||
license = licenses.gpl3;
|
||||
};
|
||||
}
|
||||
25
pkgs/tools/filesystems/fatsort/default.nix
Normal file
25
pkgs/tools/filesystems/fatsort/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{lib, stdenv, fetchurl, help2man}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "1.6.4.625";
|
||||
pname = "fatsort";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/fatsort/${pname}-${version}.tar.xz";
|
||||
sha256 = "sha256-mm+JoGQLt4LYL/I6eAyfCuw9++RoLAqO2hV+CBBkLq0=";
|
||||
};
|
||||
|
||||
patches = [ ./fatsort-Makefiles.patch ];
|
||||
|
||||
buildInputs = [ help2man ];
|
||||
|
||||
makeFlags = [ "PREFIX=${placeholder "out"}" ];
|
||||
|
||||
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.gpl2;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
34
pkgs/tools/filesystems/fatsort/fatsort-Makefiles.patch
Normal file
34
pkgs/tools/filesystems/fatsort/fatsort-Makefiles.patch
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
diff -uNr fatsort-1.6.2.605.orig/Makefile fatsort-1.6.2.605.new/Makefile
|
||||
--- fatsort-1.6.2.605.orig/Makefile 2019-11-16 16:40:27.000000000 +0100
|
||||
+++ fatsort-1.6.2.605.new/Makefile 2020-05-10 21:34:34.820874026 +0200
|
||||
@@ -1,4 +1,5 @@
|
||||
-MANDIR=/usr/local/share/man/man1
|
||||
+PREFIX?=/usr/local
|
||||
+MANDIR=$(PREFIX)/share/man/man1
|
||||
|
||||
INSTALL_FLAGS=-m 0755 -p -D
|
||||
|
||||
diff -uNr fatsort-1.6.2.605.orig/src/Makefile fatsort-1.6.2.605.new/src/Makefile
|
||||
--- fatsort-1.6.2.605.orig/src/Makefile 2018-11-17 00:40:59.000000000 +0100
|
||||
+++ fatsort-1.6.2.605.new/src/Makefile 2020-05-10 21:33:52.053391027 +0200
|
||||
@@ -30,7 +30,7 @@
|
||||
override CFLAGS += -D __CYGWIN__
|
||||
override CFLAGS += -D __LINUX__
|
||||
override LDFLAGS += -liconv
|
||||
- SBINDIR=/usr/local/sbin
|
||||
+ SBINDIR=$(PREFIX)/sbin
|
||||
endif
|
||||
else
|
||||
ifdef MINGW
|
||||
@@ -60,9 +60,9 @@
|
||||
# OS X's install does not support the '-D' flag.
|
||||
INSTALL_FLAGS=-m 0755 -p
|
||||
# Mac OS X does not have a "/usr/local/sbin"
|
||||
- SBINDIR=/usr/local/bin
|
||||
+ SBINDIR=$(PREFIX)/bin
|
||||
else
|
||||
- SBINDIR=/usr/local/sbin
|
||||
+ SBINDIR=$(PREFIX)/sbin
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
30
pkgs/tools/filesystems/file-rename/default.nix
Normal file
30
pkgs/tools/filesystems/file-rename/default.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ lib, stdenv, fetchurl, perl, perlPackages }:
|
||||
|
||||
perlPackages.buildPerlPackage {
|
||||
pname = "File-Rename";
|
||||
version = "0.20";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://cpan/authors/id/R/RM/RMBARKER/File-Rename-0.20.tar.gz";
|
||||
sha256 = "1cf6xx2hiy1xalp35fh8g73j67r0w0g66jpcbc6971x9jbm7bvjy";
|
||||
};
|
||||
|
||||
# Fix an incorrect platform test that misidentifies Darwin as Windows
|
||||
postPatch = ''
|
||||
substituteInPlace Makefile.PL \
|
||||
--replace '/win/i' '/MSWin32/'
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
substituteInPlace $out/bin/rename \
|
||||
--replace "#!${perl}/bin/perl" "#!${perl}/bin/perl -I $out/${perl.libPrefix}"
|
||||
'';
|
||||
|
||||
doCheck = !stdenv.isDarwin;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Perl extension for renaming multiple files";
|
||||
license = licenses.artistic1;
|
||||
maintainers = with maintainers; [ peterhoeg ];
|
||||
};
|
||||
}
|
||||
32
pkgs/tools/filesystems/fsfs/default.nix
Normal file
32
pkgs/tools/filesystems/fsfs/default.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{lib, stdenv, fetchurl, openssl, fuse}:
|
||||
|
||||
throw "It still does not build"
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fsfs";
|
||||
version = "0.1.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/fsfs/fsfs-${version}.tar.gz";
|
||||
sha256 = "05wka9aq182li2r7gxcd8bb3rhpns7ads0k59v7w1jza60l57c74";
|
||||
};
|
||||
|
||||
buildInputs = [ fuse openssl ];
|
||||
|
||||
patchPhase = ''
|
||||
sed -i -e 's,CONFDIR=\(.*\),CONFDIR='$out/etc, \
|
||||
-e 's,USERCONFPREFIX=\(.*\),USERCONFPREFIX='$out/var/lib, Makefile \
|
||||
src/Makefile src/utils/Makefile
|
||||
'';
|
||||
|
||||
preInstall = ''
|
||||
mkdir -p $out/etc $out/var/lib
|
||||
makeFlags="$makeFlags prefix=$out"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "http://fsfs.sourceforge.net/";
|
||||
description = "Secure distributed file system in user space";
|
||||
license = lib.licenses.gpl2Plus;
|
||||
};
|
||||
}
|
||||
39
pkgs/tools/filesystems/fuse-7z-ng/default.nix
Normal file
39
pkgs/tools/filesystems/fuse-7z-ng/default.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{ 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";
|
||||
};
|
||||
|
||||
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.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;
|
||||
};
|
||||
}
|
||||
28
pkgs/tools/filesystems/fuse-overlayfs/default.nix
Normal file
28
pkgs/tools/filesystems/fuse-overlayfs/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, fuse3, nixosTests }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fuse-overlayfs";
|
||||
version = "1.8.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "containers";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-FqlSMTCKtcG2HOA6KaPYArK/rxHG9eJSQmNOWIzJzCs=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
||||
|
||||
buildInputs = [ fuse3 ];
|
||||
|
||||
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;
|
||||
};
|
||||
}
|
||||
55
pkgs/tools/filesystems/fuseiso/default.nix
Normal file
55
pkgs/tools/filesystems/fuseiso/default.nix
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{ lib, stdenv, fetchurl, fetchpatch, autoreconfHook, pkg-config, fuse, glib, zlib }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fuseiso";
|
||||
version = "20070708";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/project/fuseiso/fuseiso/${version}/fuseiso-${version}.tar.bz2";
|
||||
sha256 = "127xql52dcdhmh7s5m9xc6q39jdlj3zhbjar1j821kb6gl3jw94b";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "00-support_large_iso.patch";
|
||||
url = "https://sources.debian.net/data/main/f/fuseiso/${version}-3.2/debian/patches/00-support_large_iso.patch";
|
||||
sha256 = "1lmclb1qwzz5f4wlq693g83bblwnjjl73qhgfxbsaac5hnn2shjw";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "01-fix_typo.patch";
|
||||
url = "https://sources.debian.net/data/main/f/fuseiso/${version}-3.2/debian/patches/01-fix_typo.patch";
|
||||
sha256 = "14rpxp0yylzsgqv0r19l4wx1h5hvqp617gpv1yg0w48amr9drasa";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "02-prevent-buffer-overflow_CVE-2015-8837.patch";
|
||||
url = "https://sources.debian.net/data/main/f/fuseiso/${version}-3.2/debian/patches/02-prevent-buffer-overflow.patch";
|
||||
sha256 = "1ls2pp3mh91pdb51qz1fsd8pwhbky6988bpd156bn7wgfxqzh8ig";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "03-prevent-integer-overflow_CVE-2015-8836.patch";
|
||||
url = "https://sources.debian.net/data/main/f/fuseiso/${version}-3.2/debian/patches/03-prevent-integer-overflow.patch";
|
||||
sha256 = "100cw07fk4sa3hl7a1gk2hgz4qsxdw99y20r7wpidwwwzy463zcv";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
||||
|
||||
buildInputs = [ fuse glib zlib ];
|
||||
|
||||
# after autoreconfHook, glib and zlib are not found, so force link against
|
||||
# them
|
||||
NIX_LDFLAGS = "-lglib-2.0 -lz";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
postInstall = ''
|
||||
install -Dm444 -t $out/share/doc/${pname} NEWS README
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "FUSE module to mount ISO filesystem images";
|
||||
homepage = "https://sourceforge.net/projects/fuseiso";
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
39
pkgs/tools/filesystems/fwanalyzer/default.nix
Normal file
39
pkgs/tools/filesystems/fwanalyzer/default.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{ lib
|
||||
, buildGoModule
|
||||
, fetchFromGitHub
|
||||
, e2tools
|
||||
, makeWrapper
|
||||
, mtools
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "fwanalyzer";
|
||||
version = "1.4.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cruise-automation";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "1pj6s7lzw7490488a30pzvqy2riprfnhb4nzxm6sh2nsp51xalzv";
|
||||
};
|
||||
|
||||
vendorSha256 = "1cjbqx75cspnkx7fgc665q920dsxnsdhqgyiawkvx0i8akczbflw";
|
||||
|
||||
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 ];
|
||||
};
|
||||
}
|
||||
31
pkgs/tools/filesystems/garage/default.nix
Normal file
31
pkgs/tools/filesystems/garage/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ lib, stdenv, rustPlatform, fetchFromGitea, protobuf, testers, Security, garage }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "garage";
|
||||
version = "0.7.0";
|
||||
|
||||
src = fetchFromGitea {
|
||||
domain = "git.deuxfleurs.fr";
|
||||
owner = "Deuxfleurs";
|
||||
repo = "garage";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-gs0TW431YUrdsdJ+PYrJgnLiBmDPYnUR0iVnQ/YqIfU=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-XGSenT2q3VXNcIT1Lg1e5HTOkEdOb1o3H07ahteQM/o=";
|
||||
|
||||
nativeBuildInputs = [ protobuf ];
|
||||
|
||||
buildInputs = lib.optional stdenv.isDarwin Security;
|
||||
|
||||
passthru = {
|
||||
tests.version = testers.testVersion { package = garage; };
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "S3-compatible object store for small self-hosted geo-distributed deployments";
|
||||
homepage = "https://garagehq.deuxfleurs.fr";
|
||||
license = lib.licenses.agpl3Only;
|
||||
maintainers = with lib.maintainers; [ nickcao _0x4A6F ];
|
||||
};
|
||||
}
|
||||
32
pkgs/tools/filesystems/gcsfuse/default.nix
Normal file
32
pkgs/tools/filesystems/gcsfuse/default.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ lib, buildGoPackage, fetchFromGitHub }:
|
||||
|
||||
buildGoPackage rec {
|
||||
pname = "gcsfuse";
|
||||
version = "0.41.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "googlecloudplatform";
|
||||
repo = "gcsfuse";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-5Kfd033SG1ldF+2QCZ01aa7ts0mA8uPXiLmqZIr94YQ=";
|
||||
};
|
||||
|
||||
goPackagePath = "github.com/googlecloudplatform/gcsfuse";
|
||||
|
||||
subPackages = [ "." "tools/mount_gcsfuse" ];
|
||||
|
||||
postInstall = ''
|
||||
ln -s $out/bin/mount_gcsfuse $out/bin/mount.gcsfuse
|
||||
ln -s $out/bin/mount_gcsfuse $out/bin/mount.fuse.gcsfuse
|
||||
'';
|
||||
|
||||
ldflags = [ "-s" "-w" "-X main.gcsfuseVersion=${version}" ];
|
||||
|
||||
meta = with lib;{
|
||||
description = "A user-space file system for interacting with Google Cloud Storage";
|
||||
homepage = "https://cloud.google.com/storage/docs/gcs-fuse";
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.unix;
|
||||
maintainers = [];
|
||||
};
|
||||
}
|
||||
25
pkgs/tools/filesystems/genext2fs/default.nix
Normal file
25
pkgs/tools/filesystems/genext2fs/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ lib, stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "genext2fs";
|
||||
version = "1.4.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/genext2fs/genext2fs-${version}.tar.gz";
|
||||
sha256 = "1z7czvsf3ircvz2cw1cf53yifsq29ljxmj15hbgc79l6gbxbnka0";
|
||||
};
|
||||
|
||||
# https://sourceforge.net/p/genext2fs/bugs/2/
|
||||
# Will be fixed in the next release, whenever this happens
|
||||
postPatch = ''
|
||||
sed -e 's@4 [*] (EXT2_TIND_BLOCK+1)@-1+&@' -i genext2fs.c
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://genext2fs.sourceforge.net/";
|
||||
description = "A tool to generate ext2 filesystem images without requiring root privileges";
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.all;
|
||||
maintainers = [ maintainers.bjornfor ];
|
||||
};
|
||||
}
|
||||
31
pkgs/tools/filesystems/genimage/default.nix
Normal file
31
pkgs/tools/filesystems/genimage/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ lib, stdenv, fetchurl, pkg-config, libconfuse, gettext }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "genimage";
|
||||
version = "15";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://public.pengutronix.de/software/genimage/genimage-${version}.tar.xz";
|
||||
sha256 = "0gh05pkmqn9ck79mwvl2812ssh0fb0xbq72iwh7b641ki2zj9jlv";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ 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 ];
|
||||
};
|
||||
}
|
||||
25
pkgs/tools/filesystems/genromfs/default.nix
Normal file
25
pkgs/tools/filesystems/genromfs/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ lib, stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.5.2";
|
||||
pname = "genromfs";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/romfs/genromfs/${version}/${pname}-${version}.tar.gz";
|
||||
sha256 = "0q6rpq7cmclmb4ayfyknvzbqysxs4fy8aiahlax1sb2p6k3pzwrh";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace Makefile \
|
||||
--replace "prefix = /usr" "prefix = $out" \
|
||||
--replace "gcc" "cc"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://romfs.sourceforge.net/";
|
||||
description = "Tool for creating romfs file system images";
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
46
pkgs/tools/filesystems/gfs2-utils/default.nix
Normal file
46
pkgs/tools/filesystems/gfs2-utils/default.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{ lib, stdenv, fetchurl, fetchpatch
|
||||
, autoreconfHook, bison, flex, pkg-config
|
||||
, bzip2, check, ncurses, util-linux, zlib
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gfs2-utils";
|
||||
version = "3.4.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://pagure.io/gfs2-utils/archive/${version}/gfs2-utils-${version}.tar.gz";
|
||||
sha256 = "sha256-gwKxBBG5PtG4/RxX4sUC25ZeG8K2urqVkFDKL7NS4ZI=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# pull pending upstream inclusion fix for ncurses-6.3: sent upstream over email.
|
||||
(fetchpatch {
|
||||
name = "ncurses-6.3.patch";
|
||||
url = "https://pagure.io/fork/slyfox/gfs2-utils/c/c927b635f380cca77665195a3aaae804d92870a4.patch";
|
||||
sha256 = "sha256-0M1xAqRXoUi2el03WODF/nqEe9JEE5GehMWs776QZNI=";
|
||||
})
|
||||
];
|
||||
postPatch = ''
|
||||
# Apply fix for ncurses-6.3. Upstream development branch already reworked the code.
|
||||
# To be removed on next reelase.
|
||||
substituteInPlace gfs2/edit/gfs2hex.c --replace 'printw(title);' 'printw("%s",title);'
|
||||
'';
|
||||
|
||||
outputs = [ "bin" "doc" "out" "man" ];
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook bison flex pkg-config ];
|
||||
buildInputs = [ bzip2 ncurses util-linux zlib ];
|
||||
|
||||
checkInputs = [ 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;
|
||||
};
|
||||
}
|
||||
43
pkgs/tools/filesystems/gitfs/default.nix
Normal file
43
pkgs/tools/filesystems/gitfs/default.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{ lib, fetchFromGitHub, python3Packages }:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "gitfs";
|
||||
version = "0.5.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "PressLabs";
|
||||
repo = "gitfs";
|
||||
rev = version;
|
||||
sha256 = "1jzwdwan8ndvp2lw6j7zbvg5k9rgf2d8dcxjrwc6bwyk59xdxn4p";
|
||||
};
|
||||
|
||||
patchPhase = ''
|
||||
# requirement checks are unnecessary at runtime
|
||||
echo > requirements.txt
|
||||
|
||||
# NOTE: As of gitfs 0.5.2, The pygit2 release that upstream uses is a major
|
||||
# version behind the one packaged in nixpkgs.
|
||||
substituteInPlace gitfs/mounter.py --replace \
|
||||
'from pygit2.remote import RemoteCallbacks' \
|
||||
'from pygit2 import RemoteCallbacks'
|
||||
'';
|
||||
|
||||
checkInputs = 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 ];
|
||||
};
|
||||
}
|
||||
196
pkgs/tools/filesystems/glusterfs/default.nix
Normal file
196
pkgs/tools/filesystems/glusterfs/default.nix
Normal file
|
|
@ -0,0 +1,196 @@
|
|||
{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, glibc, 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 bison flex openssl ncurses readline
|
||||
libtool pkg-config zlib libaio libxml2
|
||||
acl sqlite liburcu attr makeWrapper 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
|
||||
glibc # 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 = "10.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "gluster";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-vVFC2kQNneaOwrezPehOX32dpJb88ZhGHBApEXc9MOg=";
|
||||
};
|
||||
inherit buildInputs propagatedBuildInputs;
|
||||
|
||||
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 = [ rpcsvc-proto autoconf automake ];
|
||||
|
||||
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;
|
||||
};
|
||||
}
|
||||
29
pkgs/tools/filesystems/go-mtpfs/default.nix
Normal file
29
pkgs/tools/filesystems/go-mtpfs/default.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ lib, buildGoModule, fetchFromGitHub, pkg-config, libusb1 }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "go-mtpfs";
|
||||
version = "1.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hanwen";
|
||||
repo = "go-mtpfs";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-HVfB8/MImgZZLx4tcrlYOfQjpAdHMHshEaSsd+n758w=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-OrAEvD2rF0Y0bvCD9TUv/E429lASsvC3uK3qNvbg734=";
|
||||
|
||||
ldflags = [ "-s" "-w" ];
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ libusb1 ];
|
||||
|
||||
checkFlags = [ "-short" ];
|
||||
|
||||
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; [ aaronjheng ];
|
||||
};
|
||||
}
|
||||
69
pkgs/tools/filesystems/gocryptfs/default.nix
Normal file
69
pkgs/tools/filesystems/gocryptfs/default.nix
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, buildGoModule
|
||||
, fetchFromGitHub
|
||||
, fuse
|
||||
, makeWrapper
|
||||
, openssl
|
||||
, pandoc
|
||||
, pkg-config
|
||||
, libfido2
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "gocryptfs";
|
||||
version = "2.2.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rfjakob";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-qERtX9UcdMolbffzPiVQlblirzJ5baOmHonJIO8ang0=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-yJ7RYwhArgmGlFmSplrX1hiLkc7FkS1qQCUcRlbnNWQ=";
|
||||
|
||||
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;
|
||||
};
|
||||
}
|
||||
36
pkgs/tools/filesystems/goofys/default.nix
Normal file
36
pkgs/tools/filesystems/goofys/default.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, buildGoModule
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
|
||||
buildGoModule {
|
||||
pname = "goofys";
|
||||
version = "unstable-2022-04-21";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "kahing";
|
||||
repo = "goofys";
|
||||
# Same as v0.24.0 but migrated to Go modules
|
||||
rev = "829d8e5ce20faa3f9f6f054077a14325e00e9249";
|
||||
sha256 = "sha256-6yVMNSwwPZlADXuPBDRlgoz4Stuz2pgv6r6+y2/C8XY=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-2N8MshBo9+2q8K00eTW5So6d8ZNRzOfQkEKmxR428gI=";
|
||||
|
||||
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
|
||||
};
|
||||
|
||||
}
|
||||
33
pkgs/tools/filesystems/gpart/default.nix
Normal file
33
pkgs/tools/filesystems/gpart/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ lib, stdenv, fetchFromGitHub, autoreconfHook }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gpart";
|
||||
version = "0.3";
|
||||
|
||||
# GitHub repository 'collating patches for gpart from all distributions':
|
||||
src = fetchFromGitHub {
|
||||
sha256 = "1lsd9k876p944k9s6sxqk5yh9yr7m42nbw9vlsllin7pd4djl4ya";
|
||||
rev = version;
|
||||
repo = "gpart";
|
||||
owner = "baruch";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = with lib; {
|
||||
inherit (src.meta) homepage;
|
||||
description = "Guess PC-type hard disk partitions";
|
||||
longDescription = ''
|
||||
Gpart is a tool which tries to guess the primary partition table of a
|
||||
PC-type hard disk in case the primary partition table in sector 0 is
|
||||
damaged, incorrect or deleted. The guessed table can be written to a file
|
||||
or device.
|
||||
'';
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
25
pkgs/tools/filesystems/grive2/default.nix
Normal file
25
pkgs/tools/filesystems/grive2/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ lib, stdenv, fetchFromGitHub, pkg-config, yajl, cmake, libgcrypt, curl, expat, boost, libiberty }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.5.1";
|
||||
pname = "grive2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "vitalif";
|
||||
repo = "grive2";
|
||||
rev = "v${version}";
|
||||
sha256 = "1kv34ys8qarjsxpb1kd8dp7b3b4ycyiwjzd6mg97d3jk7405g6nm";
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
}
|
||||
48
pkgs/tools/filesystems/hfsprogs/default.nix
Normal file
48
pkgs/tools/filesystems/hfsprogs/default.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{ lib, stdenv, fetchurl, openssl, libbsd }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "332.25";
|
||||
pname = "hfsprogs";
|
||||
srcs = [
|
||||
(fetchurl {
|
||||
url = "http://ftp.de.debian.org/debian/pool/main/h/hfsprogs/hfsprogs_${version}-11.debian.tar.gz";
|
||||
sha256 = "62d9b8599c66ebffbc57ce5d776e20b41341130d9b27341d63bda08460ebde7c";
|
||||
})
|
||||
(fetchurl {
|
||||
url = "https://opensource.apple.com/tarballs/diskdev_cmds/diskdev_cmds-${version}.tar.gz";
|
||||
sha256 = "74c9aeca899ed7f4bf155c65fc45bf0f250c0f6d57360ea953b1d536d9aa45e6";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
sed -ie '/sys\/sysctl.h/d' newfs_hfs.tproj/makehfs.c
|
||||
'';
|
||||
|
||||
sourceRoot = "diskdev_cmds-" + version;
|
||||
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;
|
||||
};
|
||||
}
|
||||
36
pkgs/tools/filesystems/httm/default.nix
Normal file
36
pkgs/tools/filesystems/httm/default.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ lib
|
||||
, fetchFromGitHub
|
||||
, rustPlatform
|
||||
, installShellFiles
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "httm";
|
||||
version = "0.11.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "kimono-koans";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "GNiqWm6MsgLYjrkrbIHgKxtLmE4IJntcLd9GVRu1v2A=";
|
||||
};
|
||||
|
||||
cargoSha256 = "87BkVAZ3BPtnuNUBTzdR4oiE0ZLIr5CacdYenU4V9qU=";
|
||||
|
||||
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";
|
||||
license = licenses.mpl20;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ wyndon ];
|
||||
};
|
||||
}
|
||||
26
pkgs/tools/filesystems/httpdirfs/default.nix
Normal file
26
pkgs/tools/filesystems/httpdirfs/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ lib, stdenv, fetchFromGitHub, pkg-config, curl, expat, fuse, gumbo, libuuid }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "httpdirfs";
|
||||
version = "1.2.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "fangfufu";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-rdeBlAV3t/si9x488tirUGLZRYAxh13zdRIQe0OPd+A=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ curl expat fuse gumbo libuuid ];
|
||||
|
||||
makeFlags = [ "prefix=${placeholder "out"}" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A FUSE filesystem for HTTP directory listings";
|
||||
homepage = "https://github.com/fangfufu/httpdirfs";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ sbruder schnusch ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
36
pkgs/tools/filesystems/httpfs/default.nix
Normal file
36
pkgs/tools/filesystems/httpfs/default.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ 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";
|
||||
};
|
||||
|
||||
buildInputs =
|
||||
[ pkg-config 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 = "http://httpfs.sourceforge.net/";
|
||||
|
||||
license = lib.licenses.gpl2Plus;
|
||||
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = [ ];
|
||||
};
|
||||
}
|
||||
44
pkgs/tools/filesystems/hubicfuse/default.nix
Normal file
44
pkgs/tools/filesystems/hubicfuse/default.nix
Normal file
|
|
@ -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 ];
|
||||
};
|
||||
}
|
||||
30
pkgs/tools/filesystems/idsk/default.nix
Normal file
30
pkgs/tools/filesystems/idsk/default.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
|
||||
pname = "idsk";
|
||||
version = "0.20";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
repo = "idsk";
|
||||
owner = "cpcsdk";
|
||||
rev = "v${version}";
|
||||
sha256 = "05zbdkb9s6sfkni6k927795w2fqdhnf3i7kgl27715sdmmdab05d";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp iDSK $out/bin
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Manipulating CPC dsk images and files";
|
||||
homepage = "https://github.com/cpcsdk/idsk" ;
|
||||
license = licenses.mit;
|
||||
maintainers = [ ];
|
||||
mainProgram = "iDSK";
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
46
pkgs/tools/filesystems/ifuse/default.nix
Normal file
46
pkgs/tools/filesystems/ifuse/default.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, autoreconfHook
|
||||
, pkg-config
|
||||
, fuse
|
||||
, usbmuxd
|
||||
, libimobiledevice
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ifuse";
|
||||
version = "1.1.4+date=2022-04-04";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "libimobiledevice";
|
||||
repo = pname;
|
||||
rev = "6f5b8e410f9615b3369ca5eb5367745e13d83b92";
|
||||
hash = "sha256-KbuJLS2BWua9DnhLv2KtsQObin0PQwXQwEdgi3lSAPk=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
fuse
|
||||
usbmuxd
|
||||
libimobiledevice
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/libimobiledevice/ifuse";
|
||||
description = "A fuse filesystem implementation to access the contents of iOS devices";
|
||||
longDescription = ''
|
||||
Mount directories of an iOS device locally using fuse. By default the media
|
||||
directory is mounted, options allow to also mount the sandbox container of an
|
||||
app, an app's documents folder or even the root filesystem on jailbroken
|
||||
devices.
|
||||
'';
|
||||
license = licenses.lgpl21Plus;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ infinisil ];
|
||||
};
|
||||
}
|
||||
58
pkgs/tools/filesystems/ioztat/default.nix
Normal file
58
pkgs/tools/filesystems/ioztat/default.nix
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, installShellFiles
|
||||
, python3
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ioztat";
|
||||
version = "2.0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jimsalterjrs";
|
||||
repo = "ioztat";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-8svMijgVxSuquPFO2Q2HeqGLdMkwhiujS1DSxC/LRRk=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
buildInputs = [ python3 ];
|
||||
|
||||
prePatch = ''
|
||||
patchShebangs .
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -vDt $out/bin -m 0555 ioztat
|
||||
|
||||
if [ -f ioztat.8 ]; then
|
||||
installManPage ioztat.8
|
||||
fi
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
inherit version;
|
||||
inherit (src.meta) homepage;
|
||||
description = "A storage load analysis tool for OpenZFS";
|
||||
longDescription = ''
|
||||
ioztat is a storage load analysis tool for OpenZFS. It provides
|
||||
iostat-like statistics at an individual dataset/zvol level.
|
||||
|
||||
The statistics offered are read and write operations per second, read and
|
||||
write throughput per second, and the average size of read and write
|
||||
operations issued in the current reporting interval. Viewing these
|
||||
statistics at the individual dataset level allows system administrators
|
||||
to identify storage "hot spots" in larger multi-tenant
|
||||
systems -- particularly those with many VMs or containers operating
|
||||
essentially independent workloads.
|
||||
'';
|
||||
license = licenses.bsd2;
|
||||
platforms = with platforms; linux ++ freebsd;
|
||||
maintainers = with maintainers; [ numinit ];
|
||||
};
|
||||
}
|
||||
61
pkgs/tools/filesystems/irods/common.nix
Normal file
61
pkgs/tools/filesystems/irods/common.nix
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
{ lib, stdenv, bzip2, zlib, autoconf, automake, cmake, help2man, texinfo, libtool, cppzmq, libarchive
|
||||
, avro-cpp, boost, jansson, zeromq, openssl, pam, libiodbc, libkrb5, gcc, libcxx, which, catch2, nanodbc, fmt
|
||||
, nlohmann_json, spdlog }:
|
||||
|
||||
# Common attributes of irods packages
|
||||
|
||||
{
|
||||
nativeBuildInputs = [ autoconf automake cmake help2man texinfo which gcc ];
|
||||
buildInputs = [ bzip2 zlib libtool cppzmq libarchive avro-cpp jansson zeromq openssl pam libiodbc libkrb5 boost
|
||||
libcxx catch2 nanodbc fmt nlohmann_json spdlog ];
|
||||
|
||||
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_JANSSON=${jansson}"
|
||||
"-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
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace "DESTINATION usr/bin" "DESTINATION bin" \
|
||||
--replace "INCLUDE_DIRS usr/include/" "INCLUDE_DIRS include/" \
|
||||
--replace "DESTINATION usr/lib/" "DESTINATION lib/" \
|
||||
--replace "{IRODS_EXTERNALS_FULLPATH_JSON}/include" "{IRODS_EXTERNALS_FULLPATH_JSON}/include/nlohmann"
|
||||
export cmakeFlags="$cmakeFlags
|
||||
-DCMAKE_INSTALL_PREFIX=$out
|
||||
"
|
||||
'';
|
||||
|
||||
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;
|
||||
};
|
||||
}
|
||||
101
pkgs/tools/filesystems/irods/default.nix
Normal file
101
pkgs/tools/filesystems/irods/default.nix
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
{ lib, stdenv, fetchFromGitHub, bzip2, zlib, autoconf, automake, cmake, help2man, texinfo, libtool, cppzmq
|
||||
, libarchive, avro-cpp_llvm, boost, jansson, zeromq, openssl, pam, libiodbc, libkrb5, gcc, libcxx, which, catch2
|
||||
, nanodbc_llvm, fmt, nlohmann_json, spdlog }:
|
||||
|
||||
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 jansson
|
||||
zeromq openssl pam libiodbc libkrb5 gcc libcxx
|
||||
boost avro-cpp which catch2 nanodbc fmt nlohmann_json
|
||||
spdlog;
|
||||
};
|
||||
in
|
||||
rec {
|
||||
|
||||
# irods: libs and server package
|
||||
irods = stdenv.mkDerivation (common // rec {
|
||||
version = "4.2.11";
|
||||
pname = "irods";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "irods";
|
||||
repo = "irods";
|
||||
rev = version;
|
||||
sha256 = "0prcsiddk8n3h515jjapgfz1d6hjqywhrkcf6giqd7xc7b0slz44";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
# Patches:
|
||||
# irods_root_path.patch : the root path is obtained by stripping 3 items of the path,
|
||||
# but we don't use /usr with nix, so remove only 2 items.
|
||||
patches = [ ./irods_root_path.patch ];
|
||||
|
||||
# fix build with recent llvm versions
|
||||
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"
|
||||
substituteInPlace cmake/server.cmake --replace "DESTINATION usr/sbin" "DESTINATION sbin"
|
||||
substituteInPlace cmake/server.cmake --replace "IRODS_DOC_DIR usr/share" "IRODS_DOC_DIR share"
|
||||
substituteInPlace cmake/runtime_library.cmake --replace "DESTINATION usr/lib" "DESTINATION lib"
|
||||
substituteInPlace cmake/development_library.cmake --replace "DESTINATION usr/lib" "DESTINATION lib"
|
||||
substituteInPlace cmake/development_library.cmake --replace "DESTINATION usr/include" "DESTINATION include"
|
||||
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 cmake/server.cmake --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 (common // rec {
|
||||
version = "4.2.11";
|
||||
pname = "irods-icommands";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "irods";
|
||||
repo = "irods_client_icommands";
|
||||
rev = version;
|
||||
sha256 = "0wgs585j2lp820py2pbizsk54xgz5id96fhxwwk9lqhbzxhfjhcg";
|
||||
};
|
||||
|
||||
patches = [ ./zmqcpp-deprecated-send_recv.patch ];
|
||||
|
||||
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'.";
|
||||
};
|
||||
});
|
||||
}
|
||||
49
pkgs/tools/filesystems/irods/irods_root_path.patch
Normal file
49
pkgs/tools/filesystems/irods/irods_root_path.patch
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
diff -r -u irods-4.2.0.orig/scripts/irods/paths.py irods-4.2.0/scripts/irods/paths.py
|
||||
--- irods-4.2.0.orig/scripts/irods/paths.py 2016-11-15 06:23:55.000000000 +0000
|
||||
+++ irods-4.2.0/scripts/irods/paths.py 2016-12-21 15:17:07.437864606 +0000
|
||||
@@ -10,7 +10,7 @@
|
||||
return os.path.join(root_directory(), 'var', 'lib', 'irods')
|
||||
|
||||
def config_directory():
|
||||
- return os.path.join(root_directory(), 'etc', 'irods')
|
||||
+ return os.path.join(os.path.abspath('/'), 'etc', 'irods')
|
||||
|
||||
def plugins_directory():
|
||||
return os.path.join(root_directory(), 'usr', 'lib', 'irods', 'plugins')
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
def version_path():
|
||||
return os.path.join(
|
||||
- irods_directory(),
|
||||
+ home_directory(),
|
||||
'VERSION.json')
|
||||
|
||||
def hosts_config_path():
|
||||
@@ -64,7 +64,7 @@
|
||||
|
||||
def log_directory():
|
||||
return os.path.join(
|
||||
- irods_directory(),
|
||||
+ home_directory(),
|
||||
'log')
|
||||
|
||||
def control_log_path():
|
||||
@@ -110,8 +110,7 @@
|
||||
def server_bin_directory():
|
||||
return os.path.join(
|
||||
root_directory(),
|
||||
- 'usr',
|
||||
- 'sbin')
|
||||
+ 'bin')
|
||||
|
||||
def server_executable():
|
||||
return os.path.join(
|
||||
@@ -132,7 +131,7 @@
|
||||
return os.path.join(config_directory(), 'service_account.config')
|
||||
|
||||
def genosauth_path():
|
||||
- return os.path.join(irods_directory(), 'clients', 'bin', 'genOSAuth')
|
||||
+ return os.path.join(home_directory(), 'clients', 'bin', 'genOSAuth')
|
||||
|
||||
def irods_user_and_group_entries():
|
||||
try:
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
diff -r -u source/src/irods-grid.cpp source.new/src/irods-grid.cpp
|
||||
--- source/src/irods-grid.cpp 1970-01-01 01:00:01.000000000 +0100
|
||||
+++ source.new/src/irods-grid.cpp 2020-05-05 16:34:35.566464346 +0200
|
||||
@@ -412,7 +412,7 @@
|
||||
data_to_send.data(),
|
||||
data_to_send.size() );
|
||||
try {
|
||||
- if (!zmq_skt.send(req)) {
|
||||
+ if (!zmq_skt.send( req, zmq::send_flags::dontwait )) {
|
||||
std::cerr << "ZeroMQ encountered an error sending a message.\n";
|
||||
return errno;
|
||||
}
|
||||
@@ -426,7 +426,7 @@
|
||||
zmq::message_t rep;
|
||||
// wait for the server reponse
|
||||
try {
|
||||
- if (!zmq_skt.recv( &rep )) {
|
||||
+ if (!zmq_skt.recv( rep, zmq::recv_flags::dontwait )) {
|
||||
std::cerr << "ZeroMQ encountered an error receiving a message.\n";
|
||||
return errno;
|
||||
}
|
||||
10
pkgs/tools/filesystems/jfsutils/ar-fix.patch
Normal file
10
pkgs/tools/filesystems/jfsutils/ar-fix.patch
Normal file
|
|
@ -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
|
||||
40
pkgs/tools/filesystems/jfsutils/default.nix
Normal file
40
pkgs/tools/filesystems/jfsutils/default.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{ lib, stdenv, fetchurl, fetchpatch, libuuid, autoreconfHook }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "jfsutils";
|
||||
version = "1.1.15";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://jfs.sourceforge.net/project/pub/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";
|
||||
})
|
||||
];
|
||||
|
||||
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
|
||||
NIX_CFLAGS_COMPILE = "-fcommon";
|
||||
|
||||
meta = with lib; {
|
||||
description = "IBM JFS utilities";
|
||||
homepage = "http://jfs.sourceforge.net";
|
||||
license = licenses.gpl3;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
37
pkgs/tools/filesystems/jfsutils/hardening-format.patch
Normal file
37
pkgs/tools/filesystems/jfsutils/hardening-format.patch
Normal file
|
|
@ -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;
|
||||
}
|
||||
12
pkgs/tools/filesystems/jfsutils/types.patch
Normal file
12
pkgs/tools/filesystems/jfsutils/types.patch
Normal file
|
|
@ -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
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue