summary refs log tree commit diff
path: root/pkgs/tools/archivers
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2016-01-19 09:55:31 +0100
committerVladimír Čunát <vcunat@gmail.com>2016-01-19 09:55:31 +0100
commit716aac2519a7571e7f5fd984a886d579a4a051c5 (patch)
tree53cf89cf764d787f4dc8f08474479892b9733177 /pkgs/tools/archivers
parentf8472457a440de3c44f6f604142d678b6ae2a762 (diff)
parent53b389327e34de319dc0dbda2b6bcab1a69db69d (diff)
downloadnixpkgs-716aac2519a7571e7f5fd984a886d579a4a051c5.tar
nixpkgs-716aac2519a7571e7f5fd984a886d579a4a051c5.tar.gz
nixpkgs-716aac2519a7571e7f5fd984a886d579a4a051c5.tar.bz2
nixpkgs-716aac2519a7571e7f5fd984a886d579a4a051c5.tar.lz
nixpkgs-716aac2519a7571e7f5fd984a886d579a4a051c5.tar.xz
nixpkgs-716aac2519a7571e7f5fd984a886d579a4a051c5.tar.zst
nixpkgs-716aac2519a7571e7f5fd984a886d579a4a051c5.zip
Merge branch 'staging' into closure-size
Diffstat (limited to 'pkgs/tools/archivers')
-rw-r--r--pkgs/tools/archivers/runzip/default.nix17
-rw-r--r--pkgs/tools/archivers/sharutils/default.nix2
-rw-r--r--pkgs/tools/archivers/unrar/default.nix6
-rw-r--r--pkgs/tools/archivers/zpaq/default.nix36
-rw-r--r--pkgs/tools/archivers/zpaq/zpaqd.nix36
5 files changed, 52 insertions, 45 deletions
diff --git a/pkgs/tools/archivers/runzip/default.nix b/pkgs/tools/archivers/runzip/default.nix
index 9b2fd0eda59..1ed453f0d4f 100644
--- a/pkgs/tools/archivers/runzip/default.nix
+++ b/pkgs/tools/archivers/runzip/default.nix
@@ -1,21 +1,20 @@
-{stdenv, fetchFromGitHub, libzip, autoconf, automake, libtool, m4}:
+{ stdenv, fetchFromGitHub, libzip, autoreconfHook }:
+
 stdenv.mkDerivation rec {
-  baseName = "runzip";
   version = "1.4";
-  name = "${baseName}-${version}";
-  buildInputs = [libzip autoconf automake libtool m4];
+  name = "runzip-${version}";
+
+  buildInputs = [ libzip autoreconfHook ];
+
   src = fetchFromGitHub {
     owner = "vlm";
     repo = "zip-fix-filename-encoding";
     rev = "v${version}";
     sha256 = "0l5zbb5hswxczigvyal877j0aiq3fc01j3gv88bvy7ikyvw3lc07";
   };
-  preConfigure = ''
-    autoreconf -iv
-  '';
+
   meta = {
-    inherit version;
-    description = ''A tool to convert filename encoding inside a ZIP archive'';
+    description = "A tool to convert filename encoding inside a ZIP archive";
     license = stdenv.lib.licenses.bsd2 ;
     maintainers = [stdenv.lib.maintainers.raskin];
     platforms = stdenv.lib.platforms.linux;
diff --git a/pkgs/tools/archivers/sharutils/default.nix b/pkgs/tools/archivers/sharutils/default.nix
index a7135346d2f..e806a962eab 100644
--- a/pkgs/tools/archivers/sharutils/default.nix
+++ b/pkgs/tools/archivers/sharutils/default.nix
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
   preConfigure = ''
      # Fix for building on Glibc 2.16.  Won't be needed once the
      # gnulib in sharutils is updated.
-     sed -i ${stdenv.lib.optionalString ((stdenv.isFreeBSD || stdenv.isOpenBSD) && stdenv.cc.nativeTools) "''"} '/gets is a security hole/d' lib/stdio.in.h
+     sed -i ${stdenv.lib.optionalString (stdenv.isOpenBSD && stdenv.cc.nativeTools) "''"} '/gets is a security hole/d' lib/stdio.in.h
   '';
 
   # GNU Gettext is needed on non-GNU platforms.
diff --git a/pkgs/tools/archivers/unrar/default.nix b/pkgs/tools/archivers/unrar/default.nix
index 27fd7c8c1d7..86ad4a4c145 100644
--- a/pkgs/tools/archivers/unrar/default.nix
+++ b/pkgs/tools/archivers/unrar/default.nix
@@ -1,14 +1,14 @@
 {stdenv, fetchurl}:
 
 let
-  version = "5.2.7";
+  version = "5.3.9";
 in
 stdenv.mkDerivation {
   name = "unrar-${version}";
 
   src = fetchurl {
     url = "http://www.rarlab.com/rar/unrarsrc-${version}.tar.gz";
-    sha256 = "1b1ggrqn020pvvh2ia98alqxpl1q3x65cb6zzqwv91rpjiz7a57g";
+    sha256 = "0nsxwg1zp3s34wyjznwmy2cc5929yk7m5smq11cqdb6hmql3fngz";
   };
 
   preBuild = ''
@@ -28,7 +28,7 @@ stdenv.mkDerivation {
   meta = with stdenv.lib; {
     description = "Utility for RAR archives";
     homepage = http://www.rarlab.com/;
-    license = licenses.gpl2;
+    license = licenses.unfreeRedistributable;
     maintainers = [ maintainers.ehmry ];
     platforms = platforms.all;
   };
diff --git a/pkgs/tools/archivers/zpaq/default.nix b/pkgs/tools/archivers/zpaq/default.nix
index c8f3a890487..2b761df3863 100644
--- a/pkgs/tools/archivers/zpaq/default.nix
+++ b/pkgs/tools/archivers/zpaq/default.nix
@@ -9,29 +9,32 @@ let
     url="http://mattmahoney.net/dc/zpaq705.zip";
     sha256="0d1knq4f6693nvbwjx4wznb45hm4zyn4k88xvhynyk0dcbiy7ayq";
   };
-  buildInputs = [
-    unzip
-  ];
   isUnix = with stdenv; isLinux || isGNU || isDarwin || isFreeBSD || isOpenBSD;
   isx86 = stdenv.isi686 || stdenv.isx86_64;
-  compileFlags = ""
-    + (stdenv.lib.optionalString isUnix " -Dunix -pthread ")
-    + (stdenv.lib.optionalString (!isx86) " -DNOJIT ")
-    + " -DNDEBUG "
-    + " -fPIC "
+  compileFlags = with stdenv; ""
+    + (lib.optionalString (isUnix) " -Dunix -pthread")
+    + (lib.optionalString (isi686) " -march=i686")
+    + (lib.optionalString (isx86_64) " -march=nocona")
+    + (lib.optionalString (!isx86) " -DNOJIT")
+    + " -O3 -mtune=generic -DNDEBUG"
     ;
 in
 stdenv.mkDerivation {
   inherit (s) name version;
-  inherit buildInputs;
+
   src = fetchurl {
     inherit (s) url sha256;
   };
+
   sourceRoot = ".";
+
+  buildInputs = [ unzip ];
+
   buildPhase = ''
-	  g++ -O3 -march=native -Dunix libzpaq.cpp -pthread --shared -o libzpaq.so -fPIC
-	  g++ -O3 -march=native -Dunix zpaq.cpp -lzpaq -L. -L"$out/lib" -pthread -o zpaq
+    g++ ${compileFlags} -fPIC --shared libzpaq.cpp -o libzpaq.so
+    g++ ${compileFlags} -L. -L"$out/lib" -lzpaq zpaq.cpp -o zpaq
   '';
+
   installPhase = ''
     mkdir -p "$out"/{bin,include,lib,share/doc/zpaq}
     cp libzpaq.so "$out/lib"
@@ -39,12 +42,13 @@ stdenv.mkDerivation {
     cp libzpaq.h "$out/include"
     cp readme.txt "$out/share/doc/zpaq"
   '';
-  meta = {
+
+  meta = with stdenv.lib; {
     inherit (s) version;
-    description = ''An archiver with backward compatibility of versions for decompression'';
-    license = stdenv.lib.licenses.gpl3Plus ;
-    maintainers = [stdenv.lib.maintainers.raskin];
-    platforms = stdenv.lib.platforms.linux;
+    description = "Incremental journaling backup utility and archiver";
+    license = licenses.gpl3Plus ;
+    maintainers = with maintainers; [ raskin nckx ];
+    platforms = platforms.linux;
     homepage = "http://mattmahoney.net/dc/zpaq.html";
   };
 }
diff --git a/pkgs/tools/archivers/zpaq/zpaqd.nix b/pkgs/tools/archivers/zpaq/zpaqd.nix
index 65f40f68f55..6a7891d2ebe 100644
--- a/pkgs/tools/archivers/zpaq/zpaqd.nix
+++ b/pkgs/tools/archivers/zpaq/zpaqd.nix
@@ -9,29 +9,32 @@ let
     url="http://mattmahoney.net/dc/zpaqd633.zip";
     sha256="00zgc4mcmsd3d4afgzmrp6ymcyy8gb9kap815d5a3f9zhhzkz4dx";
   };
-  buildInputs = [
-    unzip
-  ];
   isUnix = with stdenv; isLinux || isGNU || isDarwin || isFreeBSD || isOpenBSD;
   isx86 = stdenv.isi686 || stdenv.isx86_64;
-  compileFlags = ""
-    + (stdenv.lib.optionalString isUnix " -Dunix -pthread ")
-    + (stdenv.lib.optionalString (!isx86) " -DNOJIT ")
-    + " -DNDEBUG "
-    + " -fPIC "
+  compileFlags = with stdenv; ""
+    + (lib.optionalString (isUnix) " -Dunix -pthread")
+    + (lib.optionalString (isi686) " -march=i686")
+    + (lib.optionalString (isx86_64) " -march=nocona")
+    + (lib.optionalString (!isx86) " -DNOJIT")
+    + " -O3 -mtune=generic -DNDEBUG"
     ;
 in
 stdenv.mkDerivation {
   inherit (s) name version;
-  inherit buildInputs;
+
   src = fetchurl {
     inherit (s) url sha256;
   };
+
   sourceRoot = ".";
+
+  buildInputs = [ unzip ];
+
   buildPhase = ''
-    g++ -shared -O3 libzpaq.cpp ${compileFlags} -o libzpaq.so
-    g++ -O3 -L. -L"$out/lib" -lzpaq zpaqd.cpp -o zpaqd
+    g++ ${compileFlags} -fPIC --shared libzpaq.cpp -o libzpaq.so
+    g++ ${compileFlags} -L. -L"$out/lib" -lzpaq zpaqd.cpp -o zpaqd
   '';
+
   installPhase = ''
     mkdir -p "$out"/{bin,include,lib,share/doc/zpaq}
     cp libzpaq.so "$out/lib"
@@ -39,11 +42,12 @@ stdenv.mkDerivation {
     cp libzpaq.h "$out/include"
     cp readme_zpaqd.txt "$out/share/doc/zpaq"
   '';
-  meta = {
+
+  meta = with stdenv.lib; {
     inherit (s) version;
-    description = ''ZPAQ archiver decompressor and algorithm development tool'';
-    license = stdenv.lib.licenses.gpl3Plus ;
-    maintainers = [stdenv.lib.maintainers.raskin];
-    platforms = stdenv.lib.platforms.linux;
+    description = "ZPAQ archive (de)compressor and algorithm development tool";
+    license = licenses.gpl3Plus ;
+    maintainers = with maintainers; [ raskin nckx ];
+    platforms = platforms.linux;
   };
 }