Skip to content

Commit d9dbdd4

Browse files
authored
buildFromSdist: enable only for local packages (#298)
1 parent b1db0d5 commit d9dbdd4

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
- Breaking changes
66
- #221: Switch from `buildFromCabalSdist` to `buildFromSdist`, to allow using non-standard package sets (wherein `cabal-install` is otherwise built without using user's overrides)
7-
- #253: Enable controlling `buildFromSdist` through `settings.<name>.buildFromSdist`. (This was turned off by default originally, but was turned on by default in #286)
7+
- #253: Enable controlling `buildFromSdist` through `settings.<name>.buildFromSdist`. (This was turned off by default originally, but was turned on by default in #286, limited to local packages in #298)
88
- Enhancements
99
- `settings` module:
1010
- #210: Add `extraLibraries` to `settings` module.

nix/modules/project/defaults.nix

+3-6
Original file line numberDiff line numberDiff line change
@@ -84,21 +84,18 @@ in
8484
'';
8585
default =
8686
let
87-
globalSettings = {
88-
# Make sure all files we use are included in the sdist, as a check
89-
# for release-worthiness.
90-
buildFromSdist = lib.mkDefault true;
91-
};
9287
localSettings = { name, package, config, ... }:
9388
lib.optionalAttrs (package.local.toDefinedProject or false) {
9489
# Disabling haddock and profiling is mainly to speed up Nix builds.
9590
haddock = lib.mkDefault false; # Because, this is end-user software. No need for library docs.
9691
libraryProfiling = lib.mkDefault false; # Avoid double-compilation.
92+
# Make sure all files we use are included in the sdist, as a check
93+
# for release-worthiness.
94+
buildFromSdist = lib.mkDefault true;
9795
};
9896
in
9997
if config.defaults.enable then {
10098
imports = [
101-
globalSettings
10299
localSettings
103100
];
104101
} else { };

0 commit comments

Comments
 (0)