Skip to content

Commit

Permalink
fixup! Update nix-shell for Haskell.nix changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rvl committed Mar 12, 2021
1 parent 629449a commit 980a66f
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions nix/build-tools-overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,11 @@ pkgs: super: let
# A script for updating materialized files
regenerateMaterialized = pkgs.writeShellScriptBin "regenerate-materialized-nix"
(pkgs.lib.optionalString enableMaterialization
(pkgs.lib.concatStringsSep "\n" (pkgs.lib.mapAttrsToList (name: tool: ''
printf '\n\n\n*** Updating materialized nix for ${name} ***\n\n'
${mkMaterialize name tool}
'') tools)));
mkMaterialize = name: args: let
plan = (mkTool name (args // { checkMaterialization = true; })).project.plan-nix;
in
plan.generateMaterialized or "echo fixme";
(pkgs.lib.concatStringsSep "\n" (pkgs.lib.mapAttrsToList (name: hsPkg: ''
echo 'Updating materialized nix for ${name}'
${mkMaterialize hsPkg}
'') hsPkgs)));
mkMaterialize = hsPkg: hsPkg.project.plan-nix.passthru.updateMaterialized;
# https://github.com/input-output-hk/nix-tools/issues/97
enableMaterialization = pkgs.stdenv.isLinux;

Expand Down

0 comments on commit 980a66f

Please sign in to comment.