about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/audio/tree-from-tags
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/audio/tree-from-tags')
-rw-r--r--nixpkgs/pkgs/applications/audio/tree-from-tags/Gemfile3
-rw-r--r--nixpkgs/pkgs/applications/audio/tree-from-tags/Gemfile.lock13
-rw-r--r--nixpkgs/pkgs/applications/audio/tree-from-tags/default.nix37
-rw-r--r--nixpkgs/pkgs/applications/audio/tree-from-tags/gemset.nix10
4 files changed, 63 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/audio/tree-from-tags/Gemfile b/nixpkgs/pkgs/applications/audio/tree-from-tags/Gemfile
new file mode 100644
index 000000000000..24f308f3f423
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/tree-from-tags/Gemfile
@@ -0,0 +1,3 @@
+source "https://rubygems.org"
+
+gem "taglib-ruby"
diff --git a/nixpkgs/pkgs/applications/audio/tree-from-tags/Gemfile.lock b/nixpkgs/pkgs/applications/audio/tree-from-tags/Gemfile.lock
new file mode 100644
index 000000000000..2ef77caa6f69
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/tree-from-tags/Gemfile.lock
@@ -0,0 +1,13 @@
+GEM
+  remote: https://rubygems.org/
+  specs:
+    taglib-ruby (0.7.1)
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  taglib-ruby
+
+BUNDLED WITH
+   1.16.3
diff --git a/nixpkgs/pkgs/applications/audio/tree-from-tags/default.nix b/nixpkgs/pkgs/applications/audio/tree-from-tags/default.nix
new file mode 100644
index 000000000000..cdee979768cf
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/tree-from-tags/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, bundlerEnv, ruby, fetchFromGitHub }:
+let
+  version = "1.1";
+  gems = bundlerEnv {
+    name = "tree-from-tags-${version}-gems";
+    inherit ruby;
+    gemdir  = ./.;
+  };
+in stdenv.mkDerivation {
+  name = "tree-from-tags-${version}";
+  src = fetchFromGitHub {
+    owner  = "dbrock";
+    repo   = "bongo";
+    rev    = version;
+    sha256 = "1nszph9mn98flyhn1jq3y6mdh6jymjkvj5ng36ql016dj92apvhv";
+  };
+  buildInputs = [ gems ruby ];
+  installPhase = ''
+    mkdir -p $out/{bin,share}
+    cp tree-from-tags.rb $out/share/
+    bin=$out/bin/tree-from-tags
+# we are using bundle exec to start in the bundled environment
+    cat > $bin <<EOF
+#!/bin/sh -e
+exec ${gems}/bin/bundle exec ${ruby}/bin/ruby "$out"/share/tree-from-tags.rb "\$@"
+EOF
+    chmod +x $bin
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Create file hierarchies from media tags";
+    homepage = https://www.emacswiki.org/emacs/Bongo;
+    platforms = ruby.meta.platforms;
+    maintainers = [ maintainers.livnev maintainers.dbrock ];
+    license = licenses.gpl2Plus;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/tree-from-tags/gemset.nix b/nixpkgs/pkgs/applications/audio/tree-from-tags/gemset.nix
new file mode 100644
index 000000000000..20e10e9d93b0
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/tree-from-tags/gemset.nix
@@ -0,0 +1,10 @@
+{
+  taglib-ruby = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0r8g7zdncc6243d000jn0grc1n70rn9mx16vggy3q7c4wgsa37xi";
+      type = "gem";
+    };
+    version = "0.7.1";
+  };
+}
\ No newline at end of file