Skip to content
Closed
8 changes: 2 additions & 6 deletions pkgs/tools/compression/brotli/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
src = fetchFromGitHub {
owner = "google";
repo = "brotli";
rev = "v" + version;
rev = "v${version}";
sha256 = "z6Dhrabav1MDQ4rAcXaDv0aN+qOoh9cvoXZqEWBB13c=";
};

Expand All @@ -22,8 +22,7 @@ stdenv.mkDerivation rec {
sha256 = "sOeXNVsCaBSD9i82GRUDrkyreGeQ7qaJWjjy/uLL0/0=";
});

cmakeFlags = []
++ stdenv.lib.optional staticOnly "-DBUILD_SHARED_LIBS=OFF";
cmakeFlags = stdenv.lib.optional staticOnly "-DBUILD_SHARED_LIBS=OFF";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cmakeFlags = stdenv.lib.optional staticOnly "-DBUILD_SHARED_LIBS=OFF";
cmakeFlags = lib.optional staticOnly "-DBUILD_SHARED_LIBS=OFF";


outputs = [ "out" "dev" "lib" ];

Expand Down Expand Up @@ -52,9 +51,7 @@ stdenv.mkDerivation rec {

meta = with stdenv.lib; {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
meta = with stdenv.lib; {
meta = with lib; {

inherit (src.meta) homepage;

description = "A generic-purpose lossless compression algorithm and tool";

longDescription =
'' Brotli is a generic-purpose lossless compression algorithm that
compresses data using a combination of a modern variant of the LZ77
Expand All @@ -67,7 +64,6 @@ stdenv.mkDerivation rec {
in the following internet draft:
http://www.ietf.org/id/draft-alakuijala-brotli
'';

license = licenses.mit;
maintainers = with maintainers; [ freezeboy ];
platforms = platforms.all;
Expand Down
17 changes: 8 additions & 9 deletions pkgs/tools/compression/bsc/default.nix
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
{ stdenv, fetchurl, openmp ? null }:
{ stdenv, fetchFromGitHub, openmp ? null }:

stdenv.mkDerivation rec {
pname = "bsc";
version = "3.1.0";

src = fetchurl {
url = "https://github.com/IlyaGrebnov/libbsc/archive/${version}.tar.gz";
sha256 = "01yhizaf6qjv1plyrx0fcib264maa5qwvgfvvid9rzlzj9fxjib6";
src = fetchFromGitHub {
owner = "IlyaGrebnov";
repo = "libbsc";
rev = version;
sha256 = "0c0jmirh9y23kyi1jnrm13sa3xsjn54jazfr84ag45pai279fciz";
};

enableParallelBuilding = true;

buildInputs = stdenv.lib.optional stdenv.isDarwin openmp;

prePatch = ''
substituteInPlace makefile \
--replace 'g++' '$(CXX)'
substituteInPlace makefile --replace 'g++' '$(CXX)'
'';

preInstall = ''
makeFlagsArray+=("PREFIX=$out")
'';
makeFlags = [ "PREFIX=$(out)" ];

meta = with stdenv.lib; {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
meta = with stdenv.lib; {
meta = with lib; {

description = "High performance block-sorting data compression library";
Expand Down
20 changes: 8 additions & 12 deletions pkgs/tools/compression/bsdiff/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ stdenv.mkDerivation rec {
version = "4.3";

src = fetchurl {
url = "https://www.daemonology.net/bsdiff/${pname}-${version}.tar.gz";
url = "https://www.daemonology.net/bsdiff/${pname}-${version}.tar.gz";
sha256 = "0j2zm3z271x5aw63mwhr3vymzn45p2vvrlrpm9cz2nywna41b0hq";
};

buildInputs = [ bzip2 ];
patches = [ ./include-systypes.patch ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When and why was this patch added and why is it not needed anymore?


buildPhase = ''
$CC -O3 -lbz2 bspatch.c -o bspatch
Expand All @@ -20,18 +19,15 @@ stdenv.mkDerivation rec {
installPhase = ''
mkdir -p $out/bin
mkdir -p $out/share/man/man1

cp bsdiff $out/bin
cp bspatch $out/bin
cp bsdiff.1 $out/share/man/man1
cp bspatch.1 $out/share/man/man1
cp {bsdiff,bspatch} $out/bin
cp {bsdiff.1,bspatch.1} $out/share/man/man1
'';

meta = {
meta = with stdenv.lib; {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
meta = with stdenv.lib; {
meta = with lib; {

description = "An efficient binary diff/patch tool";
homepage = "http://www.daemonology.net/bsdiff";
license = stdenv.lib.licenses.bsd2;
platforms = stdenv.lib.platforms.unix;
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
homepage = "http://www.daemonology.net/bsdiff";
license = licenses.bsd2;
platforms = platforms.unix;
maintainers = [ maintainers.thoughtpolice ];
};
}
12 changes: 0 additions & 12 deletions pkgs/tools/compression/bsdiff/include-systypes.patch

This file was deleted.

48 changes: 25 additions & 23 deletions pkgs/tools/compression/dejsonlz4/default.nix
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
{ stdenv, fetchFromGitHub }:

stdenv.mkDerivation rec {
pname = "dejsonlz4";
version = "1.1";
src = fetchFromGitHub {
owner = "avih";
repo = pname;
rev = "v${version}";
sha256 = "0ggs69qamaama5mid07mhp95m1x42wljdb953lrwfr7p8p6f8czh";
};
pname = "dejsonlz4";
version = "1.1";

src = fetchFromGitHub {
owner = "avih";
repo = pname;
rev = "v${version}";
sha256 = "0ggs69qamaama5mid07mhp95m1x42wljdb953lrwfr7p8p6f8czh";
};

buildPhase = ''
gcc -Wall -o dejsonlz4 src/dejsonlz4.c src/lz4.c
'';
buildPhase = ''
gcc -Wall -o dejsonlz4 src/dejsonlz4.c src/lz4.c
'';

installPhase = ''
mkdir -p $out/bin/
cp dejsonlz4 $out/bin/
'';
installPhase = ''
mkdir -p $out/bin/
cp dejsonlz4 $out/bin/
'';

meta = with stdenv.lib; {
description = "Decompress Mozilla Firefox bookmarks backup files";
homepage = "https://github.com/avih/dejsonlz4";
license = licenses.bsd2;
maintainers = with maintainers; [ mt-caret ];
platforms = platforms.linux;
};
}
meta = with stdenv.lib; {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
meta = with stdenv.lib; {
meta = with lib; {

description = "Decompress Mozilla Firefox bookmarks backup files";
homepage = "https://github.com/avih/dejsonlz4";
license = licenses.bsd2;
maintainers = with maintainers; [ mt-caret ];
platforms = platforms.linux;
};
}
11 changes: 6 additions & 5 deletions pkgs/tools/compression/gzrt/default.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{ stdenv, fetchurl, zlib }:

stdenv.mkDerivation rec {
name = "gzrt-0.8";
pname = "gzrt";
version = "0.8";

src = fetchurl {
url = "https://www.urbanophile.com/arenn/coding/gzrt/${name}.tar.gz";
url = "https://www.urbanophile.com/arenn/coding/gzrt/gzrt-${version}.tar.gz";
sha256 = "1vhzazj47xfpbfhzkwalz27cc0n5gazddmj3kynhk0yxv99xrdxh";
};

Expand All @@ -15,10 +16,10 @@ stdenv.mkDerivation rec {
cp gzrecover $out/bin
'';

meta = {
meta = with stdenv.lib; {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
meta = with stdenv.lib; {
meta = with lib; {

homepage = "https://www.urbanophile.com/arenn/hacking/gzrt/";
description = "The gzip Recovery Toolkit";
license = stdenv.lib.licenses.gpl2Plus;
platforms = stdenv.lib.platforms.unix;
license = licenses.gpl2Plus;
platforms = platforms.unix;
};
}
26 changes: 13 additions & 13 deletions pkgs/tools/compression/kzipmix/default.nix
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
{stdenv, fetchurl}:
{ stdenv, fetchurl, autoPatchelfHook }:

stdenv.mkDerivation {
name = "kzipmix-20091108";
stdenv.mkDerivation rec {
pname = "kzipmix";
version = "20200115";

src = fetchurl {
url = "http://static.jonof.id.au/dl/kenutils/kzipmix-20091108-linux.tar.gz";
sha256 = "19gyn8pblffdz1bf3xkbpzx8a8wn3xb0v411pqzmz5g5l6pm5gph";
url = "https://www.jonof.id.au/files/kenutils/kzipmix-${version}-linux.tar.gz";
sha256 = "086z8jzl56dk0hwgaj3vwy6n924xrgvwayiwvzwl1z7s81xk5y3q";
};

nativeBuildInputs = [ autoPatchelfHook ];

installPhase = ''
mkdir -p $out/bin
cp kzip zipmix $out/bin

patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 $out/bin/kzip
patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 $out/bin/zipmix
cp amd64/{kzip,zipmix} $out/bin
'';

meta = {
meta = with stdenv.lib; {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
meta = with stdenv.lib; {
meta = with lib; {

description = "A tool that aggressively optimizes the sizes of Zip archives";
license = stdenv.lib.licenses.unfree;
homepage = "http://advsys.net/ken/utils.htm";
maintainers = [ stdenv.lib.maintainers.sander ];
homepage = "https://www.jonof.id.au/kenutils.html";
license = licenses.unfree;
maintainers = [ maintainers.sander ];
};
}
4 changes: 2 additions & 2 deletions pkgs/tools/compression/lbzip2/default.nix
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{ stdenv, fetchFromGitHub, gnulib, perl, autoconf, automake }:

stdenv.mkDerivation rec {
pname = "lbzip2";
version = "2.5";
name = "lbzip2-${version}";

src = fetchFromGitHub {
owner = "kjn";
repo = "lbzip2";
sha256 = "1h321wva6fp6khz6x0i6rqb76xh327nw6v5jhgjpcckwdarj5jv8";
rev = "v${version}";
sha256 = "1h321wva6fp6khz6x0i6rqb76xh327nw6v5jhgjpcckwdarj5jv8";
};

buildInputs = [ gnulib perl ];
Expand Down
19 changes: 11 additions & 8 deletions pkgs/tools/compression/lhasa/default.nix
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
{stdenv, fetchurl}:
{ stdenv, fetchurl }:

stdenv.mkDerivation rec {
pname = "lhasa";
version = "0.3.1";

stdenv.mkDerivation {
name = "lhasa-0.3.1";
src = fetchurl {
url = "https://soulsphere.org/projects/lhasa/lhasa-0.3.1.tar.gz";
url = "https://soulsphere.org/projects/lhasa/lhasa-${version}.tar.gz";
sha256 = "092zi9av18ma20c6h9448k0bapvx2plnp292741dvfd9hmgqxc1z";
};
meta = {

meta = with stdenv.lib; {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
meta = with stdenv.lib; {
meta = with lib; {

description = "Free Software replacement for the Unix LHA tool";
longDescription = ''
Lhasa is a Free Software replacement for the Unix LHA tool, for
decompressing .lzh (LHA / LHarc) and .lzs (LArc) archives. The backend for
the tool is a library, so that it can be reused for other purposes.
'';
license = stdenv.lib.licenses.isc;
license = licenses.isc;
homepage = "http://fragglet.github.io/lhasa";
maintainers = with stdenv.lib; [ maintainers.sander ];
platforms = with stdenv.lib.platforms; linux ++ darwin;
maintainers = [ maintainers.sander ];
platforms = platforms.unix;
};
}
12 changes: 6 additions & 6 deletions pkgs/tools/compression/lrzip/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{stdenv, fetchurl, zlib, lzo, bzip2, nasm, perl}:
{ stdenv, fetchurl, zlib, lzo, bzip2, nasm, perl }:

stdenv.mkDerivation rec {
version = "0.631";
Expand All @@ -9,13 +9,13 @@ stdenv.mkDerivation rec {
sha256 = "0mb449vmmwpkalq732jdyginvql57nxyd31sszb108yps1lf448d";
};

buildInputs = [ zlib lzo bzip2 nasm perl ];
nativeBuildInputs = [ nasm perl ];
buildInputs = [ zlib lzo bzip2 ];

meta = {
meta = with stdenv.lib; {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
meta = with stdenv.lib; {
meta = with lib; {

homepage = "http://ck.kolivas.org/apps/lrzip/";
description = "The CK LRZIP compression program (LZMA + RZIP)";
license = stdenv.lib.licenses.gpl2Plus;
inherit version;
platforms = stdenv.lib.platforms.unix;
license = licenses.gpl2Plus;
platforms = platforms.unix;
};
}
8 changes: 0 additions & 8 deletions pkgs/tools/compression/lrzip/default.upstream

This file was deleted.

8 changes: 5 additions & 3 deletions pkgs/tools/compression/lzop/default.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{stdenv, fetchurl, lzo}:
{ stdenv, fetchurl, lzo }:

stdenv.mkDerivation rec {
name = "lzop-1.04";
pname = "lzop";
version = "1.04";

src = fetchurl {
url = "https://www.lzop.org/download/${name}.tar.gz";
url = "https://www.lzop.org/download/lzop-${version}.tar.gz";
sha256 = "0h9gb8q7y54m9mvy3jvsmxf21yx8fc3ylzh418hgbbv0i8mbcwky";
};

Expand Down
26 changes: 11 additions & 15 deletions pkgs/tools/compression/pigz/default.nix
Original file line number Diff line number Diff line change
@@ -1,31 +1,27 @@
{ stdenv, fetchurl, zlib, util-linux }:
{ stdenv, fetchurl, zlib, utillinux }:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


let name = "pigz";
version = "2.4";
in
stdenv.mkDerivation {
name = name + "-" + version;
stdenv.mkDerivation rec {
pname = "pigz";
version = "2.4";

src = fetchurl {
url = "https://www.zlib.net/${name}/${name}-${version}.tar.gz";
url = "https://www.zlib.net/pigz/pigz-${version}.tar.gz";
sha256 = "0wsgw5vwl23jrnpsvd8v3xcp5k4waw5mk0164fynjhkv58i1dy54";
};

enableParallelBuilding = true;

buildInputs = [zlib] ++ stdenv.lib.optional stdenv.isLinux util-linux;
buildInputs = [ zlib ] ++ stdenv.lib.optional stdenv.isLinux utillinux;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
buildInputs = [ zlib ] ++ stdenv.lib.optional stdenv.isLinux utillinux;
buildInputs = [ zlib ] ++ lib.optional stdenv.isLinux utillinux;


makeFlags = [ "CC=${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc" ];

doCheck = stdenv.isLinux;
checkTarget = "tests";
installPhase =
''
install -Dm755 pigz "$out/bin/pigz"
ln -s pigz "$out/bin/unpigz"
install -Dm755 pigz.1 "$out/share/man/man1/pigz.1"
ln -s pigz.1 "$out/share/man/man1/unpigz.1"
install -Dm755 pigz.pdf "$out/share/doc/pigz/pigz.pdf"

installPhase = ''
install -Dm755 pigz "$out/bin/pigz"
install -Dm755 pigz.1 "$out/share/man/man1/pigz.1"
install -Dm755 pigz.pdf "$out/share/doc/pigz/pigz.pdf"
'';

meta = with stdenv.lib; {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
meta = with stdenv.lib; {
meta = with lib; {

Expand Down
Loading