From a85328353a7b9cb9244f47b61c05869ce5ebcaf6 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Mon, 22 Apr 2024 17:48:01 +1000 Subject: [PATCH] fix: buildFromSdist default for haskell-flake managed packages only --- CHANGELOG.md | 2 +- nix/modules/project/defaults.nix | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 777ab1d9..9aeb002b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ - Breaking changes - #221: Switch from `buildFromCabalSdist` to `buildFromSdist`, to allow using non-standard package sets (wherein `cabal-install` is otherwise built without using user's overrides) - - #253: Enable controlling `buildFromSdist` through `settings..buildFromSdist`. (This was turned off by default originally, but was turned on by default in #286, limited to local packages in #298) + - #253: Enable controlling `buildFromSdist` through `settings..buildFromSdist`. (This was turned off by default originally, but was turned on by default in #286, limited to packages defined by haskell-flake in #298 & #306) - Enhancements - `settings` module: - #210: Add `extraLibraries` to `settings` module. diff --git a/nix/modules/project/defaults.nix b/nix/modules/project/defaults.nix index 04ad59cd..a34a58a6 100644 --- a/nix/modules/project/defaults.nix +++ b/nix/modules/project/defaults.nix @@ -131,7 +131,8 @@ in else { }; defaultText = '' - Speed up builds by disabling haddock and library profiling. + Speed up builds by disabling haddock and library profiling. Also ensures + release-worthiness. This uses `local.toDefinedProject` option to determine which packages to override. Thus, it applies to both local packages as well as @@ -144,6 +145,7 @@ in # Disabling haddock and profiling is mainly to speed up Nix builds. haddock = lib.mkDefault false; # Because, this is end-user software. No need for library docs. libraryProfiling = lib.mkDefault false; # Avoid double-compilation. + buildFromSdist = lib.mkDefault true; # Ensure release-worthiness }; }; @@ -191,11 +193,9 @@ in } else { }; defaultText = '' - Make sure all files we use are included in the sdist, as a check for release-worthiness. + Nothing is changed by default. ''; - default = { - buildFromSdist = lib.mkDefault true; - }; + default = { }; }; projectModules.output = mkOption {