Files
nixpkgs/pkgs/by-name/fu/fuse-archive/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

54 lines
1.2 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
fuse,
libarchive,
pkg-config,
boost,
}:
stdenv.mkDerivation rec {
pname = "fuse-archive";
version = "1.10";
src = fetchFromGitHub {
owner = "google";
repo = "fuse-archive";
tag = "v${version}";
hash = "sha256-Fta/IYKWsB4ZuPOWtGO6p6l03eoRXaO0lIGaCU3SRag=";
};
postPatch = ''
substituteInPlace Makefile \
--replace-fail "/usr" "$out"
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace src/main.cc \
--replace-fail "!defined(__OpenBSD__)" "!defined(__OpenBSD__) && !defined(__APPLE__)" \
--replace-fail " | O_PATH" ""
'';
nativeBuildInputs = [ pkg-config ];
buildInputs = [
fuse
libarchive
boost
];
env.NIX_CFLAGS_COMPILE = "-D_FILE_OFFSET_BITS=64";
makeFlags = [ "prefix=${placeholder "out"}" ];
meta = {
inherit (fuse.meta) platforms;
description = "Serve an archive or a compressed file as a read-only FUSE file system";
homepage = "https://github.com/google/fuse-archive";
changelog = "https://github.com/google/fuse-archive/releases/tag/v${version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ icyrockcom ];
mainProgram = "fuse-archive";
};
}