vuls: init at 0.27.0 (#348530)
[NixPkgs.git] / pkgs / by-name / li / libs3 / package.nix
blob03519d6c4f7869b2addeed6e80d4b0cf141afa9c
2   curl,
3   fetchFromGitHub,
4   fetchpatch,
5   lib,
6   libxml2,
7   pkg-config,
8   stdenv,
9 }:
11 stdenv.mkDerivation {
12   pname = "libs3";
13   version = "unstable-2019-04-10";
15   src = fetchFromGitHub {
16     owner = "bji";
17     repo = "libs3";
18     rev = "287e4bee6fd430ffb52604049de80a27a77ff6b4";
19     hash = "sha256-xgiY8oJlRMiXB1fw5dhNidfaq18YVwaJ8aErKU11O6U=";
20   };
22   patches = [
23     (fetchpatch {
24       # Fix compilation with openssl 3.0
25       url = "https://github.com/bji/libs3/pull/112/commits/3c3a1cf915e62b730db854d8007ba835cb38677c.patch";
26       hash = "sha256-+rWRh8dOznHlamc/T9qbgN0E2Rww3Hn94UeErxNDccs=";
27     })
28   ];
30   postPatch = ''
31     substituteInPlace GNUmakefile \
32       --replace-fail curl-config "$PKG_CONFIG libcurl" \
33       --replace-fail xml2-config "$PKG_CONFIG libxml-2.0"
34   '';
36   makeFlags = [ "DESTDIR=${placeholder "out"}" ];
38   strictDeps = true;
40   nativeBuildInputs = [ pkg-config ];
42   buildInputs = [
43     curl
44     libxml2
45   ];
47   meta = {
48     description = "Library for interfacing with amazon s3";
49     homepage = "https://github.com/bji/libs3";
50     license = lib.licenses.lgpl3Plus;
51     mainProgram = "s3";
52     platforms = lib.platforms.linux;
53   };