diff --git a/pkgs/by-name/bd/bdfresize/fix-configure.patch b/pkgs/by-name/bd/bdfresize/fix-configure.patch new file mode 100644 index 000000000000..7e3d68919fdd --- /dev/null +++ b/pkgs/by-name/bd/bdfresize/fix-configure.patch @@ -0,0 +1,11 @@ +--- a/configure ++++ b/configure +@@ -904,7 +904,7 @@ + #line 905 "configure" + #include "confdefs.h" + +-main(){return(0);} ++int main(){return(0);} + EOF + if { (eval echo configure:910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cc_works=yes diff --git a/pkgs/by-name/bd/bdfresize/package.nix b/pkgs/by-name/bd/bdfresize/package.nix index e6ac782a44ff..d35340030f5f 100644 --- a/pkgs/by-name/bd/bdfresize/package.nix +++ b/pkgs/by-name/bd/bdfresize/package.nix @@ -1,19 +1,25 @@ { lib, stdenv, - fetchurl, + fetchzip, }: stdenv.mkDerivation rec { pname = "bdfresize"; version = "1.5"; - src = fetchurl { + src = fetchzip { url = "http://openlab.ring.gr.jp/efont/dist/tools/bdfresize/bdfresize-${version}.tar.gz"; - hash = "sha256-RAz8BiCgI35GNSwUoHdMqj8wWXWbCiDe/vyU6EkIl6Y="; + hash = "sha256-C4ZLJIn6vVeVUCpNwMu0vdfQQ3qUz4EVIcPob9NejP0="; }; - patches = [ ./remove-malloc-declaration.patch ]; + patches = [ + ./fix-configure.patch + ./remove-malloc-declaration.patch + ]; + + # Fix compilation of getopt; see getopt package for more details + env.NIX_CFLAGS_COMPILE = "-D__GNU_LIBRARY__"; meta = with lib; { description = "Tool to resize BDF fonts";