init nix tooling
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I6a6a6964a17ac94c2a40f0fd34f339a965abfc9a
This commit is contained in:
parent
fcc080871a
commit
48fa1cc852
4 changed files with 100 additions and 0 deletions
1
.envrc
Normal file
1
.envrc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
use flake
|
26
flake.lock
generated
Normal file
26
flake.lock
generated
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1759155593,
|
||||||
|
"narHash": "sha256-potIJyEY7ExgfiMzr44/KBODFednyzRUAE2vs4aThHs=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "13ca7febc86978bdb67c0ae94f568b189ae84eef",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
22
flake.nix
Normal file
22
flake.nix
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
description = "Wayland Wallpaper Daemon";
|
||||||
|
|
||||||
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs?ref?nixos-unstable";
|
||||||
|
outputs = {nixpkgs, ...}: let
|
||||||
|
systems = ["x86_64-linux" "aarch64-linux"];
|
||||||
|
forAllSystems = f:
|
||||||
|
builtins.listToAttrs (map (system: {
|
||||||
|
name = system;
|
||||||
|
value = f system;
|
||||||
|
})
|
||||||
|
systems);
|
||||||
|
|
||||||
|
pkgsFor = system: nixpkgs.legacyPackages.${system};
|
||||||
|
in {
|
||||||
|
devShells = forAllSystems (system: let
|
||||||
|
pkgs = pkgsFor system;
|
||||||
|
in {
|
||||||
|
default = pkgs.callPackage ./shell.nix {};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
51
shell.nix
Normal file
51
shell.nix
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
{pkgs ? import <nixpkgs> {}}:
|
||||||
|
pkgs.mkShell {
|
||||||
|
name = "chroma";
|
||||||
|
buildInputs = with pkgs; [
|
||||||
|
gnumake
|
||||||
|
|
||||||
|
# Optional development tools
|
||||||
|
gdb
|
||||||
|
valgrind
|
||||||
|
strace
|
||||||
|
|
||||||
|
# Code formatting and analysis
|
||||||
|
clang-tools # includes clang-format
|
||||||
|
cppcheck
|
||||||
|
|
||||||
|
# Wayland libraries
|
||||||
|
wayland.dev
|
||||||
|
wayland-protocols
|
||||||
|
wayland-scanner
|
||||||
|
libxkbcommon
|
||||||
|
|
||||||
|
# EGL/OpenGL libraries
|
||||||
|
libGL
|
||||||
|
mesa
|
||||||
|
|
||||||
|
# System libraries
|
||||||
|
glibc.dev
|
||||||
|
];
|
||||||
|
|
||||||
|
nativeBuildInputs = with pkgs; [
|
||||||
|
pkg-config
|
||||||
|
];
|
||||||
|
|
||||||
|
shellHook = ''
|
||||||
|
echo "Available commands:"
|
||||||
|
echo " make - Build the project"
|
||||||
|
echo " make debug - Build with debug symbols"
|
||||||
|
echo " make clean - Clean build artifacts"
|
||||||
|
echo " make install - Install to ~/.local"
|
||||||
|
echo " make help - Show all available targets"
|
||||||
|
echo
|
||||||
|
echo "Run 'make check-deps' to verify all dependencies are available."
|
||||||
|
echo
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Environment variables for the build system
|
||||||
|
env = {
|
||||||
|
CHROMA_VERSION = "1.0.0";
|
||||||
|
WAYLAND_DEBUG = 1;
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue