From 83903cf378b725e8e9d030aa0bc2315774f1dc17 Mon Sep 17 00:00:00 2001 From: Matheus Campos Date: Sat, 3 Oct 2026 19:18:42 +0200 Subject: [PATCH] feat: add flake for development environment (#1066) ## What are the changes about? This PR adds a flake.nix and flake.lock to provide a reproducible development environment for ly using Nix. The development shell provides the dependencies required to build ly: - zig - pam - xcb ## What existing issue(s) does this resolve? N/A ## Pre-requisites - [x] I have tested & confirmed the changes work locally - [x] I have read and fully adhere to the rules set in the contributing guidelines found in `CONTRIBUTING.md` Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/1066 Reviewed-by: AnErrupTion --- flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..04210c1 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1790822859, + "narHash": "sha256-69xHQhAeMAD2wDXO7T2pcOZIF9Sga2W+JkmY2a11Ops=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "c59305bab2065cfecc4944690d9eedbb56f3a9fa", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..d18a90b --- /dev/null +++ b/flake.nix @@ -0,0 +1,32 @@ +{ + description = "Ly - A lightweight TUI (ncurses-like) display manager for Linux and BSD"; + + inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + + outputs = { nixpkgs, ... }: + let + systems = [ + "x86_64-linux" + "aarch64-linux" + "i686-linux" + ]; + + forAllSystems = nixpkgs.lib.genAttrs systems; + in + { + devShells = forAllSystems (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + in + { + default = pkgs.mkShell { + packages = with pkgs; [ + zig + pam + libxcb + ]; + }; + } + ); + }; +}