depot/pkgs/os-specific/linux/afuse/default.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

44 lines
954 B
Nix

{
lib,
stdenv,
fetchFromGitHub,
pkg-config,
autoreconfHook,
fuse,
}:
stdenv.mkDerivation rec {
pname = "afuse";
version = "0.5.0";
src = fetchFromGitHub {
owner = "pcarrier";
repo = "afuse";
rev = "v${version}";
sha256 = "sha256-KpysJRvDx+12BSl9pIGRqbJAM4W1NbzxMgDycGCr2RM=";
};
nativeBuildInputs = [
autoreconfHook
pkg-config
];
buildInputs = [ fuse ];
patches = [ ./001-darwin-fdatasync.patch ];
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
# Fix the build on macOS with macFUSE installed
substituteInPlace configure.ac --replace-fail \
'export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH' \
""
'';
meta = {
description = "Automounter in userspace";
homepage = "https://github.com/pcarrier/afuse";
license = lib.licenses.gpl2Only;
maintainers = [ lib.maintainers.marcweber ];
platforms = lib.platforms.unix;
};
}