Skip to content

Commit

Permalink
util-linux: make dependencies on pam and libcap optional
Browse files Browse the repository at this point in the history
Introduce new boolean arguments "pamSupport" and "capabilitiesSupport" that
control whether "pam" and "libcap" are compiled in. These flags are true by
default, so this commit does not cause any rebuilds.
  • Loading branch information
Dmitry Bogatov authored and happysalada committed May 22, 2022
1 parent a1bd563 commit 39773cc
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions pkgs/os-specific/linux/util-linux/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{ lib, stdenv, fetchurl, pkg-config, zlib, shadow, libcap_ng
{ lib, stdenv, fetchurl, pkg-config, zlib, shadow
, capabilitiesSupport ? true
, libcap_ng
, ncursesSupport ? true
, ncurses, pam
, ncurses
, pamSupport ? true
, pam
, systemdSupport ? stdenv.isLinux && !stdenv.hostPlatform.isStatic
, systemd
, nlsSupport ? true
Expand Down Expand Up @@ -59,7 +63,9 @@ stdenv.mkDerivation rec {
];

nativeBuildInputs = [ pkg-config ];
buildInputs = [ zlib pam libcap_ng ]
buildInputs = [ zlib ]
++ lib.optionals pamSupport [ pam ]
++ lib.optionals capabilitiesSupport [ libcap_ng ]
++ lib.optionals ncursesSupport [ ncurses ]
++ lib.optionals systemdSupport [ systemd ];

Expand Down

0 comments on commit 39773cc

Please sign in to comment.