Skip to content

Commit

Permalink
Update haskell.nix input and adapt flake to new version
Browse files Browse the repository at this point in the history
  • Loading branch information
neilmayhew committed Oct 12, 2024
1 parent d2f1eee commit afb8d45
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 18 deletions.
32 changes: 16 additions & 16 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
outputs = { self, nixpkgs, flake-utils, foliage, haskell-nix, CHaP, iohk-nix, ... }:
let
inherit (nixpkgs) lib;
inherit (import ./nix/chap-meta.nix { inherit lib CHaP; }) chap-package-latest-versions chap-package-versions mkPackageTreeWith;
inherit (import ./nix/chap-meta.nix { inherit lib CHaP; })
chap-package-latest-versions chap-package-versions mkPackageTreeWith addPackageKeys;

smokeTestPackages = [
"plutus-ledger-api"
Expand Down Expand Up @@ -231,7 +232,7 @@
# Extra configurations (possibly compiler-dependent) to add to all projects.
extraConfig = compiler:
{
modules = [
modules = builtins.map addPackageKeys [
{
# Packages that depend on the plutus-tx plugin have broken haddock
packages = {
Expand Down
8 changes: 8 additions & 0 deletions nix/chap-meta.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,20 @@ let
mkPackageTreeWith = f:
builtins.mapAttrs (name: versions: lib.genAttrs versions (f name));

# addPackageKeys :: AttrSet -> AttrSet
#
# Add a `package-keys` attribute listing the keys used in the packages attribute.
# Needed since haskell.nix:61fbe408c01b6d61d010e6fb8e78bd19b5b025cc
#
addPackageKeys = x:
x // { package-keys = builtins.attrNames (if x.packages._type or "" == "if" then x.packages.content else x.packages); };
in
{
inherit
chap-package-meta
chap-package-versions
chap-package-latest-versions
mkPackageTreeWith
addPackageKeys
;
}

0 comments on commit afb8d45

Please sign in to comment.