2024-09-19 14:19:46 +00:00
|
|
|
{
|
|
|
|
curl,
|
|
|
|
fetchFromGitHub,
|
|
|
|
fetchpatch,
|
|
|
|
lib,
|
|
|
|
libxml2,
|
|
|
|
pkg-config,
|
|
|
|
stdenv,
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2021-07-21 07:28:18 +00:00
|
|
|
pname = "libs3";
|
2022-09-14 18:05:37 +00:00
|
|
|
version = "unstable-2019-04-10";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bji";
|
|
|
|
repo = "libs3";
|
2022-09-14 18:05:37 +00:00
|
|
|
rev = "287e4bee6fd430ffb52604049de80a27a77ff6b4";
|
|
|
|
hash = "sha256-xgiY8oJlRMiXB1fw5dhNidfaq18YVwaJ8aErKU11O6U=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-09-14 18:05:37 +00:00
|
|
|
patches = [
|
2024-09-19 14:19:46 +00:00
|
|
|
(fetchpatch {
|
|
|
|
# Fix compilation with openssl 3.0
|
2022-09-14 18:05:37 +00:00
|
|
|
url = "https://github.com/bji/libs3/pull/112/commits/3c3a1cf915e62b730db854d8007ba835cb38677c.patch";
|
|
|
|
hash = "sha256-+rWRh8dOznHlamc/T9qbgN0E2Rww3Hn94UeErxNDccs=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace GNUmakefile \
|
|
|
|
--replace-fail curl-config "$PKG_CONFIG libcurl" \
|
|
|
|
--replace-fail xml2-config "$PKG_CONFIG libxml-2.0"
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-09-14 18:05:37 +00:00
|
|
|
makeFlags = [ "DESTDIR=${placeholder "out"}" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
strictDeps = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
curl
|
|
|
|
libxml2
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Library for interfacing with amazon s3";
|
2024-09-19 14:19:46 +00:00
|
|
|
homepage = "https://github.com/bji/libs3";
|
|
|
|
license = lib.licenses.lgpl3Plus;
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "s3";
|
2024-09-19 14:19:46 +00:00
|
|
|
platforms = lib.platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|