diff options
Diffstat (limited to 'pkgs/os-specific/linux/fuse/common.nix')
-rw-r--r-- | pkgs/os-specific/linux/fuse/common.nix | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/pkgs/os-specific/linux/fuse/common.nix b/pkgs/os-specific/linux/fuse/common.nix index 2010be53c2d..5adb1b5355a 100644 --- a/pkgs/os-specific/linux/fuse/common.nix +++ b/pkgs/os-specific/linux/fuse/common.nix @@ -1,14 +1,14 @@ { version, sha256Hash }: -{ stdenv, fetchFromGitHub, fetchpatch -, fusePackages, utillinux, gettext +{ lib, stdenv, fetchFromGitHub, fetchpatch +, fusePackages, util-linux, gettext, shadow , meson, ninja, pkg-config , autoreconfHook , python3Packages, which }: let - isFuse3 = stdenv.lib.hasPrefix "3" version; + isFuse3 = lib.hasPrefix "3" version; in stdenv.mkDerivation rec { pname = "fuse"; inherit version; @@ -23,7 +23,7 @@ in stdenv.mkDerivation rec { preAutoreconf = "touch config.rpath"; patches = - stdenv.lib.optional + lib.optional (!isFuse3 && stdenv.isAarch64) (fetchpatch { url = "https://github.com/libfuse/libfuse/commit/914871b20a901e3e1e981c92bc42b1c93b7ab81b.patch"; @@ -37,9 +37,9 @@ in stdenv.mkDerivation rec { then [ meson ninja pkg-config ] else [ autoreconfHook gettext ]; - outputs = [ "out" ] ++ stdenv.lib.optional isFuse3 "common"; + outputs = [ "out" ] ++ lib.optional isFuse3 "common"; - mesonFlags = stdenv.lib.optionals isFuse3 [ + mesonFlags = lib.optionals isFuse3 [ "-Dudevrulesdir=/udev/rules.d" "-Duseroot=false" ]; @@ -54,17 +54,14 @@ in stdenv.mkDerivation rec { # $PATH, so it should also work on non-NixOS systems. export NIX_CFLAGS_COMPILE="-DFUSERMOUNT_DIR=\"/run/wrappers/bin\"" - sed -e 's@/bin/@${utillinux}/bin/@g' -i lib/mount_util.c + substituteInPlace lib/mount_util.c --replace "/bin/" "${util-linux}/bin/" '' + (if isFuse3 then '' # The configure phase will delete these files (temporary workaround for # ./fuse3-install_man.patch) install -D -m444 doc/fusermount3.1 $out/share/man/man1/fusermount3.1 install -D -m444 doc/mount.fuse3.8 $out/share/man/man8/mount.fuse3.8 - - # TODO: Temporary version fix: - substituteInPlace meson.build \ - --replace "version: '3.9.3'" "version: '${version}'" '' else '' + substituteInPlace util/mount.fuse.c --replace '"su"' '"${shadow.su}/bin/su"' sed -e 's@CONFIG_RPATH=/usr/share/gettext/config.rpath@CONFIG_RPATH=${gettext}/share/gettext/config.rpath@' -i makeconf.sh ./makeconf.sh ''); @@ -85,9 +82,7 @@ in stdenv.mkDerivation rec { cp ${fusePackages.fuse_3.common}/etc/udev/rules.d/99-fuse.rules etc/udev/rules.d/99-fuse.rules ''); - enableParallelBuilding = true; - - meta = with stdenv.lib; { + meta = with lib; { description = "Library that allows filesystems to be implemented in user space"; longDescription = '' FUSE (Filesystem in Userspace) is an interface for userspace programs to @@ -100,7 +95,7 @@ in stdenv.mkDerivation rec { inherit (src.meta) homepage; changelog = "https://github.com/libfuse/libfuse/releases/tag/fuse-${version}"; platforms = platforms.linux; - license = with licenses; [ gpl2 lgpl21 ]; + license = with licenses; [ gpl2Only lgpl21Only ]; maintainers = [ maintainers.primeos ]; }; } |