srf-lsp/flake.nix
Emil Lerch 16bc787738
All checks were successful
Generic zig build / build (push) Successful in 55s
nix flake + ci
2026-09-01 16:23:31 -07:00

46 lines
1.5 KiB
Nix

{
description = "Language Server Protocol implementation for SRF (Simple Record Format)";
inputs.nixpkgs.url = "nixpkgs/master";
outputs = { self, nixpkgs }:
let
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
# Helper to generate an attrset '{ x86_64-linux = f "x86_64-linux"; ... }'.
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
in
{
packages = forAllSystems (system:
let
pkgs = nixpkgs.legacyPackages.${system};
srf-lsp = pkgs.callPackage ./nix/package.nix {
# Pinned deliberately rather than tracking `pkgs.zig`: build.zig.zon
# declares 0.16.0 as the minimum, and 0.16 was a large standard
# library refactor, so a newer default would not build unchanged.
zig = pkgs.zig_0_16;
# The git-tracked tree, which keeps .zig-cache, zig-out and zig-pkg
# out of the derivation.
src = self;
};
in
{
inherit srf-lsp;
default = srf-lsp;
});
devShells = forAllSystems (system:
let pkgs = nixpkgs.legacyPackages.${system};
in
{
# `nix develop` for anyone without mise. The versions here are the same
# ones .mise.toml pins.
default = pkgs.mkShell {
packages = [
pkgs.zig_0_16
pkgs.zls
];
};
});
};
}