From 1d4bbef0e88a066521ec4fef1e64220149fcadca Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 7 Mar 2018 16:52:35 +0000 Subject: [PATCH] wyrd: fix build --- pkgs/tools/misc/wyrd/default.nix | 11 +++++++---- pkgs/top-level/all-packages.nix | 2 +- pkgs/top-level/ocaml-packages.nix | 4 ---- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/pkgs/tools/misc/wyrd/default.nix b/pkgs/tools/misc/wyrd/default.nix index 261c08ad31de..1029dbb29d8c 100644 --- a/pkgs/tools/misc/wyrd/default.nix +++ b/pkgs/tools/misc/wyrd/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, ocaml, ncurses, remind, camlp4 }: +{ stdenv, fetchurl, ocamlPackages, ncurses, remind }: stdenv.mkDerivation rec { version = "1.4.6"; @@ -9,10 +9,13 @@ stdenv.mkDerivation rec { sha256 = "0zlrg602q781q8dij62lwdprpfliyy9j1rqfqcz8p2wgndpivddj"; }; - buildInputs = [ ocaml ncurses remind camlp4 ]; + NIX_CFLAGS_COMPILE = [ "-DNCURSES_INTERNALS=1" ]; - # needed for configure phase to succeed - CPPFLAGS = "-DNCURSES_INTERNALS"; + preConfigure = '' + substituteInPlace curses/curses.ml --replace 'pp gcc' "pp $CC" + ''; + + buildInputs = [ ocamlPackages.ocaml ncurses remind ocamlPackages.camlp4 ]; preferLocalBuild = true; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 173b02fab245..e97a4d38acbb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5505,7 +5505,7 @@ with pkgs; wv2 = callPackage ../tools/misc/wv2 { }; - inherit (ocamlPackages) wyrd; + wyrd = callPackage ../tools/misc/wyrd { }; x86info = callPackage ../os-specific/linux/x86info { }; diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index ef534f189ae0..a8111f9256e0 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -969,10 +969,6 @@ let # Apps / from all-packages - wyrd = callPackage ../tools/misc/wyrd { - ncurses = pkgs.ncurses5; - }; - haxe = callPackage ../development/compilers/haxe { }; ocamlnat = callPackage ../development/ocaml-modules/ocamlnat { };