Skip to content

Instantly share code, notes, and snippets.

@joehealy
Created September 3, 2018 20:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joehealy/3b9c3a053a87b617c1686605d9995e73 to your computer and use it in GitHub Desktop.
Save joehealy/3b9c3a053a87b617c1686605d9995e73 to your computer and use it in GitHub Desktop.
{ nixpkgs ? import <nixpkgs> {}, compiler ? "default" }:
let
inherit (nixpkgs) pkgs;
f = { mkDerivation, ad, aeson, base, bytestring, containers
, deepseq, filepath, process, random, raw-strings-qq, split, stdenv
, tasty, tasty-expected-failure, tasty-golden, tasty-hunit
, temporary, python3, python3Packages.matplotlib
}:
mkDerivation {
pname = "matplotlib";
version = "0.6.0";
src = ./.;
libraryHaskellDepends = [
aeson base bytestring containers deepseq filepath process split
temporary python3 python3Packages.matplotlib
];
testHaskellDepends = [
ad base bytestring process random raw-strings-qq split tasty
tasty-expected-failure tasty-golden tasty-hunit temporary
];
homepage = "https://github.com/abarbu/matplotlib-haskell";
description = "Bindings to Matplotlib; a Python plotting library";
license = stdenv.lib.licenses.bsd3;
};
haskellPackages = if compiler == "default"
then pkgs.haskellPackages
else pkgs.haskell.packages.${compiler};
drv = 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