This commit is contained in:
Mats Rauhala 2018-11-12 23:40:04 +02:00
parent f9dbbf8321
commit 5490065604
4 changed files with 12 additions and 6 deletions

View File

@ -9,3 +9,4 @@ before_script:
script:
- nix-build ./release.nix --option trusted-public-keys "masser-ebook-manager.cachix.org-1:mtFSkQ2MO5MvjUpulZoFKjKUIa8g8CTcdPVuJaPKS1w= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" --option binary-caches "https://cache.nixos.org https://masser-ebook-manager.cachix.org" -A ghc.backend -A ghc.frontend
- nix-build ./release.nix --option trusted-public-keys "masser-ebook-manager.cachix.org-1:mtFSkQ2MO5MvjUpulZoFKjKUIa8g8CTcdPVuJaPKS1w= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" --option binary-caches "https://cache.nixos.org https://masser-ebook-manager.cachix.org" -A ghcjs.frontend

View File

@ -17,6 +17,7 @@ let
in
(import ./project.nix nixpkgs) {
haskellPackages = haskellPackages;
packages = {
common = ./common;
backend = ./backend;

View File

@ -6,7 +6,8 @@ let
in
{ packages
{ haskellPackages
, packages
, overrides ? _ : _ : {}
, tools ? []
}:
@ -14,15 +15,15 @@ in
let
overrides' = nixpkgs.lib.foldr nixpkgs.lib.composeExtensions (_: _: {}) [
(self: super: mapAttrs (name: path: self.callCabal2nix name path {}) packages)
(self: super: mapAttrs (name: path: nixpkgs.haskellPackages.callCabal2nix name path {}) packages)
overrides
];
haskellPackages = nixpkgs.haskellPackages.override { overrides = overrides'; };
packages' = mapAttrs (name: _: haskellPackages."${name}") packages;
haskellPackages' = haskellPackages.override { overrides = overrides'; };
packages' = mapAttrs (name: _: haskellPackages'."${name}") packages;
mkShell = name: pkg:
let
n = "${name}-shell";
deps = haskellPackages.ghcWithHoogle (pkgs: pkg.buildInputs ++ pkg.propagatedBuildInputs);
deps = haskellPackages'.ghcWithHoogle (pkgs: pkg.buildInputs ++ pkg.propagatedBuildInputs);
in
{
name = "${n}";

View File

@ -12,4 +12,7 @@ let
in
import ./default.nix { nixpkgs = pinnedPkgs; haskellPackages = pinnedPkgs.haskellPackages; }
{
ghc = import ./default.nix { nixpkgs = pinnedPkgs; haskellPackages = pinnedPkgs.haskell.packages.ghc843; };
ghcjs = import ./default.nix { nixpkgs = pinnedPkgs; haskellPackages = pinnedPkgs.haskell.packages.ghcjs84; };
}