From 99b46b64df7bd8c34894fe57d6bb76c491a941cd Mon Sep 17 00:00:00 2001 From: Peter Simons <simons@cryp.to> Date: Tue, 20 Jan 2015 22:52:08 +0100 Subject: [PATCH] haskell-ncurses: this package requires a pre 0.21 version of c2hs Otherwise, the build fails, saying: c2hs: Errors during expansion of binding hooks: /nix/store/d6m9m2wqaymfiwbx11frdsm1cz7qjkdm-ncurses-5.9/include/curses.h:405: (column 2) [ERROR] >>> Illegal type! The type specifiers of this declaration do not form a legal ANSI C(89) type. This patch fixes https://github.com/NixOS/nixpkgs/issues/5873. --- .../haskell-modules/configuration-common.nix | 3 +++ .../haskell-modules/hackage-packages.nix | 25 ++++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 92a396e96bd4..bd9ff6218aa6 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -317,6 +317,9 @@ self: super: { # https://github.com/athanclark/dag/issues/2 dag = addBuildTool super.dag self.Cabal_1_22_0_0; # http://hydra.cryp.to/build/498554/log/raw + # The build fails with the most recent version of c2hs. + ncurses = super.ncurses.override { c2hs = self.c2hs_0_20_1; }; + } // { # Not on Hackage yet. diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index 8dec0dfd8f5a..7e7eb7b0bbee 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -25758,6 +25758,30 @@ self: { license = stdenv.lib.licenses.bsd3; }) {}; + "c2hs_0_20_1" = callPackage + ({ mkDerivation, array, base, containers, directory, dlist + , filepath, HUnit, language-c, pretty, process, shelly + , test-framework, test-framework-hunit, text, transformers + }: + mkDerivation { + pname = "c2hs"; + version = "0.20.1"; + sha256 = "1w2w9zxirzjd5lniwqakq59glgsh4mw3565x2l9qrin0bfjxkn3h"; + isLibrary = false; + isExecutable = true; + buildDepends = [ + array base containers directory dlist filepath language-c pretty + process + ]; + testDepends = [ + base filepath HUnit shelly test-framework test-framework-hunit text + transformers + ]; + homepage = "https://github.com/haskell/c2hs"; + description = "C->Haskell FFI tool that gives some cross-language type safety"; + license = stdenv.lib.licenses.gpl2; + }) {}; + "c2hs" = callPackage ({ mkDerivation, array, base, containers, directory, dlist , filepath, HUnit, language-c, pretty, process, shelly @@ -82816,7 +82840,6 @@ self: { homepage = "https://john-millikin.com/software/haskell-ncurses/"; description = "Modernised bindings to GNU ncurses"; license = stdenv.lib.licenses.gpl3; - hydraPlatforms = stdenv.lib.platforms.none; }) { inherit (pkgs) ncurses;}; "neat" = callPackage