1

On NixOS, I'm trying to compile my system without Gnome. For example, network-manager/openconnect has a withGnome option:

{ stdenv, fetchurl, openconnect, intltool, pkgconfig, networkmanager, libsecret
, withGnome ? true, gnome3, procps, kmod }:

I would like to set that to false; but while I could do that with an overlay, I'm unclear how to set withGnome to false for all packages built as part of the system.

In 6.1.1 of the nixos manual, is the following; but this seems to be about overriding a single package for the benefit of all dependents, rather than overriding all packages with a single option.

The overrides shown above are not global. They do not affect the original package; other packages in Nixpkgs continue to depend on the original rather than the customised package. This means that if another package in your system depends on the original package, you end up with two instances of the package. If you want to have everything depend on your customised instance, you can apply a global override as follows:

Any help much appreciated.

1

In Nixpkgs, package options have no shared meaning across packages, so it might be hard to get rid of all dependencies to Gnome. There is a chance that you'd need to write quite a lot of overrides for it. nix why-depends can help a lot here.

Nethertheless there is a module option called environment.noXlibs, which turns off every usage of a withGnome package option I could find in Nixpkgs. So maybe there is an easy way?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.