Added Happy parser generator and HaRP: Haskell Regular Patterns
svn path=/nixpkgs/trunk/; revision=1043
This commit is contained in:
parent
7226e94466
commit
3d90f961b4
18
pkgs/development/compilers/harp/builder.sh
Normal file
18
pkgs/development/compilers/harp/builder.sh
Normal file
@ -0,0 +1,18 @@
|
||||
. $stdenv/setup
|
||||
|
||||
unzip $src
|
||||
|
||||
happy Language/Haskell/Harp/Parser.ly
|
||||
ghc --make TrHarp.hs -o trharp
|
||||
|
||||
|
||||
mkdir $out
|
||||
mkdir $out/bin
|
||||
cp trharp $out/bin/
|
||||
|
||||
ghc -c Language/Haskell/Harp/Match.hs
|
||||
|
||||
mkdir -p $out/hslibs/Language/Haskell/Harp/
|
||||
cp Language/Haskell/Harp/Match.hs $out/hslibs/Language/Haskell/Harp/
|
||||
cp Language/Haskell/Harp/Match.hi $out/hslibs/Language/Haskell/Harp/
|
||||
cp Language/Haskell/Harp/Match.o $out/hslibs/Language/Haskell/Harp/
|
11
pkgs/development/compilers/harp/default.nix
Normal file
11
pkgs/development/compilers/harp/default.nix
Normal file
@ -0,0 +1,11 @@
|
||||
{stdenv, fetchurl, unzip, ghc, happy}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "harp-0.1";
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl {
|
||||
url = http://www.dtek.chalmers.se/~d00nibro/harp/harp-0.1-src.zip;
|
||||
md5 = "8fc8552b7c05b5828b2e1b07f8c1f063";
|
||||
};
|
||||
buildInputs = [unzip ghc happy];
|
||||
}
|
10
pkgs/development/tools/parsing/happy/default.nix
Normal file
10
pkgs/development/tools/parsing/happy/default.nix
Normal file
@ -0,0 +1,10 @@
|
||||
{stdenv, fetchurl, perl, ghc}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "happy-1.14";
|
||||
src = fetchurl {
|
||||
url = http://www.haskell.org/happy/dist/1.14/happy-1.14-src.tar.gz;
|
||||
md5 = "501b5b63533b2e2838de18085e8c4492";
|
||||
};
|
||||
buildInputs = [ghc perl];
|
||||
}
|
@ -261,6 +261,14 @@ rec {
|
||||
inherit fetchurl stdenv ghc;
|
||||
};
|
||||
|
||||
happy = (import ../development/tools/parsing/happy) {
|
||||
inherit fetchurl stdenv perl ghc;
|
||||
};
|
||||
|
||||
harp = (import ../development/compilers/harp) {
|
||||
inherit fetchurl stdenv unzip ghc happy;
|
||||
};
|
||||
|
||||
perl = (import ../development/interpreters/perl) {
|
||||
inherit fetchurl stdenv;
|
||||
patch = gnupatch;
|
||||
|
Loading…
Reference in New Issue
Block a user