File tree Expand file tree Collapse file tree 2 files changed +47
-2
lines changed Expand file tree Collapse file tree 2 files changed +47
-2
lines changed Original file line number Diff line number Diff line change 66
77 nixpkgs . follows = "haskell-nix/nixpkgs-unstable" ;
88
9+ haskell-nix-extra-hackage = {
10+ url = "github:mlabs-haskell/haskell-nix-extra-hackage/main" ;
11+ inputs . nixpkgs . follows = "nixpkgs" ;
12+ inputs . haskell-nix . follows = "haskell-nix" ;
13+ } ;
14+
915 iohk-nix . url = "github:input-output-hk/iohk-nix" ;
1016 iohk-nix . flake = false ; # Bad Nix code
1117
335341 }
336342 ] ;
337343
344+ extraHackagePackages = with nixpkgs . lib ;
345+ ( concatLists ( map
346+ ( extraSource : ( map
347+ ( subdir :
348+ if subdir == "." then extraSource . src . outPath else "${ extraSource . src . outPath } /${ subdir } " )
349+ extraSource . subdirs ) )
350+ extraSources ) ) ;
351+
338352 projectFor = system :
339353 let
340354 pkgs = nixpkgsFor system ;
341355 pkgs' = nixpkgsFor' system ;
356+ # Usage:
357+ extraHackage = inputs . haskell-nix-extra-hackage . mkHackage . ${ system } extraHackagePackages ;
342358 in
343359 pkgs . haskell-nix . cabalProject' {
344360 src = ./. ;
345- inherit cabalProjectLocal extraSources ;
361+ inherit cabalProjectLocal ;
346362 name = "bot-plutus-interface" ;
347363 compiler-nix-name = "ghc8107" ;
364+
365+ extra-hackages = [ ( import extraHackage . hackageNix ) ] ;
366+ extra-hackage-tarballs = [ { name = "extraHackage" ; index = extraHackage . hackageTarball ; } ] ;
367+ modules = [ extraHackage . module ] ++ haskellModules ;
368+
348369 shell = {
349370 additional = ps : [
350371 ps . plutus-pab
364385 nixpkgs-fmt
365386 ] ;
366387 } ;
367- modules = haskellModules ;
368388 } ;
369389
370390 formatCheckFor = system :
You can’t perform that action at this time.
0 commit comments