-
Notifications
You must be signed in to change notification settings - Fork 32
/
flake.nix
66 lines (66 loc) · 2 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{
description = "LiveCaptions flake";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
april-asr = {
url = "https://april.sapples.net/april-english-dev-01110_en.april";
flake = false;
};
};
outputs = {
self,
april-asr,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
packages = rec {
livecaptions = pkgs.stdenv.mkDerivation rec {
src = ./.;
name = "livecaptions";
nativeBuildInputs = with pkgs; [
meson
ninja
wrapGAppsHook
];
buildInputs = with pkgs; [
cmake
pkgconfig
appstream-glib # appstream-util
desktop-file-utils # desktop-file-utils
gettext # msgfmt
glib # glib-compile-schemas
libadwaita # libadwaita-1
libpulseaudio # libpulse
onnxruntime
];
preFixup = ''
gappsWrapperArgs+=(--prefix APRIL_MODEL_PATH : "${april-asr}")
'';
meta = with pkgs.lib; {
description = "Linux Desktop application that provides live captioning";
homepage = "https://github.com/abb128/LiveCaptions";
license = licenses.gpl3;
platforms = platforms.linux;
};
};
default = livecaptions;
};
apps = rec {
livecaptions = flake-utils.lib.mkApp {drv = self.packages.${system}.livecaptions;};
default = livecaptions;
};
devShells.default = pkgs.mkShell {
inherit (self.packages.${system}.livecaptions) buildInputs nativeBuildInputs;
shellHook = ''
export LD_LIBRARY_PATH=${pkgs.onnxruntime}/lib
export APRIL_MODEL_PATH=${april-asr}
'';
};
}
);
}