nixpkgs/pkgs/applications/audio/tree-from-tags/default.nix
Lev Livnev cd032364b6
tree-from-tags: init at 1.1
tree-from-tags is a tool for organising tagged audio into a tree,
commonly used with bongo, a buffer-oriented media player for emacs
2019-07-22 17:56:27 +01:00

38 lines
1 KiB
Nix

{ 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;
};
}