From e52250b33c85ab3eb30325b0141ca16ed2cdbc5a Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Sun, 25 Mar 2018 15:23:49 +0200 Subject: [PATCH] scowl: fix darwin build /cc ZHF #36454 --- pkgs/data/misc/scowl/default.nix | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/pkgs/data/misc/scowl/default.nix b/pkgs/data/misc/scowl/default.nix index 5e4d17bcc8fd7..e54dc3fa9feb1 100644 --- a/pkgs/data/misc/scowl/default.nix +++ b/pkgs/data/misc/scowl/default.nix @@ -1,4 +1,7 @@ -{stdenv, fetchFromGitHub, unzip, zip, perl, aspell, dos2unix, singleWordlist ? null}: +{ stdenv, fetchFromGitHub, unzip, zip, libiconv, perl, aspell, dos2unix +, singleWordlist ? null +}: + stdenv.mkDerivation rec { name = "${pname}-${version}"; pname = "scowl"; @@ -11,10 +14,15 @@ stdenv.mkDerivation rec { sha256 = "16mgk6scbw8i38g63kh60bsnzgzfs8gvvz2n5jh4x5didbwly8nz"; }; - buildInputs = []; - nativeBuildInputs = [unzip zip perl aspell dos2unix]; + postPatch = '' + substituteInPlace scowl/src/Makefile \ + --replace g++ c++ + ''; + + nativeBuildInputs = [ unzip zip perl aspell dos2unix ]; + buildInputs = stdenv.lib.optional (!stdenv.isLinux) libiconv; - NIX_CFLAGS_COMPILE = " -Wno-narrowing "; + NIX_CFLAGS_COMPILE = "-Wno-narrowing"; preConfigure = '' patchShebangs . @@ -34,8 +42,8 @@ stdenv.mkDerivation rec { installPhase = if singleWordlist == null then '' eval "$preInstall" - mkdir -p "$out/share/scowl" - mkdir -p "$out/lib" "$out/share/hunspell" "$out/share/myspell" + mkdir -p "$out/share/scowl" + mkdir -p "$out/lib" "$out/share/hunspell" "$out/share/myspell" mkdir -p "$out/share/dict" cp -r scowl/speller/aspell "$out/lib/aspell"