mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-05 17:27:50 +00:00
[Optimizations] Add customizable optimizePkg function to configuration
It allows us to share the optimizePkg helper from the optimization to other areas.
This commit is contained in:
parent
903c5ecf86
commit
3145509fcc
1 changed files with 6 additions and 1 deletions
|
|
@ -41,6 +41,12 @@ in {
|
||||||
description = "Add specific compile flags";
|
description = "Add specific compile flags";
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
};
|
};
|
||||||
|
optimizePkg = mkOption {
|
||||||
|
default = optimizePkg;
|
||||||
|
example = "pkg: pkg.override { stdenv = pkgs.fastStdenv; }";
|
||||||
|
description = "Function used for optimizing packages";
|
||||||
|
type = with types; functionTo (functionTo package);
|
||||||
|
};
|
||||||
trace = mkEnableOption "trace attributes in overriden derivations";
|
trace = mkEnableOption "trace attributes in overriden derivations";
|
||||||
blacklist = mkOption {
|
blacklist = mkOption {
|
||||||
default = [ # Broken
|
default = [ # Broken
|
||||||
|
|
@ -113,7 +119,6 @@ in {
|
||||||
level = "slower";
|
level = "slower";
|
||||||
recursive = 1;
|
recursive = 1;
|
||||||
lto = true;
|
lto = true;
|
||||||
extraCFlags = cfg.extraCompileFlags;
|
|
||||||
} super.mesa;
|
} super.mesa;
|
||||||
optipngOptimized = optimizePkg {
|
optipngOptimized = optimizePkg {
|
||||||
level = "unsafe";
|
level = "unsafe";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue