File tree Expand file tree Collapse file tree 2 files changed +59
-2
lines changed Expand file tree Collapse file tree 2 files changed +59
-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
313319 }
314320 ] ;
315321
322+ extraHackagePackages = with nixpkgs . lib ;
323+ ( concatLists ( map
324+ ( extraSource : ( map
325+ ( subdir :
326+ if subdir == "." then extraSource . src . outPath else "${ extraSource . src . outPath } /${ subdir } " )
327+ extraSource . subdirs ) )
328+ extraSources ) ) ;
329+
316330 projectFor = system :
317331 let
318332 pkgs = nixpkgsFor system ;
319333 pkgs' = nixpkgsFor' system ;
334+ # Usage:
335+ extraHackage = inputs . haskell-nix-extra-hackage . mkHackage . ${ system } extraHackagePackages ;
320336 in
321337 pkgs . haskell-nix . cabalProject' {
322338 src = ./. ;
323- inherit cabalProjectLocal extraSources ;
339+ inherit cabalProjectLocal ;
324340 name = "bot-plutus-interface" ;
325341 compiler-nix-name = "ghc8107" ;
342+
343+ extra-hackages = [ ( import extraHackage . hackageNix ) ] ;
344+ extra-hackage-tarballs = [ { name = "extraHackage" ; index = extraHackage . hackageTarball ; } ] ;
345+ modules = [ extraHackage . module ] ++ haskellModules ;
346+
326347 shell = {
327348 additional = ps : [
328349 ps . plutus-pab
342363 nixpkgs-fmt
343364 ] ;
344365 } ;
345- modules = haskellModules ;
346366 } ;
347367
348368 formatCheckFor = system :
You can’t perform that action at this time.
0 commit comments