2023-10-04 14:20:49 +02:00
|
|
|
{
|
|
|
|
description = "FabApp";
|
|
|
|
|
|
|
|
inputs = {
|
2023-10-13 15:48:51 +02:00
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
|
|
|
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
|
|
|
zig-overlay.url = "github:mitchellh/zig-overlay";
|
2023-10-04 14:20:49 +02:00
|
|
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = inputs@{ flake-parts, nixpkgs, ... }:
|
|
|
|
flake-parts.lib.mkFlake { inherit inputs; } {
|
|
|
|
flake = {
|
|
|
|
# Put your original flake attributes here.
|
|
|
|
};
|
|
|
|
|
|
|
|
systems = [ "x86_64-linux" ];
|
|
|
|
|
|
|
|
# https://flake.parts/module-arguments.html#persystem-module-parameters
|
|
|
|
perSystem = { pkgs, system, ... }: {
|
2023-10-13 15:48:51 +02:00
|
|
|
# We need unstable for Zig
|
2023-10-15 23:05:24 +02:00
|
|
|
_module.args.pkgs = import inputs.nixpkgs {
|
2023-10-04 14:20:49 +02:00
|
|
|
inherit system;
|
2023-10-13 15:48:51 +02:00
|
|
|
# https://flake.parts/overlays
|
2023-10-15 23:05:24 +02:00
|
|
|
overlays = [ inputs.zig-overlay.overlays.default ];
|
2023-10-13 15:48:51 +02:00
|
|
|
config = { };
|
2023-10-04 14:20:49 +02:00
|
|
|
};
|
|
|
|
|
2023-10-13 15:48:51 +02:00
|
|
|
formatter = pkgs.nixfmt;
|
|
|
|
|
2023-10-04 14:20:49 +02:00
|
|
|
devShells.default = with pkgs;
|
2023-10-06 14:40:56 +02:00
|
|
|
mkShell {
|
2023-10-15 23:05:24 +02:00
|
|
|
# EM_CONFIG = pkgs.writeText ".emscripten" ''
|
|
|
|
# EMSCRIPTEN_ROOT = '${pkgs.emscripten}/share/emscripten'
|
|
|
|
# LLVM_ROOT = '${pkgs.emscripten.llvmEnv}/bin'
|
|
|
|
# BINARYEN_ROOT = '${pkgs.binaryen}'
|
|
|
|
# NODE_JS = '${pkgs.nodejs-18_x}/bin/node'
|
|
|
|
# CACHE = '${toString ./.cache}'
|
|
|
|
# '';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ clang cmake just ninja tup ];
|
|
|
|
|
2023-10-04 14:20:49 +02:00
|
|
|
buildInputs = [
|
2023-10-04 14:20:49 +02:00
|
|
|
sqlite
|
|
|
|
|
2023-10-04 14:20:49 +02:00
|
|
|
# Zig / webAssembly impl.
|
2023-10-15 23:05:24 +02:00
|
|
|
# zig
|
|
|
|
zigpkgs."0.11.0" # Issue with X11/GL libraries
|
2023-10-04 14:20:49 +02:00
|
|
|
zls
|
2023-10-06 14:33:42 +02:00
|
|
|
emscripten
|
2023-10-06 14:40:56 +02:00
|
|
|
|
|
|
|
# Linux graphical deps
|
2023-10-15 23:05:24 +02:00
|
|
|
## X11
|
2023-10-06 14:40:56 +02:00
|
|
|
xorg.libX11
|
2023-10-15 23:05:24 +02:00
|
|
|
xorg.libXcursor
|
|
|
|
xorg.libXi
|
|
|
|
xorg.libXext
|
|
|
|
xorg.libXrandr
|
|
|
|
xorg.libXinerama
|
|
|
|
xorg.libxcb
|
2023-10-06 14:40:56 +02:00
|
|
|
libGL
|
2023-10-15 23:05:24 +02:00
|
|
|
libGLU
|
|
|
|
pkg-config
|
|
|
|
|
|
|
|
## Wayland
|
|
|
|
wayland-protocols
|
|
|
|
wayland
|
|
|
|
libxkbcommon
|
2023-10-04 14:20:49 +02:00
|
|
|
];
|
2023-10-04 14:20:49 +02:00
|
|
|
|
2023-10-04 14:20:49 +02:00
|
|
|
};
|
2023-10-06 14:40:56 +02:00
|
|
|
|
2023-10-04 14:20:49 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|