Skip to content

Instantly share code, notes, and snippets.

@meditans
Created May 7, 2018 15:50
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 meditans/df89fa8c36ec23c6ebd3062be4883be5 to your computer and use it in GitHub Desktop.
Save meditans/df89fa8c36ec23c6ebd3062be4883be5 to your computer and use it in GitHub Desktop.
{ nixpkgs ? import <nixpkgs> {}, compiler ? "default" }:
let
inherit (nixpkgs) pkgs;
f = { mkDerivation, adjunctions, base, concat-inline
, concat-satisfy, constraints, containers, distributive
, finite-typelits, free, ghc-prim, keys, newtype-generics, pointed
, prettyclass, stdenv, transformers, vector-sized
}:
mkDerivation {
pname = "concat-classes";
version = "0.3.0.0";
src = ./.;
libraryHaskellDepends = [
adjunctions base concat-inline concat-satisfy constraints
containers distributive finite-typelits free ghc-prim keys
newtype-generics pointed prettyclass transformers vector-sized
];
description = "Constrained categories";
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