diff --git a/pkgs/by-name/fu/fuse-archive/package.nix b/pkgs/by-name/fu/fuse-archive/package.nix index cdcf0b6926f5..4dd183b0569f 100644 --- a/pkgs/by-name/fu/fuse-archive/package.nix +++ b/pkgs/by-name/fu/fuse-archive/package.nix @@ -5,42 +5,50 @@ fuse, libarchive, pkg-config, + boost, }: stdenv.mkDerivation rec { pname = "fuse-archive"; - version = "0.1.14"; + version = "1.10"; src = fetchFromGitHub { owner = "google"; repo = "fuse-archive"; tag = "v${version}"; - hash = "sha256-l4tIK157Qo4m611etwMSk564+eC28x4RbmjX3J57/7Q="; + hash = "sha256-Fta/IYKWsB4ZuPOWtGO6p6l03eoRXaO0lIGaCU3SRag="; }; - nativeBuildInputs = [ - pkg-config - ]; + 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"}" - ]; + makeFlags = [ "prefix=${placeholder "out"}" ]; - meta = with lib; { + 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 = licenses.asl20; - maintainers = with maintainers; [ icyrockcom ]; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ icyrockcom ]; mainProgram = "fuse-archive"; }; - - inherit (fuse.meta) platforms; }