various build fixes

This commit is contained in:
LordMZTE 2024-04-02 23:07:04 +02:00
parent f09507d666
commit 1eb03df288
5 changed files with 70 additions and 4 deletions

3
.gitignore vendored
View File

@ -1,5 +1,2 @@
# confgen output
cgout
# reproducible builds: no thanks
flake.lock

61
flake.lock Normal file
View File

@ -0,0 +1,61 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1711703276,
"narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d8fe5e6c92d0d190646fb9f1056741a229980089",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs",
"utils": "utils"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

View File

@ -38,6 +38,8 @@
roswell
wayland
wayland-protocols
haxe
mpv-unwrapped
] ++
# shorthands for setup.rkt
builtins.map

View File

@ -13,6 +13,12 @@ pub fn build(b: *std.Build) void {
});
lib.root_module.addImport("common", b.dependency("common", .{}).module("common"));
// Linking MPV for a plugin is usually undesirable, but it seems to work anyways.
// This is here because Zig will otherwise not find the necessary header files on NixOS,
// and there appears to be no way to obtain an include path using pkg-config without
// also linking.
lib.root_module.linkSystemLibrary("mpv", .{});
const install_step = b.addInstallArtifact(lib, .{
// this is not a standard MPV installation path, but instead one that makes sense.
// this requires a symlink ../../../.local/share/mpv/scripts => ~/.config/mpv/scripts

View File

@ -4,4 +4,4 @@
(define (run)
(install-zig "plugins/mzte-mpv")
(build-haxe "plugins/tampermonkey-mzte-css"))
(build-haxe "plugins/tampermonkey-mzte"))