aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Woodcroft <donttrustben@gmail.com>2018-02-05 12:02:01 +0100
committerChristopher Baines <mail@cbaines.net>2018-05-18 11:54:03 +0100
commitfbe0e28111a91b1697cc352f2f21bd5e2117a595 (patch)
treecd5887afb7cb5d3193cc8ed4e62b0bb81fcf247d
parent51cc500b8711b685cca083830df33b174c1a2247 (diff)
downloadguix-fbe0e28111a91b1697cc352f2f21bd5e2117a595.tar
guix-fbe0e28111a91b1697cc352f2f21bd5e2117a595.tar.gz
gnu: Add ruby-listen.
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/patches/ruby-listen-patch-gemspec.patch16
-rw-r--r--gnu/packages/ruby.scm41
3 files changed, 58 insertions, 0 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index a6c04107d6..dfca8deb32 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1084,6 +1084,7 @@ dist_patch_DATA = \
%D%/packages/patches/ruby-rack-ignore-failing-test.patch \
%D%/packages/patches/ruby-rspec-its-remove-rspec-gemspec.patch\
%D%/packages/patches/ruby-therubyracer-fix-gemspec.patch \
+ %D%/packages/patches/ruby-listen-patch-gemspec.patch \
%D%/packages/patches/ruby-tzinfo-data-ignore-broken-test.patch\
%D%/packages/patches/rxvt-unicode-escape-sequences.patch \
%D%/packages/patches/scheme48-tests.patch \
diff --git a/gnu/packages/patches/ruby-listen-patch-gemspec.patch b/gnu/packages/patches/ruby-listen-patch-gemspec.patch
new file mode 100644
index 0000000000..dd4b190b3e
--- /dev/null
+++ b/gnu/packages/patches/ruby-listen-patch-gemspec.patch
@@ -0,0 +1,16 @@
+diff --git a/listen.gemspec b/listen.gemspec
+index 4e110b0..cda047b 100644
+--- a/listen.gemspec
++++ b/listen.gemspec
+@@ -14,9 +14,8 @@ Gem::Specification.new do |s|
+ s.description = 'The Listen gem listens to file modifications and '\
+ 'notifies you about the changes. Works everywhere!'
+
+- s.files = `git ls-files -z`.split("\x0").select do |f|
+- %r{^(?:bin|lib)\/} =~ f
+- end + %w(CHANGELOG.md CONTRIBUTING.md LICENSE.txt README.md)
++ s.files = `find bin lib -type f |sort`.split("\n") +
++ %w(CHANGELOG.md CONTRIBUTING.md LICENSE.txt README.md)
+
+ s.test_files = []
+ s.executable = 'listen'
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 21e1bbc42f..1437054d78 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -7526,3 +7526,44 @@ https://github.com/flavorjones/loofah-activerecord).")
"")
(home-page "")
(license license:expat))) ;?
+
+(define-public ruby-listen
+(package
+ (name "ruby-listen")
+ (version "3.1.5")
+ (source
+ (origin
+ (method url-fetch)
+ ;; The gem does not include a Rakefile, so we fetch the tarball from
+ ;; Github.
+ (uri (string-append "https://github.com/guard/listen/archive/v"
+ version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0f0mx4nzpd17svvmkcb2q66w3gdvs1zkrpc0p3wq1s2va5b5cnss"))
+ (patches (search-patches "ruby-listen-patch-gemspec.patch"))))
+ (build-system ruby-build-system)
+ (arguments
+ `(#:test-target "spec"
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'fix-dependencies'
+ (lambda _
+ (substitute* "Rakefile"
+ ((".*rubocop.*") ""))
+ #t)))))
+ (native-inputs
+ `(("bundler" ,bundler)
+ ("ruby-rspec" ,ruby-rspec)
+ ("ruby-coveralls" ,ruby-coveralls)))
+ (propagated-inputs
+ `(("ruby-rb-fsevent" ,ruby-rb-fsevent)
+ ("ruby-rb-inotify" ,ruby-rb-inotify)
+ ("ruby-ruby-dep" ,ruby-ruby-dep)))
+ (synopsis
+ "The Listen gem listens to file modifications and notifies you about the changes. Works everywhere!")
+ (description
+ "The Listen gem listens to file modifications and notifies you about the changes. Works everywhere!")
+ (home-page "https://github.com/guard/listen")
+ (license license:expat)))