From a3d60923a5427ad6a772270b040638ca44b8152e Mon Sep 17 00:00:00 2001 From: nikstur Date: Sat, 24 Jun 2023 00:01:21 +0200 Subject: [PATCH] erofs-utils: enable running on darwin --- .../filesystems}/erofs-utils/default.nix | 13 ++++++++----- pkgs/top-level/all-packages.nix | 4 ++-- 2 files changed, 10 insertions(+), 7 deletions(-) rename pkgs/{os-specific/linux => tools/filesystems}/erofs-utils/default.nix (60%) diff --git a/pkgs/os-specific/linux/erofs-utils/default.nix b/pkgs/tools/filesystems/erofs-utils/default.nix similarity index 60% rename from pkgs/os-specific/linux/erofs-utils/default.nix rename to pkgs/tools/filesystems/erofs-utils/default.nix index d84edfc56d9..a10addbfa51 100644 --- a/pkgs/os-specific/linux/erofs-utils/default.nix +++ b/pkgs/tools/filesystems/erofs-utils/default.nix @@ -1,4 +1,6 @@ -{ lib, stdenv, fetchurl, autoreconfHook, pkg-config, fuse, libuuid, lz4 }: +{ lib, stdenv, fetchurl, autoreconfHook, pkg-config, fuse, util-linux, lz4 +, fuseSupport ? stdenv.isLinux +}: stdenv.mkDerivation rec { pname = "erofs-utils"; @@ -12,14 +14,15 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ autoreconfHook pkg-config ]; - buildInputs = [ fuse libuuid lz4 ]; + buildInputs = [ util-linux lz4 ] + ++ lib.optionals fuseSupport [ fuse ]; - configureFlags = [ "--enable-fuse" ]; + configureFlags = lib.optionals fuseSupport [ "--enable-fuse" ]; meta = with lib; { description = "Userspace utilities for linux-erofs file system"; license = with licenses; [ gpl2Plus ]; - maintainers = with maintainers; [ ehmry ]; - platforms = platforms.linux; + maintainers = with maintainers; [ ehmry nikstur ]; + platforms = platforms.unix; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a5fb3bd21c7..7d128f6518a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7135,6 +7135,8 @@ with pkgs; ecmtools = callPackage ../tools/cd-dvd/ecm-tools { }; + erofs-utils = callPackage ../tools/filesystems/erofs-utils { }; + e2tools = callPackage ../tools/filesystems/e2tools { }; e2fsprogs = callPackage ../tools/filesystems/e2fsprogs { }; @@ -26935,8 +26937,6 @@ with pkgs; dstat = callPackage ../os-specific/linux/dstat { }; - erofs-utils = callPackage ../os-specific/linux/erofs-utils { }; - evdev-proto = callPackage ../os-specific/bsd/freebsd/evdev-proto { }; fscryptctl = callPackage ../os-specific/linux/fscryptctl { };