Skip to content

Commit

Permalink
Merge branch 'sebastianwebber/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
domenkozar committed Sep 20, 2024
2 parents 09526aa + 230684a commit 2bdf646
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
13 changes: 13 additions & 0 deletions examples/go/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{ pkgs, name, version, ... }:
pkgs.buildGoApplication {
pname = name;
version = version;

src = builtins.path {
path = ./.;
name = "source";
};

## remember to call 'gomod2nix' to generate this file
modules = ./gomod2nix.toml;
}
28 changes: 28 additions & 0 deletions examples/go/devenv.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{ pkgs, lib, config, inputs, ... }:

{
packages = [ pkgs.git pkgs.gomod2nix ];

languages.go.enable = true;

pre-commit.hooks = {
govet = {
enable = true;
pass_filenames = false;
};
gotest.enable = true;
golangci-lint = {
enable = true;
pass_filenames = false;
};
};

outputs =
let
name = "my-app";
version = "1.0.0";
in
{ app = import ./default.nix { inherit pkgs name version; }; };

# See full reference at https://devenv.sh/reference/options/
}
10 changes: 10 additions & 0 deletions examples/go/devenv.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# yaml-language-server: $schema=https://devenv.sh/devenv.schema.json
inputs:
nixpkgs:
url: github:cachix/devenv-nixpkgs/rolling
gomod:
url: github:nix-community/gomod2nix
overlays:
- default
# If you're using non-OSS software, you can set allowUnfree to true.
# allowUnfree: true

0 comments on commit 2bdf646

Please sign in to comment.