Skip to content

Commit a1168ed

Browse files
committed
fixup! feat: better handling of server installation path
1 parent 7a30c32 commit a1168ed

3 files changed

Lines changed: 109 additions & 4 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Update gomod2nix
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
paths:
8+
- go.mod
9+
- go.sum
10+
11+
jobs:
12+
update:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- uses: cachix/install-nix-action@v27
20+
with:
21+
nix_path: nixpkgs=channel:nixos-unstable
22+
23+
- name: Generate gomod2nix.toml
24+
run: nix run github:nix-community/gomod2nix -- generate
25+
26+
- name: Commit updated gomod2nix.toml
27+
uses: stefanzweifel/git-auto-commit-action@v5
28+
with:
29+
commit_message: "chore: update gomod2nix.toml"
30+
file_pattern: gomod2nix.toml

flake.nix

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,25 @@
22
inputs = {
33
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
44
flake-utils.url = "github:numtide/flake-utils";
5+
gomod2nix = {
6+
url = "github:nix-community/gomod2nix";
7+
inputs.nixpkgs.follows = "nixpkgs";
8+
};
59
};
610

7-
outputs = { self, flake-utils, nixpkgs }:
11+
outputs = { self, flake-utils, nixpkgs, gomod2nix }:
812
flake-utils.lib.eachDefaultSystem (system:
913
let
10-
pkgs = import nixpkgs { inherit system; };
11-
gitlab-nvim-server = pkgs.buildGoModule {
14+
pkgs = import nixpkgs {
15+
inherit system;
16+
overlays = [ gomod2nix.overlays.default ];
17+
};
18+
gitlab-nvim-server = pkgs.buildGoApplication {
1219
pname = "gitlab.nvim-server";
1320
version = "git";
1421
src = ./.;
15-
vendorHash = "sha256-OLAKTdzqynBDHqWV5RzIpfc3xZDm6uYyLD4rxbh0DMg=";
22+
modules = ./gomod2nix.toml;
23+
subPackages = [ "cmd" ];
1624
postInstall = ''
1725
cp -r ${./cmd/config} $out/bin/config
1826
mv $out/bin/cmd $out/bin/gitlab.nvim
@@ -34,6 +42,7 @@
3442
git
3543
go
3644
go-tools
45+
gomod2nix
3746
golangci-lint
3847
luajitPackages.busted
3948
luajitPackages.luacheck

gomod2nix.toml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
schema = 3
2+
3+
[mod]
4+
[mod.'github.com/gabriel-vasile/mimetype']
5+
version = 'v1.4.3'
6+
hash = 'sha256-EDmlRi3av27dq/ISVTglv08z4yZzMQ/SxL1c46EJro0='
7+
8+
[mod.'github.com/go-playground/locales']
9+
version = 'v0.14.1'
10+
hash = 'sha256-BMJGAexq96waZn60DJXZfByRHb8zA/JP/i6f/YrW9oQ='
11+
12+
[mod.'github.com/go-playground/universal-translator']
13+
version = 'v0.18.1'
14+
hash = 'sha256-2/B2qP51zfiY+k8G0w0D03KXUc7XpWj6wKY7NjNP/9E='
15+
16+
[mod.'github.com/go-playground/validator/v10']
17+
version = 'v10.22.1'
18+
hash = 'sha256-EsgeltH0ow6saxLvTFVtIyHVqWI3Fiu1AE2Qmnsmowg='
19+
20+
[mod.'github.com/google/go-cmp']
21+
version = 'v0.7.0'
22+
hash = 'sha256-JbxZFBFGCh/Rj5XZ1vG94V2x7c18L8XKB0N9ZD5F2rM='
23+
24+
[mod.'github.com/google/go-querystring']
25+
version = 'v1.2.0'
26+
hash = 'sha256-F/Ve4oDaEqho8RryvdGSRR22/DbYHWZQa6M60n6oSYM='
27+
28+
[mod.'github.com/hashicorp/go-cleanhttp']
29+
version = 'v0.5.2'
30+
hash = 'sha256-N9GOKYo7tK6XQUFhvhImtL7PZW/mr4C4Manx/yPVvcQ='
31+
32+
[mod.'github.com/hashicorp/go-retryablehttp']
33+
version = 'v0.7.8'
34+
hash = 'sha256-4LZwKaFBbpKi9lSq5y6lOlYHU6WMnQdGNMxTd33rN80='
35+
36+
[mod.'github.com/leodido/go-urn']
37+
version = 'v1.4.0'
38+
hash = 'sha256-Q6kplWkY37Tzy6GOme3Wut40jFK4Izun+ij/BJvcEu0='
39+
40+
[mod.'gitlab.com/gitlab-org/api/client-go']
41+
version = 'v1.17.0'
42+
hash = 'sha256-PdVbuFXCp/TphltAkpJG3YNXhtqHnhhyel9KLUX/xz0='
43+
44+
[mod.'golang.org/x/crypto']
45+
version = 'v0.19.0'
46+
hash = 'sha256-Vi6vY/eWNlYQ9l3Y+gA+X2+h2CmzEOrBRVFO/cnrPWc='
47+
48+
[mod.'golang.org/x/net']
49+
version = 'v0.21.0'
50+
hash = 'sha256-LfiqMpPtqvW/eLkfx6Ebr5ksqKbQli6uq06c/+XrBsw='
51+
52+
[mod.'golang.org/x/oauth2']
53+
version = 'v0.34.0'
54+
hash = 'sha256-5eqpGGxJ7FJsPmfRek6roeGmkWHBMJaWYXyz8gXJsS4='
55+
56+
[mod.'golang.org/x/sys']
57+
version = 'v0.39.0'
58+
hash = 'sha256-dxTBu/JAWUkPbjFIXXRFdhQWyn+YyEpIC+tWqGo0Y6U='
59+
60+
[mod.'golang.org/x/text']
61+
version = 'v0.32.0'
62+
hash = 'sha256-9PXtWBKKY9rG4AgjSP4N+I1DhepXhy8SF/vWSIDIoWs='
63+
64+
[mod.'golang.org/x/time']
65+
version = 'v0.14.0'
66+
hash = 'sha256-fVjpq0ieUHVEOTSElDVleMWvfdcqojZchqdUXiC7NnY='

0 commit comments

Comments
 (0)