diff --git a/flake.nix b/flake.nix index 0961922..e1e41a8 100644 --- a/flake.nix +++ b/flake.nix @@ -126,7 +126,6 @@ "--ghc-option=-fomit-interface-pragmas" "--disable-split-sections" "--ghc-option=-j1" - "--disable-shared" # GHC 9.10.3 bug: libHSghc-9.10.3-5702.a is truncated (last AR # entry Expr.o claims 517544 bytes but only 82258 remain). # GHC's internal static linker (readAr via Data.Binary.Get) panics @@ -168,35 +167,6 @@ printf 'module Generated.ActualTypes\n ( %s ) where\n' "$_exports" printf '%s\n' "$_imports" } > "$_actual.new" && mv "$_actual.new" "$_actual" - - # Stub Generated.Types (inter-hub-lib reads original from its sourceRoot) - printf '%s\n' 'module Generated.Types () where' \ - > "$sourceRoot/build/Generated/Types.hs" - ''; - }) - else if (args.pname or "") == "inter-hub-lib" - then drv.overrideAttrs (old: { - # Generated.Types is an empty stub in models — hub removed to avoid - # module M re-export crash. Replace every bare `import Generated.Types` - # with direct imports of the 119 individual entity modules. - # Generated.ActualTypes hub is still functional (explicit T(..) exports), - # so no patching needed for ActualTypes imports in this package. - postUnpack = (old.postUnpack or "") + '' - _types="$sourceRoot/build/Generated/Types.hs" - _imp=$(mktemp) - awk '/^import Generated\./{print "import " $2}' "$_types" > "$_imp" - find "$sourceRoot" -name "*.hs" | while IFS= read -r _f; do - if grep -qE "^import Generated\.Types$" "$_f"; then - awk -v imp="$_imp" ' - /^import Generated\.Types$/{ - while ((getline ln < imp) > 0) print ln - close(imp) - next - } - { print }' "$_f" > "$_f.new" && mv "$_f.new" "$_f" - fi - done - rm -f "$_imp" ''; }) else drv;