s3backer: 1.6.3 -> 2.0.2

This commit is contained in:
Dave Nicponski 2023-02-12 01:30:31 -05:00
parent c6a1db8ef2
commit 81e42ff63a
2 changed files with 33 additions and 7 deletions

View File

@ -4,15 +4,21 @@
stdenv.mkDerivation rec {
pname = "s3backer";
version = "1.6.3";
version = "2.0.2";
src = fetchFromGitHub {
sha256 = "sha256-DOf+kpflDd2U1nXDLKYts/yf121CrBFIBI47OQa5XBs=";
sha256 = "sha256-xmOtL4v3UxdjrL09sSfXyF5FoMrNerSqG9nvEuwMvNM=";
rev = version;
repo = "s3backer";
owner = "archiecobbs";
};
patches = [
# from upstream, after latest release
# https://github.com/archiecobbs/s3backer/commit/303a669356fa7cd6bc95ac7076ce51b1cab3970a
./fix-darwin-builds.patch
];
nativeBuildInputs = [ autoreconfHook pkg-config ];
buildInputs = [ fuse curl expat ];
@ -22,11 +28,6 @@ stdenv.mkDerivation rec {
'AC_CHECK_DECLS(fdatasync)' ""
'';
autoreconfPhase = ''
patchShebangs ./autogen.sh
./autogen.sh
'';
meta = with lib; {
homepage = "https://github.com/archiecobbs/s3backer";
description = "FUSE-based single file backing store via Amazon S3";

View File

@ -0,0 +1,25 @@
From 303a669356fa7cd6bc95ac7076ce51b1cab3970a Mon Sep 17 00:00:00 2001
From: Adrian Ho <the.gromgit@gmail.com>
Date: Tue, 6 Sep 2022 10:49:10 +0800
Subject: [PATCH] Enable macOS builds
macOS requires explicit `environ` declaration.
---
s3backer.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/s3backer.h b/s3backer.h
index ccc9053..383e246 100644
--- a/s3backer.h
+++ b/s3backer.h
@@ -90,6 +90,10 @@
#include <zlib.h>
#include <fuse.h>
+#ifdef __APPLE__
+extern char **environ;
+#endif
+
#ifndef FUSE_OPT_KEY_DISCARD
#define FUSE_OPT_KEY_DISCARD -4
#endif