From 22de9d970e13a98bde6474af3ac0e5bfb2ee2bff Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Sat, 2 Sep 2023 22:14:47 +0200 Subject: [PATCH] bindfs: use `finalAttrs` pattern --- pkgs/tools/filesystems/bindfs/default.nix | 30 +++++++++++++++-------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/pkgs/tools/filesystems/bindfs/default.nix b/pkgs/tools/filesystems/bindfs/default.nix index 3e0370b99adb..dfcf6aba9e08 100644 --- a/pkgs/tools/filesystems/bindfs/default.nix +++ b/pkgs/tools/filesystems/bindfs/default.nix @@ -1,26 +1,36 @@ -{ lib, stdenv, fetchurl, fuse, fuse3, pkg-config }: +{ lib +, stdenv +, fetchurl +, pkg-config +, fuse +, fuse3 +}: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { version = "1.17.4"; pname = "bindfs"; src = fetchurl { - url = "https://bindfs.org/downloads/${pname}-${version}.tar.gz"; - sha256 = "sha256-b9Svm6LsK9tgPvjuoqnRLbLl/py+UrhkC0FXNKWfPcw="; + url = "https://bindfs.org/downloads/bindfs-${finalAttrs.version}.tar.gz"; + hash = "sha256-b9Svm6LsK9tgPvjuoqnRLbLl/py+UrhkC0FXNKWfPcw="; }; - nativeBuildInputs = [ pkg-config ]; + nativeBuildInputs = [ + pkg-config + ]; + buildInputs = if stdenv.isDarwin then [ fuse ] else [ fuse3 ]; + postFixup = '' ln -s $out/bin/bindfs $out/bin/mount.fuse.bindfs ''; meta = { + changelog = "https://github.com/mpartel/bindfs/raw/${finalAttrs.version}/ChangeLog"; description = "A FUSE filesystem for mounting a directory to another location"; - homepage = "https://bindfs.org"; - changelog = "https://github.com/mpartel/bindfs/raw/${version}/ChangeLog"; - license = lib.licenses.gpl2Only; + homepage = "https://bindfs.org"; + license = lib.licenses.gpl2Only; maintainers = with lib.maintainers; [ lovek323 lovesegfault ]; - platforms = lib.platforms.unix; + platforms = lib.platforms.unix; }; -} +})