nixos/no-x-libs: add more replacements#204287
Conversation
|
@Artturin Is there an easy way to measure the delta in the closure size? |
this doesn't change the closure size much (atleast for a minimal-ish system assuming i did the comparison correctly) but instead reduces the dependency tree size ( reducing compilation times if compiling from ex staging) {
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/refs/pull/204287/head";
# commit before the above pr
nixpkgs-before.url = "github:NixOS/nixpkgs/7bfceb02093f2c7ea0ea7e353c99b26e9a4022fc";
};
outputs = inputs:
let
pkgs = import inputs.nixpkgs { system = "x86_64-linux"; };
pkgs-before = import inputs.nixpkgs-before { system = "x86_64-linux"; };
node = pkgs.nixos ({ modulesPath, ... }: {
fileSystems."/".device = "ignore-root-device";
boot.loader.grub.enable = false;
imports = [
(modulesPath + "/profiles/minimal.nix")
];
networking.networkmanager = {
enable = true;
plugins = pkgs.lib.mkForce [];
};
});
node-before = pkgs-before.nixos ({ modulesPath, ... }: {
fileSystems."/".device = "ignore-root-device";
boot.loader.grub.enable = false;
imports = [
(modulesPath + "/profiles/minimal.nix")
];
networking.networkmanager = {
enable = true;
plugins = pkgs.lib.mkForce [];
};
nixpkgs.overlays = [
(_: super: {
# had to add this because the compilation was broken before
stoken = super.stoken.override { withGTK3 = false; };
})
];
});
closureInfo = pkgs.closureInfo { rootPaths = [ node.config.system.build.toplevel ]; };
closureInfoBefore = pkgs.closureInfo { rootPaths = [ node-before.config.system.build.toplevel ]; };
in
{
packages.x86_64-linux.default = pkgs.runCommand "compare"
{
inherit closureInfo closureInfoBefore;
nativeBuildInputs = [ pkgs.nodePackages.insect ];
} ''
sizeBytes=$(cat $closureInfo/total-nar-size)
sizeBeforeBytes=$(cat $closureInfoBefore/total-nar-size)
insect "$((sizeBeforeBytes - sizeBytes)) bytes -> megabytes"
touch $out
'';
packages.x86_64-linux.has-libX = closureInfoBefore;
packages.x86_64-linux.no-libX = closureInfo;
};
} |
nixos/modules/config/no-x-libs.nix
Outdated
There was a problem hiding this comment.
Can we please add an option instead of overwriting packages to null? This would for example break if we access libXpm.version.
There was a problem hiding this comment.
| gd = super.gd.override { libXpm = null; }; | |
| gd = super.gd.override { withXorg = false; }; |
pkgs/top-level/all-packages.nix
Outdated
There was a problem hiding this comment.
Let me create a PR that adds a proper option for this.
nixos/modules/config/no-x-libs.nix
Outdated
There was a problem hiding this comment.
| gd = super.gd.override { libXpm = null; }; | |
| gd = super.gd.override { withXorg = false; }; |
|
FYI you motivated to try this again especially for my simd branch and I created the following PRs: |
|
Related
|
eccd9f5 to
b7afcc1
Compare
2be05f1 to
2cff6fd
Compare
2cff6fd to
2c01d5f
Compare
|
Why not merge this into staging? |
|
Needed to create a new PR because force pushing that one almost deadlocked my computer. #211428 |
all-packages: change -nox overrides to callPackage's so there is no infinite recursion when replacing the package with a overlay
2c01d5f to
9a34bb2
Compare
|
This PR causes this error: |
| gpsd = super.gpsd.override { guiSupport = false; }; | ||
| imagemagick = super.imagemagick.override { libX11Support = false; libXtSupport = false; }; | ||
| imagemagickBig = super.imagemagickBig.override { libX11Support = false; libXtSupport = false; }; | ||
| libdevil = super.libdevil-nox; |
There was a problem hiding this comment.
libdevil -> libdevil-nox -> libdevil -> libdevil-nox ...
There was a problem hiding this comment.
changing this back to
libdevil-nox = callPackage ../development/libraries/libdevil {
inherit (darwin.apple_sdk.frameworks) OpenGL;
withXorg = false;
};will work
There was a problem hiding this comment.
Ahh, sorry, messed this up when rebasing.
all-packages: change -nox overrides to callPackage's so there is no infinite recursion when replacing the package with a overlay
Description of changes
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)nixos/doc/manual/md-to-db.shto update generated release notes