Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

treewide: systemdSupport: use lib.meta.availableOn #192197

Merged
merged 3 commits into from Jan 22, 2023
Merged

treewide: systemdSupport: use lib.meta.availableOn #192197

merged 3 commits into from Jan 22, 2023

Commits on Jan 22, 2023

  1. lib/meta.nix: platformMatch: allow predicate functions

    Adam Joseph committed Jan 22, 2023
    Configuration menu
    Copy the full SHA
    b7d0974 View commit details
    Browse the repository at this point in the history
  2. systemd.meta.badPlatforms: include isStatic predicate

    Adam Joseph committed Jan 22, 2023
    Configuration menu
    Copy the full SHA
    5b66b6b View commit details
    Browse the repository at this point in the history
  3. treewide: systemdSupport: use lib.meta.availableOn

    Many packages have some kind of flag indicating whether or not to build with
    systemd support.  Most of these default to `stdenv.isLinux`, but systemd does
    not build on (and is marked `broken` for) `isStatic`.  Only a few packages have
    the needed `&& !isStatic` in the default value for their parameter.
    
    This commit moves the logic for the default value of these flags into
    `systemd.meta.{platforms,badPlatforms}` and evaluates those conditions using
    `lib.meta.availableOn`.
    
    This provides three benefits:
    
    1. The default values are set correctly (i.e. including `&& isStatic`)
    
    2. The default values are set consistently
    
    3. The way is paved for any future non-Linux systemd platforms (FreeBSD is
       reported to have experimental systemd support)
    Adam Joseph committed Jan 22, 2023
    Configuration menu
    Copy the full SHA
    42815b4 View commit details
    Browse the repository at this point in the history