nixos-configs/apps/extract-subs/default.nix
matt1432 655eac9ad6
All checks were successful
Discord / discord commits (push) Has been skipped
refactor(extract-subs): move to apps and split up code better
2024-11-15 11:37:58 -05:00

32 lines
683 B
Nix

{
lib,
buildNpmPackage,
ffmpeg-full,
makeWrapper,
nodejs_latest,
...
}: let
inherit (lib) concatMapStringsSep getBin;
packageJSON = builtins.fromJSON (builtins.readFile ./package.json);
in
buildNpmPackage rec {
pname = packageJSON.name;
inherit (packageJSON) version;
src = ./.;
npmDepsHash = "sha256-edIAvY03eA3hqPHjAXz8pq3M5NzekOAYAR4o7j/Wf5Y=";
runtimeInputs = [
ffmpeg-full
];
nativeBuildInputs = [makeWrapper];
postInstall = ''
wrapProgram $out/bin/${pname} \
--prefix PATH : ${concatMapStringsSep ":" (p: getBin p) runtimeInputs}
'';
nodejs = nodejs_latest;
meta.mainProgram = pname;
}