aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorBen Woodcroft <donttrustben@gmail.com>2018-02-05 12:02:01 +0100
committerChristopher Baines <mail@cbaines.net>2018-03-18 22:16:32 +0000
commitf3e0e981fca3d4bb3e947d99fa0e85d4761a722c (patch)
tree765e4c5c09164c0d80a713ee3bc8d837ea59e098 /gnu
parent3c24261921274d60131d796233985684c4b86eee (diff)
downloadguix-f3e0e981fca3d4bb3e947d99fa0e85d4761a722c.tar
guix-f3e0e981fca3d4bb3e947d99fa0e85d4761a722c.tar.gz
gnu: Add ruby-listen.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/patches/ruby-listen-patch-gemspec.patch16
-rw-r--r--gnu/packages/ruby.scm41
2 files changed, 57 insertions, 0 deletions
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 39bd4e0986..c1deedbffe 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)))