Created
February 27, 2018 10:36
-
-
Save idontgetoutmuch/42cfa13844b970be35a7c83de628eb11 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| { nixpkgs ? import <nixpkgs> { overlays = [(self: super: {gsl = super.gsl.overrideAttrs (o: {CFLAGS = "-DDEBUG";});})]; } | |
| , compiler ? "ghc822" | |
| , doBenchmark ? false }: | |
| let | |
| inherit (nixpkgs) pkgs; | |
| f = { mkDerivation, ad, array, base, bytestring, cassava, containers | |
| , datasets, diagrams-lib, diagrams-rasterific, foldl, Frames, ghc-prim, gsl | |
| , hmatrix, hmatrix-gsl | |
| , inline-r, lens, mtl, pipes, plots, random-fu, R, random-source | |
| , stdenv, template-haskell, text, typelits-witnesses, vector, vinyl }: | |
| # hmatrix-gsl = hmatrix-gsl.overrideAttrs (oldAttrs: rec { | |
| # src = nixpkgs.fetchgit { | |
| # url = git://github.com/albertoruiz/hmatrix; | |
| # rev = "d83b17190029c11e3ab8b504e5cdc917f5863120"; | |
| # sha256 = "3b2de54224963ee17857a9737b65d49edc423e06ad7e9c9b85d9f69ca923676a"; | |
| # }; | |
| # }); | |
| mkDerivation { | |
| pname = "variational"; | |
| version = "0.1.0.0"; | |
| src = ./.; | |
| isLibrary = false; | |
| isExecutable = true; | |
| executableHaskellDepends = [ | |
| ad | |
| array | |
| base | |
| bytestring | |
| cassava | |
| containers | |
| datasets | |
| diagrams-lib | |
| diagrams-rasterific | |
| foldl | |
| Frames | |
| ghc-prim | |
| hmatrix | |
| # patched-hmatrix-gsl | |
| hmatrix-gsl | |
| inline-r | |
| lens | |
| mtl | |
| pipes | |
| plots | |
| random-fu | |
| random-source | |
| template-haskell | |
| text | |
| typelits-witnesses | |
| vector | |
| vinyl | |
| ]; | |
| executableSystemDepends = [ | |
| gsl | |
| R | |
| pkgs.rPackages.anytime | |
| pkgs.rPackages.ggplot2 | |
| pkgs.rPackages.maptools | |
| pkgs.rPackages.reshape2 | |
| pkgs.rPackages.rgeos | |
| pkgs.rPackages.rgdal | |
| pkgs.rPackages.rstan ]; | |
| license = stdenv.lib.licenses.bsd3; | |
| }; | |
| haskellPackages = if compiler == "default" | |
| then pkgs.haskellPackages | |
| else pkgs.haskell.packages.${compiler}; | |
| variant = if doBenchmark then pkgs.haskell.lib.doBenchmark else pkgs.lib.id; | |
| drv = variant (haskellPackages.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