Add sas devshell
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -107,6 +107,7 @@
|
|||||||
nix = import ./hosts/common/shells/nix { inherit pkgs; };
|
nix = import ./hosts/common/shells/nix { inherit pkgs; };
|
||||||
nodejs = import ./hosts/common/shells/nodejs { inherit pkgs; };
|
nodejs = import ./hosts/common/shells/nodejs { inherit pkgs; };
|
||||||
python = import ./hosts/common/shells/python { inherit pkgs; };
|
python = import ./hosts/common/shells/python { inherit pkgs; };
|
||||||
|
sas = import ./hosts/common/shells/sas { inherit pkgs; };
|
||||||
};
|
};
|
||||||
|
|
||||||
formatter = pkgs.nixfmt-rfc-style;
|
formatter = pkgs.nixfmt-rfc-style;
|
||||||
|
28
hosts/common/shells/sas/default.nix
Normal file
28
hosts/common/shells/sas/default.nix
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{ 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"
|
||||||
|
'';
|
||||||
|
}
|
Reference in New Issue
Block a user