From 1061800db41d6b0f23bc9cbd357117ebedd8748a Mon Sep 17 00:00:00 2001 From: Marc Weber Date: Fri, 21 Mar 2008 01:24:43 +0000 Subject: [PATCH] added hsc2hs (makes interfacing C -> haskell easier) svn path=/nixpkgs/trunk/; revision=11248 --- .../tools/documentation/hs2hs/default.nix | 26 +++++++++++++++++++ pkgs/misc/bleeding-edge-fetch-info/hsc2hs.nix | 3 +++ pkgs/top-level/all-packages.nix | 6 +++++ 3 files changed, 35 insertions(+) create mode 100644 pkgs/development/tools/documentation/hs2hs/default.nix create mode 100644 pkgs/misc/bleeding-edge-fetch-info/hsc2hs.nix diff --git a/pkgs/development/tools/documentation/hs2hs/default.nix b/pkgs/development/tools/documentation/hs2hs/default.nix new file mode 100644 index 00000000000..cfa9e3b56f6 --- /dev/null +++ b/pkgs/development/tools/documentation/hs2hs/default.nix @@ -0,0 +1,26 @@ +#TODO write a function (abstraction) +args: with args; +args.stdenv.mkDerivation { + name = "hsc2hs-darcs"; + + src = bleedingEdgeRepos.sourceByName "hsc2hs"; + + phases = "unpackPhase buildPhase"; + + buildPhase = '' + ghc --make Setup.*hs -o setup + ensureDir \out + nix_ghc_pkg_tool join local-pkg-db + ./setup configure --prefix=$out --package-db=local-pkg-db + ./setup build + ./setup install + ''; + + buildInputs = (with args; [ghc] ++ libs); + + meta = { + description = "automate some parts of the process of writing Haskell bindings to C code"; + homepage = http://www.flapjax-lang.org/; + license = "BSD3"; + }; +} diff --git a/pkgs/misc/bleeding-edge-fetch-info/hsc2hs.nix b/pkgs/misc/bleeding-edge-fetch-info/hsc2hs.nix new file mode 100644 index 00000000000..8d0bdea1a9a --- /dev/null +++ b/pkgs/misc/bleeding-edge-fetch-info/hsc2hs.nix @@ -0,0 +1,3 @@ + args: with args; fetchurl { + url = http://mawercer.de/~nix/repos/hsc2hs.tar.gz; + sha256 = "3179eba85e56f30250793dbb612ffb8ad869e37297a185c2e0fb29134afb73af";} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5194b9efe08..2f10b55d867 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1942,6 +1942,12 @@ let pkgs = rec { inherit cabal; }; + hsc2hs = import ../development/tools/documentation/hs2hs { + inherit bleedingEdgeRepos stdenv; + ghc = ghcsAndLibs.ghc68.ghc; + libs = with (ghc68extraLibs ghcsAndLibs.ghc68 // ghcsAndLibs.ghc68.core_libs); [ base directory process cabal_darcs ]; + }; + guileLint = import ../development/tools/guile/guile-lint { inherit fetchurl stdenv guile; };