2024-12-30 09:26:12 -07:00
|
|
|
{
|
|
|
|
description = "Zig flake with ZLS";
|
|
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
inputs.flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
inputs.zlsPkg.url = "path:./nix/zls";
|
|
|
|
outputs = {
|
|
|
|
flake-utils,
|
|
|
|
nixpkgs,
|
|
|
|
zlsPkg,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
flake-utils.lib.eachDefaultSystem (system: let
|
|
|
|
pkgs = import nixpkgs {
|
|
|
|
inherit system;
|
|
|
|
};
|
|
|
|
zls = zlsPkg.defaultPackage.${system};
|
|
|
|
in {
|
2025-01-02 08:28:46 -07:00
|
|
|
devShell = pkgs.mkShell rec {
|
2024-12-30 09:26:12 -07:00
|
|
|
buildInputs = with pkgs; [
|
|
|
|
lldb
|
|
|
|
SDL2
|
2025-01-02 08:28:46 -07:00
|
|
|
SDL2_ttf
|
|
|
|
SDL2_image
|
|
|
|
## For SDL dynamic linking
|
|
|
|
libpulseaudio
|
|
|
|
xorg.libXext
|
|
|
|
##
|
2024-12-30 09:26:12 -07:00
|
|
|
zig
|
|
|
|
zls
|
|
|
|
];
|
2025-01-02 08:28:46 -07:00
|
|
|
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
|
|
|
|
C_INCLUDE_PATH = "${pkgs.SDL2}/include:${pkgs.SDL2_ttf}/include:${pkgs.SDL2_image}/include";
|
2024-12-30 09:26:12 -07:00
|
|
|
};
|
|
|
|
});
|
|
|
|
}
|