anchor.diff:      wrapProgram "$out/bin/transmission-gtk" \
         --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";
  
positive.code:     sha256 = "0pykmhi7pdmzq47glbj8i2im6iarp4wnj4l1pyvsrnba61f0939s";
    };
  
    buildInputs = [ pkgconfig intltool file openssl curl libevent inotify-tools zlib ]
      ++ optionals enableGTK3 [ gtk3 makeWrapper ]
      ++ optionals enableSystemd [ systemd ]
  
    postPatch = ''
      substituteInPlace ./configure \
        --replace "libsystemd-daemon" "libsystemd" \
        --replace "/usr/bin/file"     "${file}/bin/file"
    '';
  
    configureFlags = [
        ("--enable-cli=" + (if enableCli then "yes" else "no"))
        ("--enable-daemon=" + (if enableDaemon then "yes" else "no"))
      ]
      ++ optional enableSystemd "--with-systemd-daemon"
      ++ optional enableGTK3 "--with-gtk";
  
negative.code:     homepage = http://www.transmissionbt.com/;
      license = licenses.gpl2; # parts are under MIT
      maintainers = with maintainers; [ astsmtl vcunat wizeman ];
      platforms = platforms.unix;
    };
  }
  
  