Skip to content

Commit 4e10a2b

Browse files
committed
[feat] Introduce nix flake development env
Signed-off-by: Shinyzenith <aakashsensharma@gmail.com>
1 parent 0848310 commit 4e10a2b

File tree

3 files changed

+68
-0
lines changed

3 files changed

+68
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ target
44
*.out
55
com.github.swhkd.pkexec.policy
66
*rc
7+
.direnv

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: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
description = "Swhkd devel";
3+
4+
inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; };
5+
6+
outputs = { self, nixpkgs, ... }:
7+
let
8+
pkgsFor = system:
9+
import nixpkgs {
10+
inherit system;
11+
overlays = [ ];
12+
};
13+
14+
targetSystems = [ "aarch64-linux" "x86_64-linux" ];
15+
in {
16+
devShells = nixpkgs.lib.genAttrs targetSystems (system:
17+
let pkgs = pkgsFor system;
18+
in {
19+
default = pkgs.mkShell {
20+
name = "Swhkd-devel";
21+
nativeBuildInputs = with pkgs; [
22+
# Compilers
23+
cargo
24+
rustc
25+
scdoc
26+
27+
# Tools
28+
zip
29+
rustfmt
30+
clippy
31+
gdb
32+
gnumake
33+
rust-analyzer
34+
strace
35+
valgrind
36+
];
37+
};
38+
});
39+
};
40+
}

0 commit comments

Comments
 (0)