Refactor structure

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2025-01-09 13:50:26 +00:00
parent c8c34c40e5
commit b355f72b2e
30 changed files with 362 additions and 202 deletions

View File

@@ -0,0 +1,8 @@
{ pkgs, ... }:
pkgs.mkShell {
packages = with pkgs; [ jdk ];
shellHook = ''
export JAVA_HOME=${pkgs.jdk.home}
'';
}

View File

@@ -1,10 +0,0 @@
{ pkgs, ... }:
pkgs.mkShell {
packages = with pkgs; [
jdk17
];
shellHook = ''
export JAVA_HOME=${pkgs.jdk17.home}
'';
}

View File

@@ -1,28 +0,0 @@
{ pkgs, ... }:
pkgs.mkShell {
packages = with pkgs; [
go
gopls
go-tools
golangci-lint
golangci-lint-langserver
jdk17
];
shellHook = ''
if git rev-parse --is-inside-work-tree &> /dev/null; then
TOP="$(git rev-parse --show-toplevel)"
if ! grep -q "^\.go$" "$TOP/.gitignore" "$TOP/.git/info/exclude"; then echo ".go" >> "$TOP/.git/info/exclude"; fi
if ! grep -q "^\.gradle$" "$TOP/.gitignore" "$TOP/.git/info/exclude"; then echo ".gradle" >> "$TOP/.git/info/exclude"; fi
else
TOP="$(pwd)"
fi
export GOPATH="$TOP/.go"
export GOPROXY=goproxy.unx.sas.com
export GONOSUMDB=*.sas.com,sassoftware.io
export JAVA_HOME="${pkgs.jdk17.home}"
export GRADLE_USER_HOME="$TOP/.gradle"
mkdir -p "$GRADLE_USER_HOME" && cp -f ~/.gradle/gradle.properties "$GRADLE_USER_HOME/gradle.properties"
'';
}