diff options
Diffstat (limited to 'pkgs/tools/archivers/zpaq')
-rw-r--r-- | pkgs/tools/archivers/zpaq/default.nix | 12 | ||||
-rw-r--r-- | pkgs/tools/archivers/zpaq/zpaqd.nix | 4 |
2 files changed, 6 insertions, 10 deletions
diff --git a/pkgs/tools/archivers/zpaq/default.nix b/pkgs/tools/archivers/zpaq/default.nix index 150633e620ae4..6d0f00f514903 100644 --- a/pkgs/tools/archivers/zpaq/default.nix +++ b/pkgs/tools/archivers/zpaq/default.nix @@ -13,17 +13,13 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ perl /* for pod2man */ ]; - preBuild = let - CPPFLAGS = with stdenv; "" - + (lib.optionalString (!isi686 && !isx86_64) "-DNOJIT ") - + "-Dunix"; - CXXFLAGS = "-O3 -DNDEBUG"; - in '' - buildFlagsArray=( "CPPFLAGS=${CPPFLAGS}" "CXXFLAGS=${CXXFLAGS}" ) - ''; + CPPFLAGS = [ "-Dunix" ] ++ + lib.optional (!stdenv.isi686 && !stdenv.isx86_64) "-DNOJIT"; + CXXFLAGS = [ "-O3" "-DNDEBUG" ]; enableParallelBuilding = true; + makeFlags = [ "CXX=${stdenv.cc.targetPrefix}c++" ]; installFlags = [ "PREFIX=$(out)" ]; meta = with lib; { diff --git a/pkgs/tools/archivers/zpaq/zpaqd.nix b/pkgs/tools/archivers/zpaq/zpaqd.nix index 1d674911f49ee..6896897be3b15 100644 --- a/pkgs/tools/archivers/zpaq/zpaqd.nix +++ b/pkgs/tools/archivers/zpaq/zpaqd.nix @@ -19,8 +19,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ unzip ]; buildPhase = '' - g++ ${compileFlags} -fPIC --shared libzpaq.cpp -o libzpaq.so - g++ ${compileFlags} -L. -L"$out/lib" -lzpaq zpaqd.cpp -o zpaqd + $CXX ${compileFlags} -fPIC --shared libzpaq.cpp -o libzpaq.so + $CXX ${compileFlags} -L. -L"$out/lib" -lzpaq zpaqd.cpp -o zpaqd ''; installPhase = '' |