From 81dde4e99ae9054c0aa29e0d2d08333d26a84283 Mon Sep 17 00:00:00 2001 From: Torsten Schmits Date: Sun, 24 Sep 2023 15:02:19 +0200 Subject: [PATCH] always force hpack --- lib/build.nix | 1 + lib/hpack.nix | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/build.nix b/lib/build.nix index 57c16fd..cfb99fa 100644 --- a/lib/build.nix +++ b/lib/build.nix @@ -9,6 +9,7 @@ let allModules = hixModules ++ userModules; + # TODO maybe this could include gen-overrides so the default systems may depend on it onlySystemsConfig = m: if isFunction m then a@{util, ...}: onlySystemsConfig (m a) diff --git a/lib/hpack.nix b/lib/hpack.nix index ae0e489..50ebe7c 100644 --- a/lib/hpack.nix +++ b/lib/hpack.nix @@ -25,13 +25,12 @@ in pkgs.writeScript "hpack.zsh" '' run() { - ${config.internal.basicGhc.hpack}/bin/hpack ${if verbose then "" else "1>/dev/null"} + ${config.internal.basicGhc.hpack}/bin/hpack --force ${if verbose then "" else "1>/dev/null"} } regular() { - local name=$1 rel=$2 - dir="$base/$rel" + local name=$1 rel=$2 dir="$base/$rel" pushd $dir info "$dir" if [[ -f package.yaml ]] @@ -46,10 +45,10 @@ in pkgs.writeScript "hpack.zsh" '' synthetic() { local name=$1 rel=$2 file=$3 - dir="$base/$rel" + local dir="$base/$rel" pushd $dir info "$dir" - remove="$dir/package.yaml" + local remove="$dir/package.yaml" cp $file package.yaml error() { cat $file