From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: [PATCH] gnu: Add darkhttpd. Date: Sat, 10 Sep 2016 10:10:56 +0300 Message-ID: <87oa3wtekf.fsf@gmail.com> References: <20160909204158.GA4337@jasmine> <20160910065157.5289-1-arunisaac@systemreboot.net> 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]:55615) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bicRL-000843-Mo for guix-devel@gnu.org; Sat, 10 Sep 2016 03:11:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bicRH-00029V-CB for guix-devel@gnu.org; Sat, 10 Sep 2016 03:11:02 -0400 Received: from mail-lf0-x243.google.com ([2a00:1450:4010:c07::243]:34525) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bicRH-00029R-3t for guix-devel@gnu.org; Sat, 10 Sep 2016 03:10:59 -0400 Received: by mail-lf0-x243.google.com with SMTP id k12so3511337lfb.1 for ; Sat, 10 Sep 2016 00:10:58 -0700 (PDT) In-Reply-To: <20160910065157.5289-1-arunisaac@systemreboot.net> (Arun Isaac's message of "Sat, 10 Sep 2016 12:21:57 +0530") 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" To: Arun Isaac Cc: guix-devel@gnu.org Arun Isaac (2016-09-10 12:21 +0530) wrote: > * gnu/packages/web.scm (darkhttpd): New variable. > --- > gnu/packages/web.scm | 33 +++++++++++++++++++++++++++++++++ > 1 file changed, 33 insertions(+) > > diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm > index 20c7d12..287c389 100644 > --- a/gnu/packages/web.scm > +++ b/gnu/packages/web.scm > @@ -14,6 +14,7 @@ > ;;; Copyright =C2=A9 2016 Ben Woodcroft > ;;; Copyright =C2=A9 2016 Cl=C3=A9ment Lassieur > ;;; Copyright =C2=A9 2016 ng0 > +;;; Copyright =C2=A9 2016 Arun Isaac > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -3633,3 +3634,35 @@ provides a unix command line interface to a variet= y of popular www search engine > and similar services.") > (home-page "https://surfraw.alioth.debian.org/") > (license l:public-domain))) > + > +(define-public darkhttpd > + (package > + (name "darkhttpd") > + (version "1.12") > + (source > + (origin > + (method git-fetch) Why 'git-fetch'? There is a release tarball: https://unix4lyfe.org/darkhttpd/darkhttpd-1.12.tar.bz2 > + (uri (git-reference > + (url (string-append "https://unix4lyfe.org/git/darkhttpd")) > + (commit "master"))) > + (sha256 > + (base32 > + "0wi8dfgj4ic0fsy4dszl69xgxdxlwxz4c30vsw2i2dpnczgjm04k")) > + (file-name (string-append name "-" version)))) I think (file-name (string-append name "-" version "-checkout")) is a cleaner name for a git checkout directory (but using the tarball is preferred). > + (build-system gnu-build-system) > + (arguments > + `(#:make-flags '("CC=3Dgcc") > + #:tests? #f ; No test suite > + #:phases > + (modify-phases %standard-phases > + (delete 'configure) > + (replace 'install > + (lambda* (#:key outputs #:allow-other-keys) > + (install-file "darkhttpd" > + (string-append (assoc-ref outputs "out") "/bi= n"))))))) If a phase succeed, it should return non-false value, while the value of 'install-file' is unspecified. In such cases we add #t to the end of the phase. BTW I would shorten that last line by moving "/bin" to the next one. > + (synopsis "Simple static web server") > + (description "darkhttpd is a simple static web server. It is > +standalone and does not need inetd or ucspi-tcp. It does not need any > +config files---you only have to specify the www root.") > + (home-page "https://unix4lyfe.org/darkhttpd/") > + (license l:isc))) --=20 Alex