diff options
author | Daiderd Jordan <daiderd@gmail.com> | 2017-01-11 01:21:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-11 01:21:24 +0100 |
commit | e5906592950b508e796774657c3de0cad1c99e33 (patch) | |
tree | df54fc42dba5b3590c498f1b88711203dd560172 /pkgs/applications/networking | |
parent | 43266905d148b9c3e11d7da9a8252eb4bfa9fd6d (diff) | |
parent | 6695954d48ac8ce21b35e396972c857dc0c3f8f0 (diff) | |
download | nixlib-e5906592950b508e796774657c3de0cad1c99e33.tar nixlib-e5906592950b508e796774657c3de0cad1c99e33.tar.gz nixlib-e5906592950b508e796774657c3de0cad1c99e33.tar.bz2 nixlib-e5906592950b508e796774657c3de0cad1c99e33.tar.lz nixlib-e5906592950b508e796774657c3de0cad1c99e33.tar.xz nixlib-e5906592950b508e796774657c3de0cad1c99e33.tar.zst nixlib-e5906592950b508e796774657c3de0cad1c99e33.zip |
Merge pull request #21720 from matthewbauer/transmission
Transmission: Darwin support
Diffstat (limited to 'pkgs/applications/networking')
-rw-r--r-- | pkgs/applications/networking/p2p/transmission/default.nix | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/pkgs/applications/networking/p2p/transmission/default.nix b/pkgs/applications/networking/p2p/transmission/default.nix index b85970df4b4a..12692b9566f9 100644 --- a/pkgs/applications/networking/p2p/transmission/default.nix +++ b/pkgs/applications/networking/p2p/transmission/default.nix @@ -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; }; } |