git.iko.soy/typeable/nixpkgs
on master help sign in
zstd: init at 0.4.7
fa247faTobias Geerinckx-Rice
pkgs/tools/compression/zstd/default.nixnew file+45
@@ -0,0 +1,45 @@
1+{ stdenv, fetchFromGitHub
2+, legacySupport ? false }:
3+
4+stdenv.mkDerivation rec {
5+ name = "zstd-${version}";
6+ version = "0.4.7";
7+
8+ src = fetchFromGitHub {
9+ sha256 = "09l917979qfqk44dbgsa9vs37a2qj4ga43553zcgvnps02wlja8s";
10+ rev = "v${version}";
11+ repo = "zstd";
12+ owner = "Cyan4973";
13+ };
14+
15+ # The Makefiles don't properly use file targets, but blindly rebuild
16+ # all dependencies on every make invocation. So no nice phases. :-(
17+ phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
18+
19+ makeFlags = [
20+ "ZSTD_LEGACY_SUPPORT=${if legacySupport then "1" else "0"}"
21+ ];
22+
23+ installFlags = [
24+ "PREFIX=$(out)"
25+ ];
26+
27+ meta = with stdenv.lib; {
28+ description = "Zstandard real-time compression algorithm";
29+ longDescription = ''
30+ Zstd, short for Zstandard, is a fast lossless compression algorithm,
31+ targeting real-time compression scenarios at zlib-level compression
32+ ratio. Zstd can also offer stronger compression ratio at the cost of
33+ compression speed. Speed/ratio trade-off is configurable by small
34+ increment, to fit different situations. Note however that decompression
35+ speed is preserved and remain roughly the same at all settings, a
36+ property shared by most LZ compression algorithms, such as zlib.
37+ '';
38+ homepage = http://www.zstd.net/;
39+ # The licence of the CLI programme is GPLv2+, that of the library BSD-2.
40+ license = with licenses; [ gpl2Plus bsd2 ];
41+
42+ platforms = platforms.linux;
43+ maintainers = with maintainers; [ nckx ];
44+ };
45+}
pkgs/top-level/all-packages.nix+2
@@ -3759,6 +3759,8 @@ let
3759
3759
3760 zsh-navigation-tools = callPackage ../tools/misc/zsh-navigation-tools { };
3760 zsh-navigation-tools = callPackage ../tools/misc/zsh-navigation-tools { };
3761
3761
3762+ zstd = callPackage ../tools/compression/zstd { };
3763+
3762 zsync = callPackage ../tools/compression/zsync { };
3764 zsync = callPackage ../tools/compression/zsync { };
3763
3765
3764 zxing = callPackage ../tools/graphics/zxing {};
3766 zxing = callPackage ../tools/graphics/zxing {};