diff --git a/pkgs/data/fonts/unscii/default.nix b/pkgs/data/fonts/unscii/default.nix index 066a4d4d9221..6fdeadf3776f 100644 --- a/pkgs/data/fonts/unscii/default.nix +++ b/pkgs/data/fonts/unscii/default.nix @@ -2,6 +2,11 @@ , fontforge, SDL, SDL_image, mkfontscale }: +let + perlenv = perl.withPackages (p: with p; [ + TextCharWidth + ]); +in stdenv.mkDerivation rec { pname = "unscii"; version = "1.1"; @@ -12,11 +17,23 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = - [ (perl.withPackages (p: [ p.TextCharWidth ])) + [ perlenv bdftopcf fontforge SDL SDL_image mkfontscale ]; + # Fixes shebang -> wrapper problem on Darwin + postPatch = '' + for perltool in *.pl; do + substituteInPlace Makefile \ + --replace "./$perltool" "${perlenv}/bin/perl ./$perltool" + done + ''; + + makeFlags = [ + "CC=${stdenv.cc.targetPrefix}cc" + ]; + preConfigure = '' patchShebangs . '';