tree-from-tags: pin to ruby_3_1 (#354014)

This commit is contained in:
Aleksana 2024-11-14 15:56:18 +08:00 committed by GitHub
commit 01a5655d53
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 60 additions and 42 deletions

View File

@ -1,39 +0,0 @@
{ lib, stdenv, bundlerEnv, ruby, fetchFromGitHub }:
let
version = "1.1";
gems = bundlerEnv {
name = "tree-from-tags-${version}-gems";
inherit ruby;
gemdir = ./.;
};
in stdenv.mkDerivation {
pname = "tree-from-tags";
inherit 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 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;
mainProgram = "tree-from-tags";
};
}

View File

@ -1,7 +1,7 @@
{
taglib-ruby = {
source = {
remotes = ["https://rubygems.org"];
remotes = [ "https://rubygems.org" ];
sha256 = "0r8g7zdncc6243d000jn0grc1n70rn9mx16vggy3q7c4wgsa37xi";
type = "gem";
};

View File

@ -0,0 +1,55 @@
{
lib,
stdenv,
bundlerEnv,
ruby,
fetchFromGitHub,
}:
let
version = "1.1";
gems = bundlerEnv {
name = "tree-from-tags-${version}-gems";
inherit ruby;
gemdir = ./.;
};
in
stdenv.mkDerivation {
pname = "tree-from-tags";
inherit version;
src = fetchFromGitHub {
owner = "dbrock";
repo = "bongo";
rev = version;
hash = "sha256-G+6rRJLNBECxGc8WuaesXhrYqvEDy2Chpw4lWxO8X9s=";
};
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 = {
description = "Create file hierarchies from media tags";
homepage = "https://www.emacswiki.org/emacs/Bongo";
platforms = ruby.meta.platforms;
maintainers = with lib.maintainers; [
livnev
dbrock
];
license = lib.licenses.gpl2Plus;
mainProgram = "tree-from-tags";
};
}

View File

@ -16120,8 +16120,6 @@ with pkgs;
wlroots = wlroots_0_18;
};
tree-from-tags = callPackage ../applications/audio/tree-from-tags { };
treesheets = callPackage ../applications/office/treesheets {
wxGTK = wxGTK32;
inherit (darwin.apple_sdk.frameworks) Cocoa;
@ -19255,4 +19253,8 @@ with pkgs;
cantata = callPackage ../by-name/ca/cantata/package.nix {
ffmpeg = ffmpeg_6;
};
tree-from-tags = callPackage ../by-name/tr/tree-from-tags/package.nix {
ruby = ruby_3_1;
};
}