From c70c0029eb706c8f058fd3c6627a66c46e1db0d4 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Fri, 12 Aug 2011 09:04:07 +0000 Subject: [PATCH] Updated BNFC to the latest version and fixed the spelling of its attribute. Added BNFC-meta, alex-meta, and happy-meta. Moved these tools into the tool section of haskell-packages.nix, and paid special attention to the intended alphabetic order. svn path=/nixpkgs/trunk/; revision=28506 --- .../tools/haskell/BNFC-meta/default.nix | 17 ++++++++++++++++ .../tools/haskell/BNFC/default.nix | 20 +++++++++++++++++++ .../tools/haskell/alex-meta/default.nix | 17 ++++++++++++++++ .../tools/haskell/bnfc/default.nix | 20 ------------------- .../tools/haskell/happy-meta/default.nix | 17 ++++++++++++++++ pkgs/top-level/haskell-packages.nix | 10 ++++++++-- 6 files changed, 79 insertions(+), 22 deletions(-) create mode 100644 pkgs/development/tools/haskell/BNFC-meta/default.nix create mode 100644 pkgs/development/tools/haskell/BNFC/default.nix create mode 100644 pkgs/development/tools/haskell/alex-meta/default.nix delete mode 100644 pkgs/development/tools/haskell/bnfc/default.nix create mode 100644 pkgs/development/tools/haskell/happy-meta/default.nix diff --git a/pkgs/development/tools/haskell/BNFC-meta/default.nix b/pkgs/development/tools/haskell/BNFC-meta/default.nix new file mode 100644 index 000000000000..3661ece97bff --- /dev/null +++ b/pkgs/development/tools/haskell/BNFC-meta/default.nix @@ -0,0 +1,17 @@ +{ cabal, alexMeta, happyMeta, haskellSrcMeta }: + +cabal.mkDerivation (self: { + pname = "BNFC-meta"; + version = "0.2.1"; + sha256 = "0c58m1xkaylgp9f3r71nfgqb30fpidldz46dbwalhkb7fm0k4gmm"; + buildDepends = [ alexMeta happyMeta haskellSrcMeta ]; + meta = { + description = "Deriving Quasi-Quoters from BNF Grammars"; + license = self.stdenv.lib.licenses.gpl2; + platforms = self.ghc.meta.platforms; + maintainers = [ + self.stdenv.lib.maintainers.andres + self.stdenv.lib.maintainers.simons + ]; + }; +}) diff --git a/pkgs/development/tools/haskell/BNFC/default.nix b/pkgs/development/tools/haskell/BNFC/default.nix new file mode 100644 index 000000000000..c06b5eacc24b --- /dev/null +++ b/pkgs/development/tools/haskell/BNFC/default.nix @@ -0,0 +1,20 @@ +{ cabal, mtl }: + +cabal.mkDerivation (self: { + pname = "BNFC"; + version = "2.4.2.0"; + sha256 = "0nnalzsql1k5y3s93g5y2hy2gcdsrbi8r7cwzmdcy4vyy589pin0"; + isLibrary = false; + isExecutable = true; + buildDepends = [ mtl ]; + meta = { + homepage = "http://www.cse.chalmers.se/research/group/Language-technology/BNFC/"; + description = "A compiler front-end generator"; + license = "GPL"; + platforms = self.ghc.meta.platforms; + maintainers = [ + self.stdenv.lib.maintainers.andres + self.stdenv.lib.maintainers.simons + ]; + }; +}) diff --git a/pkgs/development/tools/haskell/alex-meta/default.nix b/pkgs/development/tools/haskell/alex-meta/default.nix new file mode 100644 index 000000000000..58d8c3e1a10b --- /dev/null +++ b/pkgs/development/tools/haskell/alex-meta/default.nix @@ -0,0 +1,17 @@ +{ cabal, haskellSrcMeta }: + +cabal.mkDerivation (self: { + pname = "alex-meta"; + version = "0.2.0.1"; + sha256 = "1b508pg4a9f0ln9k91j5dj0mja3faxasz5k6qyxqz3zqnlysm2gj"; + buildDepends = [ haskellSrcMeta ]; + meta = { + description = "Quasi-quoter for Alex lexers"; + license = self.stdenv.lib.licenses.bsd3; + platforms = self.ghc.meta.platforms; + maintainers = [ + self.stdenv.lib.maintainers.andres + self.stdenv.lib.maintainers.simons + ]; + }; +}) diff --git a/pkgs/development/tools/haskell/bnfc/default.nix b/pkgs/development/tools/haskell/bnfc/default.nix deleted file mode 100644 index 767f1778138b..000000000000 --- a/pkgs/development/tools/haskell/bnfc/default.nix +++ /dev/null @@ -1,20 +0,0 @@ -{stdenv, fetchurl, ghc}: - -stdenv.mkDerivation { - name = "bnfc-2.4-beta1"; - - src = fetchurl { - url = "https://svn.spraakdata.gu.se/clt/release/bnfc_2.4_beta_1.tgz"; - sha256 = "1njnck3m6qpp0qw11v1chf6m217j8f85bsgjl7zcpb4py18mjjrx"; - }; - - buildInputs = [ghc]; - - preConfigure = "cd source"; - - meta = { - description = "Compiler construction tool generating a compiler front-end from a Labelled BNF grammar"; - platforms = ghc.meta.platforms; - maintainers = [ stdenv.lib.maintainers.simons ]; - }; -} diff --git a/pkgs/development/tools/haskell/happy-meta/default.nix b/pkgs/development/tools/haskell/happy-meta/default.nix new file mode 100644 index 000000000000..f73d61924c5c --- /dev/null +++ b/pkgs/development/tools/haskell/happy-meta/default.nix @@ -0,0 +1,17 @@ +{ cabal, haskellSrcMeta, mtl }: + +cabal.mkDerivation (self: { + pname = "happy-meta"; + version = "0.2.0.2"; + sha256 = "1r9i01bnw0dz10balhpgiwcls5jwv5p09jafi8jl6hy0jwx7xydp"; + buildDepends = [ haskellSrcMeta mtl ]; + meta = { + description = "Quasi-quoter for Happy parsers"; + license = self.stdenv.lib.licenses.bsd3; + platforms = self.ghc.meta.platforms; + maintainers = [ + self.stdenv.lib.maintainers.andres + self.stdenv.lib.maintainers.simons + ]; + }; +}) diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index 471512a81259..39202d464c9d 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -414,8 +414,6 @@ let result = let callPackage = x : y : modifyPrio (newScope result.final x y); bmp = callPackage ../development/libraries/haskell/bmp {}; - bnfc = callPackage ../development/tools/haskell/bnfc {}; - Boolean = callPackage ../development/libraries/haskell/Boolean {}; bytestringNums = callPackage ../development/libraries/haskell/bytestring-nums {}; @@ -1353,6 +1351,12 @@ let result = let callPackage = x : y : modifyPrio (newScope result.final x y); alex_3_0 = callPackage ../development/tools/parsing/alex/3.0.nix {}; alex = self.alex_2_3_1; + alexMeta = callPackage ../development/tools/haskell/alex-meta {}; + + BNFC = callPackage ../development/tools/haskell/BNFC {}; + + BNFCMeta = callPackage ../development/tools/haskell/BNFC-meta {}; + cpphs = callPackage ../development/tools/misc/cpphs {}; frown = callPackage ../development/tools/parsing/frown {}; @@ -1371,6 +1375,8 @@ let result = let callPackage = x : y : modifyPrio (newScope result.final x y); happy_1_18_6 = callPackage ../development/tools/parsing/happy/1.18.6.nix {}; happy = self.happy_1_18_4; + happyMeta = callPackage ../development/tools/haskell/happy-meta {}; + HaRe = callPackage ../development/tools/haskell/HaRe {}; hlint = callPackage ../development/tools/haskell/hlint {};