Skip to content

Commit

Permalink
Create Nix flake devshell
Browse files Browse the repository at this point in the history
  • Loading branch information
MichailiK committed May 21, 2024
1 parent 6a5a9c7 commit e86970b
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 1 deletion.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/target/
/Playlists/
/test/
/.direnv/
*.json
*.txt
nb*.xml
nb*.xml

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.

20 changes: 20 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-23.11";
};
outputs = {
self,
nixpkgs,
}: let
mapPkgsForEachSystem = callback:
nixpkgs.lib.genAttrs
nixpkgs.lib.systems.flakeExposed
(system: callback nixpkgs.legacyPackages.${system});
in {
devShells = mapPkgsForEachSystem (pkgs: {
default = pkgs.mkShellNoCC {
packages = with pkgs; [openjdk11 maven];
};
});
};
}

0 comments on commit e86970b

Please sign in to comment.