More direnv support plus gitignore
This commit is contained in:
		
							parent
							
								
									701e9ff772
								
							
						
					
					
						commit
						41744cc024
					
				
					 7 changed files with 27 additions and 5 deletions
				
			
		
							
								
								
									
										4
									
								
								go1.17/.envrc
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								go1.17/.envrc
									
										
									
									
									
										Normal 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
									
								
							
							
						
						
									
										1
									
								
								go1.17/.gitignore
									
										
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1 @@
 | 
				
			||||||
 | 
					.direnv/
 | 
				
			||||||
| 
						 | 
					@ -10,12 +10,18 @@
 | 
				
			||||||
    flake-utils.lib.eachDefaultSystem (system:
 | 
					    flake-utils.lib.eachDefaultSystem (system:
 | 
				
			||||||
      let
 | 
					      let
 | 
				
			||||||
        pkgs = import nixpkgs { inherit system; };
 | 
					        pkgs = import nixpkgs { inherit system; };
 | 
				
			||||||
 | 
					        goPkg = pkgs.go_1_17;
 | 
				
			||||||
      in {
 | 
					      in {
 | 
				
			||||||
 | 
					        apps.default = {
 | 
				
			||||||
 | 
					          type = "app";
 | 
				
			||||||
 | 
					          program = "${goPkg}/bin/go";
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        devShells = {
 | 
					        devShells = {
 | 
				
			||||||
          default = pkgs.mkShellNoCC {
 | 
					          default = pkgs.mkShellNoCC {
 | 
				
			||||||
            buildInputs = with pkgs; [
 | 
					            buildInputs = with pkgs; [
 | 
				
			||||||
              # go 1.17.1
 | 
					              # go 1.17.1
 | 
				
			||||||
              go
 | 
					              goPkg
 | 
				
			||||||
 | 
					
 | 
				
			||||||
              # goimports, godoc, etc.
 | 
					              # goimports, godoc, etc.
 | 
				
			||||||
              gotools
 | 
					              gotools
 | 
				
			||||||
| 
						 | 
					@ -35,7 +41,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            shellHook = ''
 | 
					            shellHook = ''
 | 
				
			||||||
              echo "Entering Go env"
 | 
					              echo "Entering Go env"
 | 
				
			||||||
              echo "Running `${pkgs.go}/bin/go version`"
 | 
					              echo "Running `${goPkg}/bin/go version`"
 | 
				
			||||||
            '';
 | 
					            '';
 | 
				
			||||||
          };
 | 
					          };
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										4
									
								
								go1.18/.envrc
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								go1.18/.envrc
									
										
									
									
									
										Normal 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
									
								
							
							
						
						
									
										1
									
								
								go1.18/.gitignore
									
										
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1 @@
 | 
				
			||||||
 | 
					.direnv/
 | 
				
			||||||
| 
						 | 
					@ -10,12 +10,18 @@
 | 
				
			||||||
    flake-utils.lib.eachDefaultSystem (system:
 | 
					    flake-utils.lib.eachDefaultSystem (system:
 | 
				
			||||||
      let
 | 
					      let
 | 
				
			||||||
        pkgs = import nixpkgs { inherit system; };
 | 
					        pkgs = import nixpkgs { inherit system; };
 | 
				
			||||||
 | 
					        goPkg = pkgs.go_1_18;
 | 
				
			||||||
      in {
 | 
					      in {
 | 
				
			||||||
 | 
					        apps.default = {
 | 
				
			||||||
 | 
					          type = "app";
 | 
				
			||||||
 | 
					          program = "${goPkg}/bin/go";
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        devShells = {
 | 
					        devShells = {
 | 
				
			||||||
          default = pkgs.mkShellNoCC {
 | 
					          default = pkgs.mkShellNoCC {
 | 
				
			||||||
            buildInputs = with pkgs; [
 | 
					            buildInputs = with pkgs; [
 | 
				
			||||||
              # go 1.18.3
 | 
					              # go 1.18.3
 | 
				
			||||||
              go_1_18
 | 
					              goPkg
 | 
				
			||||||
 | 
					
 | 
				
			||||||
              # goimports, godoc, etc.
 | 
					              # goimports, godoc, etc.
 | 
				
			||||||
              gotools
 | 
					              gotools
 | 
				
			||||||
| 
						 | 
					@ -35,7 +41,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            shellHook = ''
 | 
					            shellHook = ''
 | 
				
			||||||
              echo "Entering Go env"
 | 
					              echo "Entering Go env"
 | 
				
			||||||
              echo "Running `${pkgs.go}/bin/go version`"
 | 
					              echo "Running `${goPkg}/bin/go version`"
 | 
				
			||||||
            '';
 | 
					            '';
 | 
				
			||||||
          };
 | 
					          };
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										2
									
								
								rust/.gitignore
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								rust/.gitignore
									
										
									
									
										vendored
									
									
								
							| 
						 | 
					@ -1,2 +1,2 @@
 | 
				
			||||||
.direnv
 | 
					.direnv/
 | 
				
			||||||
target
 | 
					target
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue