Skip to content

declare a development shell in flake.nix#372

Merged
stapelberg merged 1 commit intoi3:mainfrom
stapelberg:nix-devshell
Sep 29, 2025
Merged

declare a development shell in flake.nix#372
stapelberg merged 1 commit intoi3:mainfrom
stapelberg:nix-devshell

Conversation

@stapelberg
Copy link
Member

For context, I had to declare this file anyway for developing i3lock, so I figured I might as well put it into the repository for the benefit of others. Of course, people who want to ignore Nix are free to keep doing so :)

From the commit message:

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/

Copy link
Member

@orestisfl orestisfl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure

Can we elaborate in the description or a comment about this file. For example, what it is, that we don't maintain it, it's not officially supported but PRs are welcome.

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.
@stapelberg
Copy link
Member Author

Sure, I updated the commit message accordingly.

@stapelberg stapelberg merged commit 66210ec into i3:main Sep 29, 2025
3 checks passed
stapelberg added a commit to stapelberg/i3 that referenced this pull request Dec 19, 2025
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 i3/i3lock#372

related to i3#6549
stapelberg added a commit to i3/i3 that referenced this pull request Dec 23, 2025
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 i3/i3lock#372

related to #6549
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants