-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
54 lines (47 loc) · 1.39 KB
/
Copy pathflake.nix
File metadata and controls
54 lines (47 loc) · 1.39 KB
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
{
description = "devshell for github:lavafroth/tempest";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs =
{
nixpkgs,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
architecture = builtins.elemAt (pkgs.lib.splitString "-" system) 0;
version = "0.3.45";
libvosk = pkgs.stdenv.mkDerivation {
name = "libvosk";
pname = "libvosk";
src = pkgs.fetchurl {
url = "https://github.com/alphacep/vosk-api/releases/download/v${version}/vosk-linux-${architecture}-${version}.zip";
sha256 = "sha256-u9yO2FxDl59kQxQoiXcOqVy/vFbP+1xdzXOvqHXF+7I=";
};
nativeBuildInputs = with pkgs; [ unzip ];
unpackPhase = "unzip $src";
installPhase = ''
mkdir -p $out/lib
mv vosk-linux-x86_64-${version}/* $out/lib
'';
};
in
{
devShells.default = pkgs.mkShell rec {
packages = with pkgs; [
libvosk
rustc
cargo
pkg-config
alsa-lib
stdenv.cc.cc.lib
openssl.dev
];
LD_LIBRARY_PATH = "${nixpkgs.lib.makeLibraryPath packages}";
LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib";
};
}
);
}