From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] services: Add transmission-service. Date: Sat, 28 Nov 2015 15:07:25 +0100 Message-ID: <87two6usiq.fsf@gnu.org> References: <87vb8mj3pq.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38080) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a2g9z-0004wD-M4 for guix-devel@gnu.org; Sat, 28 Nov 2015 09:07:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a2g9w-0003nP-Fz for guix-devel@gnu.org; Sat, 28 Nov 2015 09:07:31 -0500 In-Reply-To: <87vb8mj3pq.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> (David Thompson's message of "Fri, 27 Nov 2015 20:46:25 -0500") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: David Thompson Cc: guix-devel@gnu.org David Thompson skribis: > My first service since the big service API rewrite. How did I do? I=E2=80=99d give you an A. ;-) > From 6f483d37bf157ee0d253d2aaa919d6900d23453c Mon Sep 17 00:00:00 2001 > From: David Thompson > Date: Fri, 27 Nov 2015 20:40:59 -0500 > Subject: [PATCH] services: Add transmission-service. > > * gnu/services/bittorrent.scm: New file. > * gnu-system.am (GNU_SYSTEM_MODULES): Add it. > * doc/guix.texi ("BitTorrent Services"): Document it. [...] > +@deffn {Scheme Procedure} transmission-service [#:transmission transmiss= ion] @ ^^^ @var{transmission} > + [#:download-directory ``/var/lib/transmission/downloads''] Use straight quotes here because this is code. > +(define (transmission-activation config) > + (let ((download-dir (transmission-configuration-download-directory con= fig))) > + #~(begin > + (use-modules (guix build utils)) > + > + (display "creating transmission state directory\n") > + (mkdir-p #$%transmission-state-directory) > + (format #t "creating transmission download directory '~a'~%" > + #$download-dir) > + (mkdir-p #$download-dir)))) Should it be chown=E2=80=99d to =E2=80=9Ctransmission=E2=80=9D? Maybe the = daemon takes care of this? > +(define* (transmission-service #:key (transmission transmission) > + (port 9091) (peer-port 51413) > + (download-directory > + (string-append %transmission-state-direc= tory > + "/downloads"))) > + "Return a service that runs TRANSMISSION, a daemon that downloads and = shares > +files via the BitTorrent protocol. > + > +The daemon will serve the web user interface over PORT, handle BitTorrent > +tasks over PEER-PORT, and save downloaded files to DOWNLOAD-DIRECTORY." You can use the same Texi string as in the manual here. Otherwise LGTM! Thanks, Ludo=E2=80=99.