Flake : Add a basic devshell with sbt & jdk.
This commit is contained in:
parent
f2974fea9c
commit
dbc040e41b
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,4 +1,5 @@
|
|||
.idea
|
||||
.bsp
|
||||
.NixRoot*
|
||||
target
|
||||
/../target
|
||||
|
|
27
flake.lock
Normal file
27
flake.lock
Normal 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
30
flake.nix
Normal 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}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Reference in a new issue