zpaqd: refactor

This commit is contained in:
Felix Buehler 2021-12-21 11:50:09 +01:00
parent 459f9fe2be
commit a3a2568e53
3 changed files with 6 additions and 25 deletions

View File

@ -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

View File

@ -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;
};

View File

@ -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