nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchurl,
5 fetchpatch,
6 autoreconfHook,
7 pkg-config,
8 fuse,
9 fuse3,
10}:
11
12stdenv.mkDerivation (finalAttrs: {
13 version = "1.18.1";
14 pname = "bindfs";
15
16 src = fetchurl {
17 url = "https://bindfs.org/downloads/bindfs-${finalAttrs.version}.tar.gz";
18 hash = "sha256-KnBk2ZOl8lXFLXI4XvFONJwTG8RBlXZuIXNCjgbSef0=";
19 };
20
21 patches = [
22 # This commit fixes macfuse support but breaks fuse support
23 # The condition to include `uint32_t position` in bindfs_setxattr and bindfs_getxattr
24 # is wrong, leading to -Wincompatible-function-pointer-types
25 # https://github.com/mpartel/bindfs/issues/169
26 (fetchpatch {
27 url = "https://github.com/mpartel/bindfs/commit/3293dc98e37eed0fb0cbfcbd40434d3c37c69480.patch";
28 hash = "sha256-dtjvSJTS81R+sksl7n1QiyssseMQXPlm+LJYZ8/CESQ=";
29 revert = true;
30 })
31 ];
32
33 nativeBuildInputs = [
34 autoreconfHook
35 pkg-config
36 ];
37
38 buildInputs = if stdenv.hostPlatform.isDarwin then [ fuse ] else [ fuse3 ];
39
40 configureFlags = lib.optional stdenv.hostPlatform.isDarwin "--disable-macos-fs-link";
41
42 postFixup = ''
43 ln -s $out/bin/bindfs $out/bin/mount.fuse.bindfs
44 '';
45
46 meta = {
47 changelog = "https://github.com/mpartel/bindfs/raw/${finalAttrs.version}/ChangeLog";
48 description = "FUSE filesystem for mounting a directory to another location";
49 homepage = "https://bindfs.org";
50 license = lib.licenses.gpl2Only;
51 maintainers = with lib.maintainers; [
52 lovek323
53 lovesegfault
54 ];
55 platforms = lib.platforms.unix;
56 };
57})