9 compileFlags = lib.concatStringsSep " " (
14 ++ lib.optional (stdenv.hostPlatform.isUnix) "-Dunix -pthread"
15 ++ lib.optional (!stdenv.hostPlatform.isx86) "-DNOJIT"
18 stdenv.mkDerivation rec {
23 url = "http://mattmahoney.net/dc/zpaqd${version}.zip";
24 sha256 = "sha256-Mx87Zt0AASk0ZZCjyTzYbhlYJAXBlb59OpUWsqynyCA=";
29 nativeBuildInputs = [ unzip ];
32 $CXX ${compileFlags} -fPIC --shared libzpaq.cpp -o libzpaq.so
33 $CXX ${compileFlags} -L. -L"$out/lib" -lzpaq zpaqd.cpp -o zpaqd
37 mkdir -p "$out"/{bin,include,lib,share/doc/zpaq}
38 cp libzpaq.so "$out/lib"
40 cp libzpaq.h "$out/include"
41 cp readme_zpaqd.txt "$out/share/doc/zpaq"
45 description = "ZPAQ archive (de)compressor and algorithm development tool";
46 mainProgram = "zpaqd";
47 license = licenses.gpl3Plus;
48 maintainers = with maintainers; [ raskin ];
49 platforms = platforms.linux;