Skip to content

Commit 8682d9c

Browse files
michaelpjkderme
authored andcommitted
Pass through inputMap
1 parent bbfcd24 commit 8682d9c

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

flake.nix

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
supportedSystems = import ./supported-systems.nix;
4040
defaultSystem = head supportedSystems;
4141

42+
inputMap = { "https://input-output-hk.github.io/cardano-haskell-packages" = CHaP; };
43+
4244
overlays = [
4345
haskellNix.overlay
4446
iohkNix.overlays.haskell-nix-extra
@@ -57,7 +59,7 @@
5759
environments;
5860
};
5961
})
60-
(import ./nix/pkgs.nix)
62+
(import ./nix/pkgs.nix { inherit inputMap; })
6163
];
6264

6365
in eachSystem supportedSystems (system:

nix/haskell.nix

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@
77
# Enable profiling
88
, profiling ? config.haskellNix.profiling or false
99
# Version info, to be passed when not building from a git work tree
10-
, gitrev }:
10+
, gitrev
11+
# Map from URLs to input, for custom hackage sources
12+
, inputMap }:
1113
let
1214

1315
projectPackages = lib.attrNames (haskell-nix.haskellLib.selectProjectPackages
1416
(haskell-nix.cabalProject' {
15-
inherit src;
17+
inherit src inputMap;
1618
compiler-nix-name = compiler;
1719
}).hsPkgs);
1820

@@ -58,7 +60,7 @@ let
5860
# This creates the Haskell package set.
5961
# https://input-output-hk.github.io/haskell.nix/user-guide/projects/
6062
pkgSet = haskell-nix.cabalProject' {
61-
inherit src;
63+
inherit src inputMap;
6264
compiler-nix-name = compiler;
6365
modules = [
6466
{

nix/pkgs.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{ inputMap }:
12
# our packages overlay
23
final: prev:
34
with final;
@@ -14,7 +15,7 @@ in {
1415
name = "cardano-db-sync-schema";
1516
};
1617

17-
cardanoDbSyncProject = callPackage ./haskell.nix { inherit compiler; };
18+
cardanoDbSyncProject = callPackage ./haskell.nix { inherit compiler inputMap; };
1819

1920
cardanoDbSyncHaskellPackages = cardanoDbSyncProject.hsPkgs;
2021

0 commit comments

Comments
 (0)