guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: Add sassc.


From: David Thompson
Subject: 01/01: gnu: Add sassc.
Date: Tue, 01 Sep 2015 23:11:00 +0000

davexunit pushed a commit to branch master
in repository guix.

commit 385a44bebb4a33517165efa2f75ab376c2263db6
Author: David Thompson <address@hidden>
Date:   Wed Aug 19 21:54:57 2015 -0400

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

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 0a68d23..94637df 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -663,6 +663,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 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"))
+                (file-name (string-append "sassc-" 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-after 'unpack 'unpack-libsass-and-set-path
+             (lambda* (#:key inputs #:allow-other-keys)
+               (and (zero? (system* "tar" "xvf" (assoc-ref inputs "libsass")))
+                    (begin
+                      (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))))
+
 
 (define-public perl-apache-logformat-compiler
   (package



reply via email to

[Prev in Thread] Current Thread [Next in Thread]