Files
i3/flake.nix
Michael Stapelberg 81cb064058 declare a development shell in flake.nix
This makes it possible to build i3 (for development)
on any system on which Nix can be installed (= most Linux systems).

For example, I start Emacs using `nix develop --command emacs`
and that Emacs process is in an environment with all i3 build deps.

See also:
https://michael.stapelberg.ch/posts/2025-07-27-dev-shells-with-nix-4-quick-examples/

This file is provided best-effort, but PRs are welcome.

While users can already run `nix develop nixpkgs#i3`,
for nix-direnv integration it is required to declare a flake.nix
in the project directory (otherwise direnv cannot find it).

similar to https://github.com/i3/i3lock/pull/372

related to https://github.com/i3/i3/pull/6549
2025-12-23 18:01:22 +01:00

31 lines
567 B
Nix

{
description = "i3 window manager development environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
};
outputs =
{ self, nixpkgs }:
let
systems = [
"x86_64-linux"
"aarch64-linux"
];
forAllSystems = nixpkgs.lib.genAttrs systems;
in
{
devShells = forAllSystems (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
default = pkgs.mkShell {
inputsFrom = [ pkgs.i3 ];
};
}
);
};
}