Skip to content

Instantly share code, notes, and snippets.

@3noch
Created September 12, 2017 04:30
Show Gist options
  • Save 3noch/4f95763cd9e573c2dbe24ff51c473b5f to your computer and use it in GitHub Desktop.
Save 3noch/4f95763cd9e573c2dbe24ff51c473b5f to your computer and use it in GitHub Desktop.
project-m36.nix
nix-build project-m36.nix
# to open a shell where cabal works
nix-shell -E '(import ./project-m36.nix {}).env'
# cabal build
{ pkgs ? import <nixpkgs> {} }:
with pkgs;
let
project-m36-src = fetchFromGitHub {
owner = "agentm";
repo = "project-m36";
rev = "c7a5965e6ccc924c25e981d30442c3906989ba2e";
sha256 = "04zcmkjz5kia23irs8j0g6v9dg7al7f59ajb1xaai6p4jhkgflxx";
};
# or point to a folder
# project-m36-src = ./local-folder;
haskellPkgs = haskellPackages.override {
overrides = self: super: {
extended-reals = haskell.lib.dontCheck super.extended-reals; # needs newer version of HUnit
distributed-process-systest = haskell.lib.doJailbreak super.distributed-process-systest;
distributed-process-extras = haskell.lib.doJailbreak super.distributed-process-extras;
distributed-process-async = haskell.lib.doJailbreak super.distributed-process-async;
distributed-process-client-server = haskell.lib.doJailbreak super.distributed-process-client-server;
project-m36 = haskell.lib.dontHaddock (haskell.lib.dontCheck (
self.callCabal2nix "project-m36" project-m36-src {}));
};
};
in haskellPkgs.project-m36
@3noch
Copy link
Author

3noch commented Sep 12, 2017

To enable tests, get rid of haskell.lib.dontCheck for project-m36.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment