Flake : Add a basic devshell with sbt & jdk.

This commit is contained in:
Dmitry Voronin 2024-09-23 11:41:34 +03:00
parent f2974fea9c
commit dbc040e41b
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k
3 changed files with 58 additions and 0 deletions

1
.gitignore vendored
View file

@ -1,4 +1,5 @@
.idea .idea
.bsp .bsp
.NixRoot*
target target
/../target /../target

27
flake.lock Normal file
View file

@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1726755586,
"narHash": "sha256-PmUr/2GQGvFTIJ6/Tvsins7Q43KTMvMFhvG6oaYK+Wk=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "c04d5652cfa9742b1d519688f65d1bbccea9eb7e",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

30
flake.nix Normal file
View file

@ -0,0 +1,30 @@
{
description = "test2gis dev shell";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs } @inputs: let
system = "x86_64-linux";
lib = nixpkgs.lib;
pkgs = nixpkgs.legacyPackages.${system};
jdk = pkgs.corretto11;
in {
devShells.${system} = {
default = pkgs.mkShell rec {
nativeBuildInputs = with pkgs; [
gnumake
sbt
];
buildInputs = with pkgs; [ ];
PATH = [ "${jdk}/bin" ];
JAVA_HOME = "${jdk}";
LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}";
SOURCE_DATE_EPOCH = "${toString self.lastModified}";
};
};
};
}