15 inherit (stdenv.hostPlatform) isx86;
17 stdenv.mkDerivation rec {
21 src = fetchFromGitHub {
25 sha256 = "sha256-Mb324ojtLV0S10KhL7Vjf3DhSOtCy1pFMTzvLkTnpXM=";
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"
40 ] ++ lib.optionals isx86 [ nasm ];
49 configureFlags = lib.optionals (!isx86) [
54 homepage = "http://ck.kolivas.org/apps/lrzip/";
55 description = "CK LRZIP compression program (LZMA + RZIP)";
57 license = licenses.gpl2Plus;
58 platforms = platforms.unix;