Skip to content

Instantly share code, notes, and snippets.

@ocharles
Last active September 3, 2020 08:13
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 ocharles/9c6ce08484cc5d1917dfb9515725472a to your computer and use it in GitHub Desktop.
Save ocharles/9c6ce08484cc5d1917dfb9515725472a to your computer and use it in GitHub Desktop.
{ # Fetch the latest haskell.nix and import its default.nix
haskellNix ? import ../haskell.nix {}
# haskell.nix provides access to the nixpkgs pins which are used by our CI,
# hence you will be more likely to get cache hits when using these.
# But you can also just use your own, e.g. '<nixpkgs>'.
, nixpkgsSrc ? haskellNix.sources.nixpkgs-2003
# haskell.nix provides some arguments to be passed to nixpkgs, including some
# patches and also the haskell.nix functionality itself as an overlay.
, nixpkgsArgs ? haskellNix.nixpkgsArgs
# import nixpkgs with overlays
, pkgs ? import nixpkgsSrc nixpkgsArgs
}: pkgs.haskell-nix.project {
compiler-nix-name = "ghc8101";
# 'cleanGit' cleans a source directory based on the files known by git
src = pkgs.haskell-nix.haskellLib.cleanGit {
name = "haskell-nix-project";
src = ./.;
};
modules = [
{ packages.opencv = {
postUnpack = "touch LICENSE";
hardeningDisable = [ "bindnow" ];
};
}
];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment