Files
nixpkgs/pkgs/by-name/su/substudy/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

48 lines
1.0 KiB
Nix

{
lib,
fetchFromGitHub,
rustPlatform,
ffmpeg,
makeWrapper,
}:
rustPlatform.buildRustPackage rec {
pname = "substudy";
version = "0.6.10";
src = fetchFromGitHub {
owner = "emk";
repo = "subtitles-rs";
rev = "substudy_v${version}";
hash = "sha256-ACYbSQKaOJ2hS8NbOAppfKo+Mk3CKg0OAwb56AH42Zs=";
};
cargoHash = "sha256-S+/Oh1Cwulw8FyakF+d2E51AioFuQBGMAOG3y27YM2Q=";
nativeBuildInputs = [ makeWrapper ];
nativeCheckInputs = [ ffmpeg ];
cargoBuildFlags = [ "-p substudy" ];
preCheck = ''
# That's to make sure the `test_ai_request_static`
# test has access to the cache at `$HOME/.cache`
export HOME=$(mktemp -d)
'';
postFixup = ''
wrapProgram "$out/bin/substudy" \
--prefix PATH : ${lib.makeBinPath [ ffmpeg ]}
'';
meta = with lib; {
description = "Learn foreign languages using audio and subtitles extracted from video files";
homepage = "https://www.randomhacks.net/substudy";
license = licenses.asl20;
mainProgram = "substudy";
maintainers = [ ];
};
}