fabapp/flake.nix

42 lines
974 B
Nix
Raw Normal View History

2023-10-04 14:20:49 +02:00
{
description = "FabApp";
2023-10-09 14:03:56 +02:00
# Inspired by https://github.com/mitchellh/zig-objc/blob/main/flake.nix
2023-10-04 14:20:49 +02:00
inputs = {
2023-10-04 14:20:49 +02:00
# take unstable if not specified
# nixpkgs.url = "github:nixos/nixpkgs/release-23.05";
2023-10-09 14:03:56 +02:00
# nixpkgs.url = "github:NixOS/nixpkgs/unstable";
flake-utils.url = "github:numtide/flake-utils";
zig.url = "github:mitchellh/zig-overlay";
2023-10-04 14:20:49 +02:00
};
2023-10-09 14:03:56 +02:00
outputs = {
self,
nixpkgs,
flake-utils,
...
} @ inputs: let
overlays = [
(final: prev: {
zigpkgs = inputs.zig.packages.${prev.system};
})
];
systems = ["x86_64-linux"];
in
flake-utils.lib.eachSystem systems (
system: let
pkgs = import nixpkgs {inherit overlays system;};
in rec {
devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
zigpkgs.master
zls
emscripten
sqlite
];
2023-10-04 14:20:49 +02:00
};
2023-10-09 14:03:56 +02:00
formatter = pkgs.alejandra;
}
);
2023-10-04 14:20:49 +02:00
}