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 cbc9c80
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
if ! has nix_direnv_version || ! nix_direnv_version 3.0.4; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.4/direnvrc" "sha256-DzlYZ33mWF/Gs8DDeyjr8mnVmQGx7ASYqA5WlxwvBG4="
fi
use flake
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/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 cbc9c80

Please sign in to comment.