diff --git a/.travis.yml b/.travis.yml index bd70b40..43c1335 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/default.nix b/default.nix index ed703ab..47275d6 100644 --- a/default.nix +++ b/default.nix @@ -17,6 +17,7 @@ let in (import ./project.nix nixpkgs) { + haskellPackages = haskellPackages; packages = { common = ./common; backend = ./backend; diff --git a/project.nix b/project.nix index 079c033..8301d39 100644 --- a/project.nix +++ b/project.nix @@ -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}"; diff --git a/release.nix b/release.nix index afd47d4..db007a4 100644 --- a/release.nix +++ b/release.nix @@ -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; }; +}