From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58389) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dO3us-0007PK-61 for guix-patches@gnu.org; Thu, 22 Jun 2017 11:21:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dO3up-0001Ut-00 for guix-patches@gnu.org; Thu, 22 Jun 2017 11:21:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:58878) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dO3uo-0001Un-SM for guix-patches@gnu.org; Thu, 22 Jun 2017 11:21:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dO3uo-0007CK-NH for guix-patches@gnu.org; Thu, 22 Jun 2017 11:21:02 -0400 Subject: [bug#27449] [PATCH] gnu: Add js-respond. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58236) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dO3th-0007HW-Oj for guix-patches@gnu.org; Thu, 22 Jun 2017 11:19:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dO3te-00018F-Im for guix-patches@gnu.org; Thu, 22 Jun 2017 11:19:53 -0400 Received: from venus.bbbm.mdc-berlin.de ([141.80.25.30]:45139) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dO3te-00017S-6w for guix-patches@gnu.org; Thu, 22 Jun 2017 11:19:50 -0400 Received: from localhost (localhost [127.0.0.1]) by venus.bbbm.mdc-berlin.de (Postfix) with ESMTP id A6739380AAD for ; Thu, 22 Jun 2017 17:19:46 +0200 (CEST) Received: from venus.bbbm.mdc-berlin.de ([127.0.0.1]) by localhost (venus.bbbm.mdc-berlin.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 17xQIcFIEs4e for ; Thu, 22 Jun 2017 17:19:41 +0200 (CEST) Received: from HTCAONE.mdc-berlin.net (puck.citx.mdc-berlin.de [141.80.36.101]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by venus.bbbm.mdc-berlin.de (Postfix) with ESMTPS for ; Thu, 22 Jun 2017 17:19:41 +0200 (CEST) From: Ricardo Wurmus Date: Thu, 22 Jun 2017 17:19:39 +0200 Message-ID: <20170622151939.16572-1-ricardo.wurmus@mdc-berlin.de> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 27449@debbugs.gnu.org Cc: Ricardo Wurmus * gnu/packages/javascript.scm (js-respond): New variable. --- gnu/packages/javascript.scm | 51 +++++++++++++++++++++++++++++++++++++++= ++++++ 1 file changed, 51 insertions(+) diff --git a/gnu/packages/javascript.scm b/gnu/packages/javascript.scm index 6746ad1d2..43bc0bbf6 100644 --- a/gnu/packages/javascript.scm +++ b/gnu/packages/javascript.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2017 Arun Isaac +;;; Copyright =C2=A9 2017 Ricardo Wurmus ;;; ;;; This file is part of GNU Guix. ;;; @@ -83,3 +84,53 @@ and AsciiMath notation that works in all modern browse= rs. It requires no plugins or software to be installed on the browser. So the page author = can write web documents that include mathematics and be confident that reade= rs will be able to view it naturally and easily."))) + +(define-public js-respond + (package + (name "js-respond") + (version "1.4.2") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/scottjehl/Respond/= " + "archive/" version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0ds1ya2a185jp93mdn07159c2x8zczwi960ykrawpp62bwk2n93d"))= )) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils) + (ice-9 match) + (ice-9 popen) + (srfi srfi-26)) + (set-path-environment-variable + "PATH" '("bin") (map (match-lambda + ((_ . input) + input)) + %build-inputs)) + (let ((install-directory (string-append %output + "/share/javascript/resp= ond/"))) + (system* "tar" "xvf" + (assoc-ref %build-inputs "source") + "--strip" "1") + (mkdir-p install-directory) + (let* ((file "src/respond.js") + (installed (string-append install-directory "respond.m= in.js"))) + (let ((minified (open-pipe* OPEN_READ "uglify-js" file))) + (call-with-output-file installed + (cut dump-port minified <>))))) + #t))) + (home-page "https://github.com/scottjehl/Respond") + (native-inputs + `(("uglify-js" ,uglify-js) + ("source" ,source) + ("gzip" ,gzip) + ("tar" ,tar))) + (synopsis "Polyfill for min/max-width CSS3 Media Queries") + (description "The goal of this script is to provide a fast and light= weight +script to enable responsive web designs in browsers that don't support C= SS3 +Media Queries.") + (license license:expat))) --=20 2.13.0