transmission: add enableSystemd flag

This flag can be used to enable systemd daemon support in transmission.
This commit is contained in:
Matthew Bauer 2017-01-05 17:24:08 -06:00
parent 826d6aa6cd
commit cae067f17a
No known key found for this signature in database
GPG key ID: E04D0AD9469141C3

View file

@ -1,6 +1,7 @@
{ stdenv, fetchurl, pkgconfig, intltool, file, makeWrapper { stdenv, fetchurl, pkgconfig, intltool, file, makeWrapper
, openssl, curl, libevent, inotify-tools, systemd, zlib , openssl, curl, libevent, inotify-tools, systemd, zlib
, enableGTK3 ? false, gtk3 , enableGTK3 ? false, gtk3
, enableSystemd ? stdenv.isLinux
}: }:
let let
@ -19,7 +20,7 @@ stdenv.mkDerivation rec {
buildInputs = [ pkgconfig intltool file openssl curl libevent inotify-tools zlib ] buildInputs = [ pkgconfig intltool file openssl curl libevent inotify-tools zlib ]
++ optionals enableGTK3 [ gtk3 makeWrapper ] ++ optionals enableGTK3 [ gtk3 makeWrapper ]
++ optional stdenv.isLinux systemd; ++ optionals enableSystemd [ systemd ]
postPatch = '' postPatch = ''
substituteInPlace ./configure \ substituteInPlace ./configure \
@ -27,8 +28,10 @@ stdenv.mkDerivation rec {
--replace "/usr/bin/file" "${file}/bin/file" --replace "/usr/bin/file" "${file}/bin/file"
''; '';
configureFlags = [ "--with-systemd-daemon" ] configureFlags = [
++ [ "--enable-cli" ] "--enable-cli"
]
++ optional enableSystemd "--with-systemd-daemon"
++ optional enableGTK3 "--with-gtk"; ++ optional enableGTK3 "--with-gtk";
preFixup = optionalString enableGTK3 /* gsettings schemas for file dialogues */ '' preFixup = optionalString enableGTK3 /* gsettings schemas for file dialogues */ ''