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: 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 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 in
(import ./project.nix nixpkgs) { (import ./project.nix nixpkgs) {
haskellPackages = haskellPackages;
packages = { packages = {
common = ./common; common = ./common;
backend = ./backend; backend = ./backend;

View File

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

View File

@ -12,4 +12,7 @@ let
in 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; };
}