From 1590d7c01c042b6f47a28b0d0180d2f60689d8b8 Mon Sep 17 00:00:00 2001 From: Ben Woodcroft Date: Mon, 5 Feb 2018 11:59:20 +0100 Subject: gnu: Add ruby-coffee-rails. --- .../patches/ruby-coffee-rails-fix-rakefile.patch | 20 ++++++++++++++ gnu/packages/rails.scm | 31 ++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 gnu/packages/patches/ruby-coffee-rails-fix-rakefile.patch diff --git a/gnu/packages/patches/ruby-coffee-rails-fix-rakefile.patch b/gnu/packages/patches/ruby-coffee-rails-fix-rakefile.patch new file mode 100644 index 0000000000..bd98812da7 --- /dev/null +++ b/gnu/packages/patches/ruby-coffee-rails-fix-rakefile.patch @@ -0,0 +1,20 @@ +diff --git a/Rakefile b/Rakefile +index ae682dc..fdf146d 100644 +--- a/Rakefile ++++ b/Rakefile +@@ -13,12 +13,12 @@ end + task default: :test + + specname = "coffee-rails.gemspec" +-deps = `git ls-files`.split("\n") - [specname] ++deps = `find . -type f -print0 |sort`.split("\n") - [specname] + + file specname => deps do + files = ["CHANGELOG.md", "MIT-LICENSE", "README.md"] + `git ls-files -- lib`.split("\n") +- test_files = `git ls-files -- {test,spec,features}/*`.split("\n") +- executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } ++ test_files = `ls test/*`.split("\n") ++ executables = [] + + require 'erb' + diff --git a/gnu/packages/rails.scm b/gnu/packages/rails.scm index 3db9be3855..e8b7620b9b 100644 --- a/gnu/packages/rails.scm +++ b/gnu/packages/rails.scm @@ -20,6 +20,7 @@ (define-module (gnu packages rails) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix download) #:use-module (guix packages) + #:use-module (gnu packages) #:use-module (gnu packages ruby) #:use-module (guix build-system ruby)) @@ -409,3 +410,33 @@ (define-public ruby-sass-rails "Sass adapter for the Rails asset pipeline.") (home-page "https://github.com/rails/sass-rails") (license license:expat))) + +(define-public ruby-coffee-rails + (package + (name "ruby-coffee-rails") + (version "4.2.1") + (source + (origin + (method url-fetch) + ;; Tests are not distributed at rubygems.org so download from GitHub + ;; instead. + (uri (string-append "https://github.com/rails/coffee-rails/archive/v" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0a7cac67n1ndky3n8b1vdrdq67cahq6sn76saiw5xgzd296b3zjy")) + (patches (search-patches "ruby-coffee-rails-fix-rakefile.patch")))) + (build-system ruby-build-system) + (arguments + `(#:tests? #f)) ; Tests require rails, disable to precent circular dependency. + (propagated-inputs + `(("ruby-coffee-script" ,ruby-coffee-script) + ("ruby-railties" ,ruby-railties))) + (synopsis + "CoffeeScript adapter for the Rails asset pipeline.") + (description + "CoffeeScript adapter for the Rails asset pipeline.") + (home-page + "https://github.com/rails/coffee-rails") + (license license:expat))) -- cgit v1.2.3