red-trul: init at 2.3.13 (#495340)

This commit is contained in:
Jo
2026-03-04 20:42:40 +00:00
committed by GitHub
+55
View File
@@ -0,0 +1,55 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
flac2mp3,
ffmpeg,
sox,
}:
let
runtimeDeps = [
ffmpeg
flac2mp3
sox
];
in
buildNpmPackage (finalAttrs: {
pname = "red-trul";
version = "2.3.13";
src = fetchFromGitHub {
owner = "lfence";
repo = "red-trul";
tag = "v${finalAttrs.version}";
hash = "sha256-t8P59diMwYKaGuPuNajWDmRU0fBNT6yRwMBLIRfUhTk";
};
npmDepsHash = "sha256-BYgNgV0hTkfDByi/86X7ZLcAYKveVDiSKnvUfdjyfHc=";
dontNpmBuild = true;
postPatch = ''
substituteInPlace config.js \
--replace-fail '`''${__dirname}/flac2mp3/flac2mp3.pl`' '"flac2mp3"'
substituteInPlace trul.js \
--replace-fail " await fs.access(FLAC2MP3)" ""
'';
postFixup = ''
wrapProgram $out/bin/red-trul \
--prefix PATH : ${lib.makeBinPath finalAttrs.passthru.runtimeDeps}
'';
passthru = {
inherit runtimeDeps;
};
meta = {
mainProgram = "red-trul";
description = "Lightweight utility to transcode FLAC releases";
homepage = "https://github.com/lfence/red-trul";
changelog = "https://github.com/lfence/red-trul/releases/tag/${finalAttrs.version}";
license = with lib.licenses; [ isc ];
maintainers = with lib.maintainers; [ lilahummel ];
};
})