Created
July 27, 2019 11:10
-
-
Save idontgetoutmuch/521682cf0b47328114c7ea18c0727672 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> {}, doBenchmark ? false }: | |
let | |
f = { mkDerivation, haskell, base, foldl, Frames, fuzzyset | |
, inline-r, integration, lens, libintlOrEmpty | |
, monad-loops | |
, R, random, stdenv | |
, template-haskell, temporary }: | |
mkDerivation { | |
pname = "mrp"; | |
version = "1.0.0"; | |
src = ./.; | |
isLibrary = false; | |
isExecutable = true; | |
executableHaskellDepends = [ | |
base | |
(haskell.lib.dontCheck inline-r) | |
foldl | |
Frames | |
fuzzyset | |
integration | |
lens | |
monad-loops | |
random | |
template-haskell | |
temporary | |
]; | |
buildDepends = [ libintlOrEmpty ]; | |
executableSystemDepends = [ | |
R | |
pkgs.rPackages.dplyr | |
pkgs.rPackages.ggmap | |
pkgs.rPackages.ggplot2 | |
pkgs.rPackages.knitr | |
pkgs.rPackages.maptools | |
pkgs.rPackages.reshape2 | |
pkgs.rPackages.rgeos | |
pkgs.rPackages.rgdal | |
pkgs.rPackages.rstan | |
pkgs.rPackages.zoo]; | |
license = stdenv.lib.licenses.bsd3; | |
}; | |
haskellPackages = pkgs.haskellPackages; | |
# Fixup a few things | |
myHaskellPackages = haskellPackages.override { | |
overrides = self: super: with pkgs.haskell.lib; { | |
inline-r = dontCheck super.inline-r; | |
}; | |
}; | |
variant = if doBenchmark then pkgs.haskell.lib.doBenchmark else pkgs.lib.id; | |
drv = variant (myHaskellPackages.callPackage f {}); | |
in | |
if pkgs.lib.inNixShell then drv.env else drv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment