nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 61 lines 1.3 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 autoreconfHook, 6 zlib, 7 lzo, 8 bzip2, 9 lz4, 10 nasm, 11 perl, 12}: 13 14let 15 inherit (stdenv.hostPlatform) isx86; 16in 17stdenv.mkDerivation (finalAttrs: { 18 pname = "lrzip"; 19 version = "0.651"; 20 21 src = fetchFromGitHub { 22 owner = "ckolivas"; 23 repo = "lrzip"; 24 rev = "v${finalAttrs.version}"; 25 sha256 = "sha256-Mb324ojtLV0S10KhL7Vjf3DhSOtCy1pFMTzvLkTnpXM="; 26 }; 27 28 postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' 29 # Building the ASM/x86 directory creates an empty archive, 30 # which fails on darwin, so remove it 31 # https://github.com/ckolivas/lrzip/issues/193 32 # https://github.com/Homebrew/homebrew-core/pull/85360 33 substituteInPlace lzma/Makefile.am --replace "SUBDIRS = C ASM/x86" "SUBDIRS = C" 34 substituteInPlace configure.ac --replace "-f elf64" "-f macho64" 35 ''; 36 37 nativeBuildInputs = [ 38 autoreconfHook 39 perl 40 ] 41 ++ lib.optionals isx86 [ nasm ]; 42 43 buildInputs = [ 44 zlib 45 lzo 46 bzip2 47 lz4 48 ]; 49 50 configureFlags = lib.optionals (!isx86) [ 51 "--disable-asm" 52 ]; 53 54 meta = { 55 homepage = "http://ck.kolivas.org/apps/lrzip/"; 56 description = "CK LRZIP compression program (LZMA + RZIP)"; 57 maintainers = [ ]; 58 license = lib.licenses.gpl2Plus; 59 platforms = lib.platforms.unix; 60 }; 61})