canvas/default.nix

66 lines
1.8 KiB
Nix
Raw Normal View History

2020-02-05 06:21:39 +00:00
let
# import niv packages
sources = import ./nix/sources.nix;
overlay = _: pkgs:
{ niv = import sources.niv {}; # use the sources :)
};
2020-02-06 04:10:56 +00:00
pkgs1 = import sources.nixpkgs {
2020-02-05 06:21:39 +00:00
overlays = [ overlay ];
config = {};
2020-02-06 04:10:56 +00:00
#import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz)
};
# Import the Haskell.nix library,
pkgs2 = import <nixpkgs>
(import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz))
;
pkgs = pkgs1 // pkgs2;
2020-02-05 06:21:39 +00:00
2020-02-07 23:15:53 +00:00
cabal-doctest = (hackage: {
cabal-doctest = hackage.cabal-doctest."1.0.8".revisions.default;
});
gtk2hs-buildtools = (hackage: {
gtk2hs-buildtools = hackage.gtk2hs-buildtools."0.13.8.0".revisions.default;
});
hashtables = (hackage: {
hashtables = hackage.hashtables."1.2.3.4".revisions.default;
});
alex = (hackage: {
alex = hackage.alex."3.2.5".revisions.default;
});
happy = (hackage: {
happy = hackage.happy."1.19.12".revisions.default;
});
2020-02-05 06:21:39 +00:00
# Import the file you will create in the stack-to-nix or cabal-to-nix step.
my-pkgs = import ./pkgs.nix;
# Cabal projects use this:
pkgSet = pkgs.haskell-nix.mkCabalProjectPkgSet {
plan-pkgs = my-pkgs;
2020-02-07 23:15:53 +00:00
pkg-def-extras = [
cabal-doctest
gtk2hs-buildtools
hashtables
alex
happy
];
2020-02-05 06:21:39 +00:00
modules = [
2020-02-09 01:38:02 +00:00
{
enableExecutableProfiling = true;
enableLibraryProfiling = true;
}
2020-02-05 06:21:39 +00:00
# specific package overrides would go here
# example:
# packages.cbors.package.ghcOptions = "-Werror";
# packages.cbors.patches = [ ./one.patch ];
# packages.cbors.flags.optimize-gmp = false;
# It may be better to set flags in `cabal.project` instead
# (`plan-to-nix` will include them as defaults).
];
};
2020-02-06 04:10:56 +00:00
in pkgSet.config.hsPkgs //
{ _config = pkgSet.config; }