From e8a37d3d41b369bef00bcb718ad5d8c387b2b2c8 Mon Sep 17 00:00:00 2001 From: Gergely Risko Date: Wed, 21 Aug 2013 23:39:07 +0200 Subject: [PATCH] Add ncurses haskell library --- .../libraries/haskell/ncurses/default.nix | 22 +++++++++++++++++++ pkgs/top-level/haskell-packages.nix | 2 ++ 2 files changed, 24 insertions(+) create mode 100644 pkgs/development/libraries/haskell/ncurses/default.nix diff --git a/pkgs/development/libraries/haskell/ncurses/default.nix b/pkgs/development/libraries/haskell/ncurses/default.nix new file mode 100644 index 000000000000..c98f711f2971 --- /dev/null +++ b/pkgs/development/libraries/haskell/ncurses/default.nix @@ -0,0 +1,22 @@ +{ cabal, c2hs, ncurses, text, transformers }: + +cabal.mkDerivation (self: { + pname = "ncurses"; + version = "0.2.4"; + sha256 = "0d4h85qgva1sf59g55k9xidqdpw18qj51xj7w5cqsf5pcpxgkcwh"; + buildDepends = [ text transformers ]; + buildTools = [ c2hs ]; + extraLibraries = [ ncurses ]; + preConfigure = '' + sed -i -e "s,ncursesw/,," lib/UI/NCurses.chs + sed -i -e "s,ncursesw/,," lib/UI/NCurses/Enums.chs + sed -i -e "s,ncursesw/,," lib/UI/NCurses/Panel.chs + sed -i -e "s,ncursesw/,," cbits/hsncurses-shim.c + ''; + meta = { + homepage = "https://john-millikin.com/software/haskell-ncurses/"; + description = "Modernised bindings to GNU ncurses"; + license = self.stdenv.lib.licenses.gpl3; + platforms = self.ghc.meta.platforms; + }; +}) diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index 07b4071a0048..61b4d6c50b3f 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -1473,6 +1473,8 @@ let result = let callPackage = x : y : modifyPrio (newScope result.final x y); naturals = callPackage ../development/libraries/haskell/naturals {}; + ncurses = callPackage ../development/libraries/haskell/ncurses { inherit (pkgs) ncurses; }; + netlist = callPackage ../development/libraries/haskell/netlist {}; netlistToVhdl = callPackage ../development/libraries/haskell/netlist-to-vhdl {};