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";
|
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; } {
|
2023-10-15 23:05:24 +02:00
|
|
|
flake = { };
|
2023-10-04 14:20:49 +02:00
|
|
|
|
|
|
|
systems = [ "x86_64-linux" ];
|
|
|
|
|
|
|
|
# https://flake.parts/module-arguments.html#persystem-module-parameters
|
|
|
|
perSystem = { pkgs, system, ... }: {
|
2023-10-15 23:05:24 +02:00
|
|
|
|
2023-10-13 15:48:51 +02:00
|
|
|
_module.args.pkgs = import inputs.nixpkgs-unstable {
|
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
|
|
|
# NOTE: zig overlay triggers issues with X11/GL libraries
|
|
|
|
# This might be misconfiguration on my end
|
|
|
|
overlays = [ ];
|
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.
|
|
|
|
zig
|
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
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|