diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-01-10 07:13:44 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-01-12 14:07:16 +0000 |
commit | e2698550456abba83c6dcd5d5e5a9990a0b96f8a (patch) | |
tree | 79a56f0df3fa55e470d84b4dff6059fbf487ec18 /nixpkgs/pkgs/tools/compression | |
parent | 1cdc42df888dc98c347e03bd942ed9825a55bcb3 (diff) | |
parent | 84d74ae9c9cbed73274b8e4e00be14688ffc93fe (diff) | |
download | nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar.gz nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar.bz2 nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar.lz nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar.xz nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar.zst nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.zip |
Merge commit '84d74ae9c9cbed73274b8e4e00be14688ffc93fe'
Diffstat (limited to 'nixpkgs/pkgs/tools/compression')
-rw-r--r-- | nixpkgs/pkgs/tools/compression/brotli/default.nix | 3 | ||||
-rw-r--r-- | nixpkgs/pkgs/tools/compression/bzip2/1_1.nix | 45 | ||||
-rw-r--r-- | nixpkgs/pkgs/tools/compression/lzfse/default.nix | 14 | ||||
-rw-r--r-- | nixpkgs/pkgs/tools/compression/pixz/default.nix | 4 | ||||
-rw-r--r-- | nixpkgs/pkgs/tools/compression/zstd/default.nix | 25 |
5 files changed, 74 insertions, 17 deletions
diff --git a/nixpkgs/pkgs/tools/compression/brotli/default.nix b/nixpkgs/pkgs/tools/compression/brotli/default.nix index 229c6c8b8e4e..bf20e0119ec6 100644 --- a/nixpkgs/pkgs/tools/compression/brotli/default.nix +++ b/nixpkgs/pkgs/tools/compression/brotli/default.nix @@ -16,7 +16,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; patches = stdenv.lib.optional staticOnly (fetchpatch { - url = "https://github.com/google/brotli/pull/655/commits/7289e5a378ba13801996a84d89d8fe95c3fc4c11.patch"; + # from https://github.com/google/brotli/pull/655 + url = "https://github.com/google/brotli/commit/7289e5a378ba13801996a84d89d8fe95c3fc4c11.patch"; sha256 = "1bghbdvj24jrvb0sqfdif9vwg7wx6pn8dvl6flkrcjkhpj0gi0jg"; }); diff --git a/nixpkgs/pkgs/tools/compression/bzip2/1_1.nix b/nixpkgs/pkgs/tools/compression/bzip2/1_1.nix new file mode 100644 index 000000000000..3f6105ca507b --- /dev/null +++ b/nixpkgs/pkgs/tools/compression/bzip2/1_1.nix @@ -0,0 +1,45 @@ +{ stdenv +, fetchFromGitLab +, meson +, python3 +, ninja +}: + +stdenv.mkDerivation rec { + pname = "bzip2-unstable"; + version = "2020-08-11"; + + src = fetchFromGitLab { + owner = "federicomenaquintero"; + repo = "bzip2"; + rev = "15255b553e7c095fb7a26d4dc5819a11352ebba1"; + sha256 = "sha256-BAyz35D62LWi47B/gNcCSKpdaECHBGSpt21vtnk3fKs="; + }; + + postPatch = '' + patchShebangs install_links.py + ''; + + nativeBuildInputs = [ + meson + python3 + ninja + ]; + + outputs = [ "bin" "dev" "out" "man" ]; + + mesonFlags = [ + "-Ddocs=disabled" + ]; + + strictDeps = true; + + enableParallelBuilding = true; + + meta = with stdenv.lib; { + description = "High-quality data compression program"; + license = licenses.bsdOriginal; + platforms = platforms.all; + maintainers = []; + }; +} diff --git a/nixpkgs/pkgs/tools/compression/lzfse/default.nix b/nixpkgs/pkgs/tools/compression/lzfse/default.nix index 72560c1d9ae2..bd97620dba66 100644 --- a/nixpkgs/pkgs/tools/compression/lzfse/default.nix +++ b/nixpkgs/pkgs/tools/compression/lzfse/default.nix @@ -1,19 +1,17 @@ -{ stdenv, fetchFromGitHub }: +{ stdenv, fetchFromGitHub, cmake }: -stdenv.mkDerivation { +stdenv.mkDerivation rec { pname = "lzfse"; - version = "2017-03-08"; + version = "1.0"; src = fetchFromGitHub { owner = "lzfse"; repo = "lzfse"; - rev = "88e2d27"; + rev = "lzfse-${version}"; sha256 = "1mfh6y6vpvxsdwmqmfbkqkwvxc0pz2dqqc72c6fk9sbsrxxaghd5"; }; - makeFlags = [ "INSTALL_PREFIX=$(out)" ]; - - enableParallelBuilding = false; #bug + nativeBuildInputs = [ cmake ]; meta = with stdenv.lib; { homepage = "https://github.com/lzfse/lzfse"; @@ -23,7 +21,7 @@ stdenv.mkDerivation { LZFSE is a Lempel-Ziv style data compression algorithm using Finite State Entropy coding. It targets similar compression rates at higher compression and decompression speed compared to deflate using zlib. ''; - platforms = platforms.linux; + platforms = platforms.unix; license = licenses.bsd3; maintainers = with maintainers; [ ]; }; diff --git a/nixpkgs/pkgs/tools/compression/pixz/default.nix b/nixpkgs/pkgs/tools/compression/pixz/default.nix index 7eca80f8400c..c7b4b46328d7 100644 --- a/nixpkgs/pkgs/tools/compression/pixz/default.nix +++ b/nixpkgs/pkgs/tools/compression/pixz/default.nix @@ -5,7 +5,7 @@ }: stdenv.mkDerivation rec { baseName = "pixz"; - version = "1.0.6"; + version = "1.0.7"; name = "${baseName}-${version}"; nativeBuildInputs = [ pkgconfig ]; @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { owner = "vasi"; repo = baseName; rev = "v${version}"; - sha256 = "0q61wqg2yxrgd4nc7256mf7izp92is29ll3rax1cxr6fj9jrd8b7"; + sha256 = "163axxs22w7pghr786hda22mnlpvmi50hzhfr9axwyyjl9n41qs2"; }; preConfigure = '' ./autogen.sh diff --git a/nixpkgs/pkgs/tools/compression/zstd/default.nix b/nixpkgs/pkgs/tools/compression/zstd/default.nix index f919fb92ed1d..8ce434741a55 100644 --- a/nixpkgs/pkgs/tools/compression/zstd/default.nix +++ b/nixpkgs/pkgs/tools/compression/zstd/default.nix @@ -1,8 +1,9 @@ -{ stdenv, fetchFromGitHub, fetchpatch, cmake, gnugrep +{ stdenv, fetchFromGitHub, fetchpatch, cmake, bash, gnugrep , fixDarwinDylibNames , file , legacySupport ? false -, enableShared ? true }: +, static ? false +}: stdenv.mkDerivation rec { pname = "zstd"; @@ -17,6 +18,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ] ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; + buildInputs = [ bash ]; patches = [ ./playtests-darwin.patch @@ -28,9 +30,20 @@ stdenv.mkDerivation rec { # work fine, and I'm not sure how to write the condition. ++ stdenv.lib.optional stdenv.hostPlatform.isWindows ./mcfgthreads-no-pthread.patch; + postPatch = stdenv.lib.optionalString (!static) '' + substituteInPlace build/cmake/CMakeLists.txt \ + --replace 'message(SEND_ERROR "You need to build static library to build tests")' "" + substituteInPlace build/cmake/tests/CMakeLists.txt \ + --replace 'libzstd_static' 'libzstd_shared' + sed -i \ + "1aexport ${stdenv.lib.optionalString stdenv.isDarwin "DY"}LD_LIBRARY_PATH=$PWD/build_/lib" \ + tests/playTests.sh + ''; + cmakeFlags = [ - "-DZSTD_BUILD_SHARED:BOOL=${if enableShared then "ON" else "OFF"}" - # They require STATIC for bin/zstd and tests. + "-DZSTD_BUILD_SHARED:BOOL=${if (!static) then "ON" else "OFF"}" + "-DZSTD_BUILD_STATIC:BOOL=${if static then "ON" else "OFF"}" + "-DZSTD_PROGRAMS_LINK_SHARED:BOOL=${if (!static) then "ON" else "OFF"}" "-DZSTD_LEGACY_SUPPORT:BOOL=${if legacySupport then "ON" else "OFF"}" "-DZSTD_BUILD_TESTS:BOOL=ON" ]; @@ -44,6 +57,8 @@ stdenv.mkDerivation rec { doCheck = true; checkPhase = '' runHook preCheck + # Patch shebangs for playTests + patchShebangs ../programs/zstdgrep ctest -R playTests # The only relatively fast test. runHook postCheck ''; @@ -56,8 +71,6 @@ stdenv.mkDerivation rec { substituteInPlace ../programs/zstdless \ --replace "zstdcat" "$bin/bin/zstdcat" ''; - # Don't duplicate the library code in runtime closures. - postInstall = stdenv.lib.optionalString enableShared ''rm "$out"/lib/libzstd.a''; outputs = [ "bin" "dev" "man" "out" ]; |