mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
Merge pull request #21720 from matthewbauer/transmission
Transmission: Darwin support
This commit is contained in:
commit
e590659295
1 changed files with 17 additions and 6 deletions
|
@ -1,6 +1,9 @@
|
|||
{ stdenv, fetchurl, pkgconfig, intltool, file, makeWrapper
|
||||
, openssl, curl, libevent, inotify-tools, systemd, zlib
|
||||
, enableGTK3 ? false, gtk3
|
||||
, enableSystemd ? stdenv.isLinux
|
||||
, enableDaemon ? true
|
||||
, enableCli ? true
|
||||
}:
|
||||
|
||||
let
|
||||
|
@ -17,18 +20,24 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "0pykmhi7pdmzq47glbj8i2im6iarp4wnj4l1pyvsrnba61f0939s";
|
||||
};
|
||||
|
||||
buildInputs = [ pkgconfig intltool file openssl curl libevent inotify-tools zlib ]
|
||||
buildInputs = [ pkgconfig intltool file openssl curl libevent zlib ]
|
||||
++ optionals enableGTK3 [ gtk3 makeWrapper ]
|
||||
++ optional stdenv.isLinux systemd;
|
||||
++ optionals enableSystemd [ systemd ]
|
||||
++ optionals stdenv.isLinux [ inotify-tools ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace ./configure \
|
||||
--replace "libsystemd-daemon" "libsystemd" \
|
||||
--replace "/usr/bin/file" "${file}/bin/file"
|
||||
--replace "/usr/bin/file" "${file}/bin/file" \
|
||||
--replace "test ! -d /Developer/SDKs/MacOSX10.5.sdk" "false"
|
||||
'';
|
||||
|
||||
configureFlags = [ "--with-systemd-daemon" ]
|
||||
++ [ "--enable-cli" ]
|
||||
configureFlags = [
|
||||
("--enable-cli=" + (if enableCli then "yes" else "no"))
|
||||
("--enable-daemon=" + (if enableDaemon then "yes" else "no"))
|
||||
"--disable-mac" # requires xcodebuild
|
||||
]
|
||||
++ optional enableSystemd "--with-systemd-daemon"
|
||||
++ optional enableGTK3 "--with-gtk";
|
||||
|
||||
preFixup = optionalString enableGTK3 /* gsettings schemas for file dialogues */ ''
|
||||
|
@ -37,6 +46,8 @@ stdenv.mkDerivation rec {
|
|||
--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
|
||||
'';
|
||||
|
||||
NIX_LDFLAGS = optionalString stdenv.isDarwin "-framework CoreFoundation";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A fast, easy and free BitTorrent client";
|
||||
longDescription = ''
|
||||
|
@ -53,7 +64,7 @@ stdenv.mkDerivation rec {
|
|||
homepage = http://www.transmissionbt.com/;
|
||||
license = licenses.gpl2; # parts are under MIT
|
||||
maintainers = with maintainers; [ astsmtl vcunat wizeman ];
|
||||
platforms = platforms.linux;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue