Add lambdabot wrapper and mueval wrapper to make lambdabot run out of the box

This commit is contained in:
Luca Bruno 2014-07-09 15:39:12 +02:00
parent 0cba70391b
commit d05a86a1de
3 changed files with 60 additions and 0 deletions

View File

@ -0,0 +1,19 @@
{ stdenv, lambdabot, mueval, makeWrapper }:
stdenv.mkDerivation {
name = "lambdabot-wrapper";
buildInputs = [ makeWrapper ];
buildCommand = ''
makeWrapper "${lambdabot}/bin/lambdabot" "$out/bin/lambdabot" \
--prefix PATH : "${mueval}/bin"
'';
preferLocalBuild = true;
meta = {
description = lambdabot.meta.description;
};
}

View File

@ -0,0 +1,33 @@
{ stdenv, mueval, makeWrapper, ghc
, show, simpleReflect, mtl, random, QuickCheck
, additionalPackages ? [] }:
stdenv.mkDerivation {
name = "mueval-wrapper";
buildInputs = [ makeWrapper show simpleReflect mtl random QuickCheck ]
++ additionalPackages;
ghcVersion = ghc.version;
buildCommand = ''
PKGPATH=""
for p in $nativePkgs; do
for i in "$p/lib/ghc-$ghcVersion/package.conf.d/"*.installedconf; do
PKGPATH=$PKGPATH''${PKGPATH:+:}$i
done
done
makeWrapper "${mueval}/bin/mueval" "$out/bin/mueval" \
--prefix PATH : "${mueval}/bin" \
--prefix GHC_PACKAGE_PATH : "$PKGPATH" \
--set GHC_PACKAGE_PATH "\$GHC_PACKAGE_PATH:" # always end with : to include base packages
'';
preferLocalBuild = true;
meta = {
description = mueval.meta.description;
};
}

View File

@ -1349,6 +1349,12 @@ self : let callPackage = x : y : modifyPrio (newScope self x y); in
lambdabot = callPackage ../development/libraries/haskell/lambdabot {};
lambdabotWrapper = callPackage ../development/libraries/haskell/lambdabot/wrapper.nix {
mueval = self.muevalWrapper.override {
additionalPackages = [ self.lambdabot ];
};
};
lambdabotUtils = callPackage ../development/libraries/haskell/lambdabot-utils {};
lambdacubeEngine = callPackage ../development/libraries/haskell/lambdacube-engine {};
@ -1544,6 +1550,8 @@ self : let callPackage = x : y : modifyPrio (newScope self x y); in
mueval = callPackage ../development/libraries/haskell/mueval {};
muevalWrapper = callPackage ../development/libraries/haskell/mueval/wrapper.nix {};
multiarg = callPackage ../development/libraries/haskell/multiarg {};
multimap = callPackage ../development/libraries/haskell/multimap {};