diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2021-11-20 18:01:07 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-20 18:01:07 +0000 |
commit | f515d91189c208e5e3ca47687d3bceed2a2fec49 (patch) | |
tree | 3ce84d5f4562f07ac698189164c1a432fc757cfd /pkgs/tools | |
parent | 2d03d542c7c0ffbf359b9cb199bdcb9bc038f099 (diff) | |
parent | 4dba55aec572febbf2b0e660b4de4007e0a30a60 (diff) |
Merge master into staging-next
Diffstat (limited to 'pkgs/tools')
-rw-r--r-- | pkgs/tools/compression/lrzip/default.nix | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/pkgs/tools/compression/lrzip/default.nix b/pkgs/tools/compression/lrzip/default.nix index 02f62c3e3c01..4fe5512b4c6f 100644 --- a/pkgs/tools/compression/lrzip/default.nix +++ b/pkgs/tools/compression/lrzip/default.nix @@ -1,17 +1,33 @@ -{ lib, stdenv, fetchurl, zlib, lzo, bzip2, lz4, nasm, perl }: +{ lib, stdenv, fetchFromGitHub, autoreconfHook, zlib, lzo, bzip2, lz4, nasm, perl }: +let + inherit (stdenv.hostPlatform) isx86; +in stdenv.mkDerivation rec { pname = "lrzip"; version = "0.641"; - src = fetchurl { - url = "http://ck.kolivas.org/apps/lrzip/${pname}-${version}.tar.xz"; - sha256 = "0ziyanspd96dc3lp2qdcylc7aq8dhb511jhqrhxvlp502fjqjqrc"; + src = fetchFromGitHub { + owner = "ckolivas"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-253CH6TiHWyr13C76y9PXjyB7gj2Bhd2VRgJ5r+cm/g="; }; - buildInputs = [ zlib lzo bzip2 lz4 nasm perl ]; + postPatch = lib.optionalString stdenv.isDarwin '' + # Building the ASM/x86 directory creates an empty archive, + # which fails on darwin, so remove it + # https://github.com/ckolivas/lrzip/issues/193 + # https://github.com/Homebrew/homebrew-core/pull/85360 + substituteInPlace lzma/Makefile.am --replace "SUBDIRS = C ASM/x86" "SUBDIRS = C" + substituteInPlace configure.ac --replace "-f elf64" "-f macho64" + ''; - configureFlags = [ + nativeBuildInputs = [ autoreconfHook perl ] ++ lib.optionals isx86 [ nasm ]; + + buildInputs = [ zlib lzo bzip2 lz4 ]; + + configureFlags = lib.optionals (!isx86) [ "--disable-asm" ]; |