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
316322 }
317323 ] ;
318324
325+ extraHackagePackages = with nixpkgs . lib ;
326+ ( concatLists ( map
327+ ( extraSource : ( map
328+ ( subdir :
329+ if subdir == "." then extraSource . src . outPath else "${ extraSource . src . outPath } /${ subdir } " )
330+ extraSource . subdirs ) )
331+ extraSources ) ) ;
332+
319333 projectFor = system :
320334 let
321335 pkgs = nixpkgsFor system ;
322336 pkgs' = nixpkgsFor' system ;
337+ # Usage:
338+ extraHackage = inputs . haskell-nix-extra-hackage . mkHackage . ${ system } extraHackagePackages ;
323339 in
324340 pkgs . haskell-nix . cabalProject' {
325341 src = ./. ;
326- inherit cabalProjectLocal extraSources ;
342+ inherit cabalProjectLocal ;
327343 name = "bot-plutus-interface" ;
328344 compiler-nix-name = "ghc8107" ;
345+
346+ extra-hackages = [ ( import extraHackage . hackageNix ) ] ;
347+ extra-hackage-tarballs = [ { name = "extraHackage" ; index = extraHackage . hackageTarball ; } ] ;
348+ modules = [ extraHackage . module ] ++ haskellModules ;
349+
329350 shell = {
330351 additional = ps : [
331352 ps . plutus-pab
345366 nixpkgs-fmt
346367 ] ;
347368 } ;
348- modules = haskellModules ;
349369 } ;
350370
351371 formatCheckFor = system :
You can’t perform that action at this time.
0 commit comments