all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Thompson <dthompson2@worcester.edu>
To: guix-devel@gnu.org
Subject: [PATCH] gnu: Add sassc.
Date: Wed, 19 Aug 2015 21:56:12 -0400	[thread overview]
Message-ID: <87k2sqradf.fsf@gnu.org> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0001-gnu-Add-sassc.patch --]
[-- Type: text/x-patch, Size: 2904 bytes --]

From 4a6d1a798a0625d8bc104b86db56f5d2594a5d80 Mon Sep 17 00:00:00 2001
From: David Thompson <dthompson2@worcester.edu>
Date: Wed, 19 Aug 2015 21:54:57 -0400
Subject: [PATCH] gnu: Add sassc.

* gnu/packages/web.scm (sassc): New variable.
---
 gnu/packages/web.scm | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 48bfbc7..ce4cfeb 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -642,6 +642,59 @@ minimum to provide high performance operation.")
     ;; bundled CuTest framework uses a different non-copyleft license.
     (license (list l:asl2.0 (l:non-copyleft "file://test/CuTest-README.txt")))))
 
+(define-public sassc
+  ;; libsass must be statically linked and it isn't included in source the
+  ;; sassc release tarballs, hence this odd package recipe.
+  (let* ((version "3.2.5")
+         (libsass
+          (origin
+            (method url-fetch)
+            (uri (string-append
+                  "https://github.com/sass/libsass/archive/"
+                  version ".tar.gz"))
+            (file-name (string-append "libsass-" version ".tar.gz"))
+            (sha256
+             (base32
+              "1x25k6p1s1yzsdpzb7bzh8japilmi1mk3z96q66pycbinj9z9is4")))))
+    (package
+      (name "sassc")
+      (version version)
+      (source (origin
+                (method url-fetch)
+                (uri (string-append "https://github.com/sass/sassc/archive/"
+                                    version ".tar.gz"))
+                (sha256
+                 (base32
+                  "1xf3w75w840rj0nx375rxi7mcv1ngqqq8p3zrzjlyx8jfpnldmv5"))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:make-flags '("CC=gcc")
+         #:test-target "test"
+         #:phases
+         (modify-phases %standard-phases
+           (delete 'configure)
+           (add-before 'build 'set-libsass-path
+             (lambda* (#:key inputs #:allow-other-keys)
+               (system* "tar" "xvf" (assoc-ref inputs "libsass"))
+               (setenv "SASS_LIBSASS_PATH"
+                       (string-append (getcwd) "/libsass-" ,version))
+
+               #t))
+           (replace 'install ; no install target
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
+                 (mkdir-p bin)
+                 (copy-file "bin/sassc"
+                            (string-append bin "/sassc"))
+                 #t))))))
+      (inputs
+       `(("libsass" ,libsass)))
+      (synopsis "CSS pre-processor")
+      (description "SassC is a compiler written in C for the CSS pre-processor
+language known as SASS.")
+      (home-page "http://sass-lang.com/libsass")
+      (license l:expat))))
+
 \f
 (define-public perl-apache-logformat-compiler
   (package
-- 
2.4.3


[-- Attachment #2: Type: text/plain, Size: 38 bytes --]


-- 
David Thompson
GPG Key: 0FF1D807

             reply	other threads:[~2015-08-20  1:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-20  1:56 David Thompson [this message]
2015-08-22  4:57 ` [PATCH] gnu: Add sassc Mark H Weaver
2015-09-01 23:11   ` Thompson, David

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k2sqradf.fsf@gnu.org \
    --to=dthompson2@worcester.edu \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.