Skip to content

Instantly share code, notes, and snippets.

@vaibhavsagar
Created January 30, 2018 08:39
Show Gist options
  • Save vaibhavsagar/de0720511f15e26104e82fbaae06de1a to your computer and use it in GitHub Desktop.
Save vaibhavsagar/de0720511f15e26104e82fbaae06de1a to your computer and use it in GitHub Desktop.
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