Skip to content

Commit 66210ec

Browse files
authored
declare a development shell in flake.nix (#372)
This makes it possible to build i3lock (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 i3lock 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.
1 parent eb7fba8 commit 66210ec

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed

flake.lock

Lines changed: 27 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
description = "development environment for i3lock";
3+
4+
inputs = {
5+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
6+
};
7+
8+
outputs = { self, nixpkgs }:
9+
let
10+
system = "x86_64-linux";
11+
pkgs = nixpkgs.legacyPackages.${system};
12+
in {
13+
devShells.${system}.default = pkgs.mkShell {
14+
buildInputs = with pkgs; [
15+
cairo
16+
libev
17+
libxkbcommon
18+
pam
19+
pkg-config
20+
xcbutilxrm
21+
xorg.libX11
22+
xorg.libxcb
23+
xorg.xcbutil
24+
xorg.xcbutilimage
25+
];
26+
};
27+
};
28+
}

0 commit comments

Comments
 (0)