From c9f08ace52ee152e0dd75bc071e4159c0bcc7cc2 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Sun, 9 Jan 2022 09:39:13 +0800 Subject: zpaq: cleanup and fix cross compilation --- pkgs/tools/archivers/zpaq/default.nix | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'pkgs/tools') 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; { -- cgit 1.4.1