From 520e87d1e5ffe96189994cb3406d28d89c105244 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Fri, 7 Apr 2023 00:25:27 -0700 Subject: [PATCH] ebook-tools: fix cross --- pkgs/tools/text/ebook-tools/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/text/ebook-tools/default.nix b/pkgs/tools/text/ebook-tools/default.nix index 5efdb69fe453c..5ba1c08cf622c 100644 --- a/pkgs/tools/text/ebook-tools/default.nix +++ b/pkgs/tools/text/ebook-tools/default.nix @@ -1,4 +1,6 @@ -{ lib, stdenv, fetchurl, cmake, pkg-config, libxml2, libzip }: +{ lib, stdenv, fetchurl, cmake, pkg-config, libxml2, libzip +, buildPackages +}: stdenv.mkDerivation rec { pname = "ebook-tools"; @@ -12,6 +14,10 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ libxml2 libzip ]; + preConfigure = '' + NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(${buildPackages.pkg-config}/bin/${buildPackages.pkg-config.targetPrefix}pkg-config --cflags libzip)" + ''; + meta = with lib; { homepage = "http://ebook-tools.sourceforge.net"; description = "Tools and library for dealing with various ebook file formats";