remove zlib from nix, add to build
This commit is contained in:
parent
b26d139244
commit
c7a9808052
3 changed files with 10 additions and 1 deletions
|
@ -6,6 +6,10 @@ pub fn build(b: *std.Build) void {
|
||||||
|
|
||||||
const vosk_dep = b.dependency("vosk", .{});
|
const vosk_dep = b.dependency("vosk", .{});
|
||||||
|
|
||||||
|
const zlib_dep = b.dependency("zlib", .{
|
||||||
|
.target = target,
|
||||||
|
.optimize = optimize,
|
||||||
|
});
|
||||||
// We need to use curl for this as the domain doesn't work with zig TLS
|
// We need to use curl for this as the domain doesn't work with zig TLS
|
||||||
const model_step = ModelDownloadStep.create(b);
|
const model_step = ModelDownloadStep.create(b);
|
||||||
|
|
||||||
|
@ -30,6 +34,7 @@ pub fn build(b: *std.Build) void {
|
||||||
exe.linkLibC();
|
exe.linkLibC();
|
||||||
exe.addIncludePath(vosk_dep.path(""));
|
exe.addIncludePath(vosk_dep.path(""));
|
||||||
exe.addLibraryPath(vosk_dep.path(""));
|
exe.addLibraryPath(vosk_dep.path(""));
|
||||||
|
exe.linkLibrary(zlib_dep.artifact("z"));
|
||||||
exe.linkSystemLibrary("vosk");
|
exe.linkSystemLibrary("vosk");
|
||||||
exe.linkSystemLibrary("asound");
|
exe.linkSystemLibrary("asound");
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,10 @@
|
||||||
.url = "https://github.com/alphacep/vosk-api/releases/download/v0.3.45/vosk-linux-x86_64-0.3.45.zip",
|
.url = "https://github.com/alphacep/vosk-api/releases/download/v0.3.45/vosk-linux-x86_64-0.3.45.zip",
|
||||||
.hash = "N-V-__8AAF22jAFTSU4AVxFCNWtotf7OD8gM33Y_ScIrCeu7",
|
.hash = "N-V-__8AAF22jAFTSU4AVxFCNWtotf7OD8gM33Y_ScIrCeu7",
|
||||||
},
|
},
|
||||||
|
.zlib = .{
|
||||||
|
.url = "git+https://github.com/allyourcodebase/zlib#61e7df7e996ec5a5f13a653db3c419adb340d6ef",
|
||||||
|
.hash = "zlib-1.3.1-ZZQ7lbYMAAB1hTSOKSXAKAgHsfDcyWNH_37ojw5WSpgR",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
.paths = .{
|
.paths = .{
|
||||||
"build.zig",
|
"build.zig",
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell {
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
pkg-config
|
pkg-config
|
||||||
zlib
|
# zlib # handled directly in zig build
|
||||||
alsa-lib
|
alsa-lib
|
||||||
alsa-plugins
|
alsa-plugins
|
||||||
SDL2
|
SDL2
|
||||||
|
|
Loading…
Add table
Reference in a new issue