More direnv support plus gitignore

This commit is contained in:
Luc Perkins 2022-07-16 17:00:05 +02:00
parent 701e9ff772
commit 41744cc024
No known key found for this signature in database
GPG key ID: 4F102D0C16E232F2
7 changed files with 27 additions and 5 deletions

4
go1.17/.envrc Normal file
View file

@ -0,0 +1,4 @@
if ! has nix_direnv_version || ! nix_direnv_version 2.1.1; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.1.1/direnvrc" "sha256-b6qJ4r34rbE23yWjMqbmu3ia2z4b2wIlZUksBke/ol0="
fi
use flake .

1
go1.17/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
.direnv/

View file

@ -10,12 +10,18 @@
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
goPkg = pkgs.go_1_17;
in {
apps.default = {
type = "app";
program = "${goPkg}/bin/go";
};
devShells = {
default = pkgs.mkShellNoCC {
buildInputs = with pkgs; [
# go 1.17.1
go
goPkg
# goimports, godoc, etc.
gotools
@ -35,7 +41,7 @@
shellHook = ''
echo "Entering Go env"
echo "Running `${pkgs.go}/bin/go version`"
echo "Running `${goPkg}/bin/go version`"
'';
};
};

4
go1.18/.envrc Normal file
View file

@ -0,0 +1,4 @@
if ! has nix_direnv_version || ! nix_direnv_version 2.1.1; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.1.1/direnvrc" "sha256-b6qJ4r34rbE23yWjMqbmu3ia2z4b2wIlZUksBke/ol0="
fi
use flake .

1
go1.18/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
.direnv/

View file

@ -10,12 +10,18 @@
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
goPkg = pkgs.go_1_18;
in {
apps.default = {
type = "app";
program = "${goPkg}/bin/go";
};
devShells = {
default = pkgs.mkShellNoCC {
buildInputs = with pkgs; [
# go 1.18.3
go_1_18
goPkg
# goimports, godoc, etc.
gotools
@ -35,7 +41,7 @@
shellHook = ''
echo "Entering Go env"
echo "Running `${pkgs.go}/bin/go version`"
echo "Running `${goPkg}/bin/go version`"
'';
};
};

2
rust/.gitignore vendored
View file

@ -1,2 +1,2 @@
.direnv
.direnv/
target