From a3a2568e53024be239f3608395e9b9d84e6280b6 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Tue, 21 Dec 2021 11:50:09 +0100 Subject: [PATCH] zpaqd: refactor --- pkgs/tools/archivers/zpaq/default.upstream | 6 ------ pkgs/tools/archivers/zpaq/zpaqd.nix | 20 ++++++-------------- pkgs/tools/archivers/zpaq/zpaqd.upstream | 5 ----- 3 files changed, 6 insertions(+), 25 deletions(-) delete mode 100644 pkgs/tools/archivers/zpaq/default.upstream delete mode 100644 pkgs/tools/archivers/zpaq/zpaqd.upstream diff --git a/pkgs/tools/archivers/zpaq/default.upstream b/pkgs/tools/archivers/zpaq/default.upstream deleted file mode 100644 index 84daee900cec..000000000000 --- a/pkgs/tools/archivers/zpaq/default.upstream +++ /dev/null @@ -1,6 +0,0 @@ -url http://mattmahoney.net/dc/zpaq.html -version_link 'zpaq[0-9]+[.]zip' -version "[^0-9]*([0-9]+)[^0-9]*" '\1' -name zpaq -attribute_name zpaq -minimize_overwrite diff --git a/pkgs/tools/archivers/zpaq/zpaqd.nix b/pkgs/tools/archivers/zpaq/zpaqd.nix index c2f214ea2a62..1d674911f49e 100644 --- a/pkgs/tools/archivers/zpaq/zpaqd.nix +++ b/pkgs/tools/archivers/zpaq/zpaqd.nix @@ -1,25 +1,17 @@ { lib, stdenv, fetchurl, unzip }: let - # Generated upstream information - s = rec { - baseName="zpaqd"; - version="715"; - name="${baseName}-${version}"; - hash="0868lynb45lm79yvx5f10lj5h6bfv0yck8whcls2j080vmk3n7rk"; - url="http://mattmahoney.net/dc/zpaqd715.zip"; - sha256="0868lynb45lm79yvx5f10lj5h6bfv0yck8whcls2j080vmk3n7rk"; - }; - compileFlags = lib.concatStringsSep " " ([ "-O3" "-DNDEBUG" ] ++ lib.optional (stdenv.hostPlatform.isUnix) "-Dunix -pthread" ++ lib.optional (!stdenv.hostPlatform.isx86) "-DNOJIT"); in -stdenv.mkDerivation { - inherit (s) name version; +stdenv.mkDerivation rec { + pname = "zpaqd"; + version = "715"; src = fetchurl { - inherit (s) url sha256; + url = "http://mattmahoney.net/dc/zpaqd${version}.zip"; + sha256 = "sha256-Mx87Zt0AASk0ZZCjyTzYbhlYJAXBlb59OpUWsqynyCA="; }; sourceRoot = "."; @@ -41,7 +33,7 @@ stdenv.mkDerivation { meta = with lib; { description = "ZPAQ archive (de)compressor and algorithm development tool"; - license = licenses.gpl3Plus ; + license = licenses.gpl3Plus; maintainers = with maintainers; [ raskin ]; platforms = platforms.linux; }; diff --git a/pkgs/tools/archivers/zpaq/zpaqd.upstream b/pkgs/tools/archivers/zpaq/zpaqd.upstream deleted file mode 100644 index ef83c58e4600..000000000000 --- a/pkgs/tools/archivers/zpaq/zpaqd.upstream +++ /dev/null @@ -1,5 +0,0 @@ -url http://mattmahoney.net/dc/zpaqutil.html -version_link 'zpaqd[0-9]+[.]zip' -version "[^0-9]*([0-9]+)[^0-9]*" '\1' -name zpaqd -attribute_name zpaqd