mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 16:03:23 +00:00
tiny: make dbus, openssl, and notifications each optional
This commit exposes support for compilation without dbus, controlled by the global dbusSupport argument. This argument is understood by many other nixpkgs expressions and can be set globally in ~/.config/nixpkgs/config.nix. This commit also adds two package-specific arguments: * notificationsSupport allows to disable the desktop-notifications feature when invoking cargo. * useOpenSSL can be set to false in order to compile tiny with rustls instead of openssl.
This commit is contained in:
parent
65c8149cb1
commit
64cb3a021b
@ -3,9 +3,11 @@
|
|||||||
, rustPlatform
|
, rustPlatform
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, pkg-config
|
, pkg-config
|
||||||
, dbus
|
|
||||||
, openssl
|
|
||||||
, Foundation
|
, Foundation
|
||||||
|
, dbusSupport ? stdenv.isLinux, dbus
|
||||||
|
# rustls will be used for TLS if useOpenSSL=false
|
||||||
|
, useOpenSSL ? stdenv.isLinux, openssl
|
||||||
|
, notificationSupport ? stdenv.isLinux
|
||||||
}:
|
}:
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
@ -22,9 +24,11 @@ rustPlatform.buildRustPackage rec {
|
|||||||
cargoSha256 = "05q3f1wp48mwkz8n0102rwb6jzrgpx3dlbxzf3zcw8r1mblgzim1";
|
cargoSha256 = "05q3f1wp48mwkz8n0102rwb6jzrgpx3dlbxzf3zcw8r1mblgzim1";
|
||||||
|
|
||||||
nativeBuildInputs = lib.optional stdenv.isLinux pkg-config;
|
nativeBuildInputs = lib.optional stdenv.isLinux pkg-config;
|
||||||
buildInputs = lib.optionals stdenv.isLinux [ dbus openssl ] ++ lib.optional stdenv.isDarwin Foundation;
|
buildInputs = lib.optionals dbusSupport [ dbus ]
|
||||||
|
++ lib.optionals useOpenSSL [ openssl ]
|
||||||
|
++ lib.optional stdenv.isDarwin Foundation;
|
||||||
|
|
||||||
buildFeatures = lib.optional stdenv.isLinux "desktop-notifications";
|
buildFeatures = lib.optional notificationSupport "desktop-notifications";
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "A console IRC client";
|
description = "A console IRC client";
|
||||||
|
Loading…
Reference in New Issue
Block a user