lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at 22.05-pre 65 lines 2.1 kB view raw
1{ 2 fetchFromGitHub, lib, stdenv, pkg-config, autoreconfHook, 3 acl, attr, bzip2, e2fsprogs, libxml2, lzo, openssl, sharutils, xz, zlib, zstd, 4 5 # Optional but increases closure only negligibly. Also, while libxml2 6 # builds fine on windows, but libarchive has trouble linking windows 7 # things it depends on for some reason. 8 xarSupport ? stdenv.hostPlatform.isUnix, 9}: 10 11assert xarSupport -> libxml2 != null; 12 13stdenv.mkDerivation rec { 14 pname = "libarchive"; 15 version = "3.5.2"; 16 17 src = fetchFromGitHub { 18 owner = "libarchive"; 19 repo = "libarchive"; 20 rev = "v${version}"; 21 sha256 = "sha256-H00UJ+ON1kBc19BgWBBKmO8f23oAg2mk7o9hhDhn50Q="; 22 }; 23 24 outputs = [ "out" "lib" "dev" ]; 25 26 nativeBuildInputs = [ pkg-config autoreconfHook ]; 27 buildInputs = 28 lib.optional stdenv.hostPlatform.isUnix sharutils 29 ++ [ zlib bzip2 openssl xz lzo zstd ] 30 ++ lib.optionals stdenv.isLinux [ e2fsprogs attr acl ] 31 ++ lib.optional xarSupport libxml2; 32 33 # Without this, pkg-config-based dependencies are unhappy 34 propagatedBuildInputs = lib.optionals stdenv.isLinux [ attr acl ]; 35 36 configureFlags = lib.optional (!xarSupport) "--without-xml2"; 37 38 preBuild = if stdenv.isCygwin then '' 39 echo "#include <windows.h>" >> config.h 40 '' else null; 41 42 doCheck = false; # fails 43 44 preFixup = '' 45 sed -i $lib/lib/libarchive.la \ 46 -e 's|-lcrypto|-L${openssl.out}/lib -lcrypto|' \ 47 -e 's|-llzo2|-L${lzo}/lib -llzo2|' 48 ''; 49 50 enableParallelBuilding = true; 51 52 meta = { 53 description = "Multi-format archive and compression library"; 54 longDescription = '' 55 This library has code for detecting and reading many archive formats and 56 compressions formats including (but not limited to) tar, shar, cpio, zip, and 57 compressed with gzip, bzip2, lzma, xz, ... 58 ''; 59 homepage = "http://libarchive.org"; 60 changelog = "https://github.com/libarchive/libarchive/releases/tag/v${version}"; 61 license = lib.licenses.bsd3; 62 platforms = with lib.platforms; all; 63 maintainers = with lib.maintainers; [ jcumming ]; 64 }; 65}