Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Nix expression for Exference
{ nixpkgs ? import <nixpkgs> {}, compiler ? "default" }:
let
inherit (nixpkgs) pkgs;
f = { mkDerivation, base, base-orphans, bifunctors, containers
, data-pprint, deepseq, deepseq-generics, directory, either
, hashable, haskell-src-exts, hood, lens, mmorph, mtl, multistate
, parsec, pqueue, pretty, process, safe, split, stdenv
, template-haskell, transformers, unordered-containers, vector
}:
mkDerivation {
pname = "exference";
version = "1.6.0.0";
src = ./.;
isLibrary = true;
isExecutable = true;
enableSeparateDataOutput = true;
libraryHaskellDepends = [
base base-orphans bifunctors containers deepseq deepseq-generics
directory either hashable haskell-src-exts hood lens mmorph mtl
multistate parsec pqueue pretty process safe split template-haskell
transformers unordered-containers vector
];
executableHaskellDepends = [
base containers data-pprint deepseq either haskell-src-exts hood
mtl multistate process transformers
];
homepage = "https://github.com/lspitzner/exference";
description = "Tool to search/generate (haskell) expressions with a given type";
license = stdenv.lib.licenses.bsd3;
jailbreak = true;
doHaddock = false;
};
haskellPackages = (if compiler == "default"
then pkgs.haskellPackages
else pkgs.haskell.packages.${compiler}).override {
overrides = self: super: {
haskell-src-exts = self.callHackage "haskell-src-exts" "1.17.1" {};
};
};
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