Skip to content

Commit

Permalink
[feat] Introduce nix flake development env
Browse files Browse the repository at this point in the history
Signed-off-by: Shinyzenith <[email protected]>
  • Loading branch information
Shinyzenith committed Jun 30, 2023
1 parent 0848310 commit 4e10a2b
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ target
*.out
com.github.swhkd.pkexec.policy
*rc
.direnv
27 changes: 27 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 40 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
description = "Swhkd devel";

inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; };

outputs = { self, nixpkgs, ... }:
let
pkgsFor = system:
import nixpkgs {
inherit system;
overlays = [ ];
};

targetSystems = [ "aarch64-linux" "x86_64-linux" ];
in {
devShells = nixpkgs.lib.genAttrs targetSystems (system:
let pkgs = pkgsFor system;
in {
default = pkgs.mkShell {
name = "Swhkd-devel";
nativeBuildInputs = with pkgs; [
# Compilers
cargo
rustc
scdoc

# Tools
zip
rustfmt
clippy
gdb
gnumake
rust-analyzer
strace
valgrind
];
};
});
};
}

0 comments on commit 4e10a2b

Please sign in to comment.