tangled
alpha
login
or
join now
oppi.li
/
gust
6
fork
atom
background code checker for golang
6
fork
atom
overview
issues
2
pulls
pipelines
nix: write flake for gust
oppi.li
11 months ago
01802ecc
b29c6a26
+110
-2
5 changed files
expand all
collapse all
unified
split
.gitignore
cmd
gust
main.go
flake.lock
flake.nix
go.mod
+4
-1
.gitignore
···
1
1
*.log
2
2
*.txt
3
3
-
main
3
3
+
gust
4
4
+
.envrc
5
5
+
.direnv
6
6
+
result
cmd/main.go
cmd/gust/main.go
+48
flake.lock
···
1
1
+
{
2
2
+
"nodes": {
3
3
+
"gitignore": {
4
4
+
"inputs": {
5
5
+
"nixpkgs": [
6
6
+
"nixpkgs"
7
7
+
]
8
8
+
},
9
9
+
"locked": {
10
10
+
"lastModified": 1709087332,
11
11
+
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
12
12
+
"owner": "hercules-ci",
13
13
+
"repo": "gitignore.nix",
14
14
+
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
15
15
+
"type": "github"
16
16
+
},
17
17
+
"original": {
18
18
+
"owner": "hercules-ci",
19
19
+
"repo": "gitignore.nix",
20
20
+
"type": "github"
21
21
+
}
22
22
+
},
23
23
+
"nixpkgs": {
24
24
+
"locked": {
25
25
+
"lastModified": 1745234285,
26
26
+
"narHash": "sha256-GfpyMzxwkfgRVN0cTGQSkTC0OHhEkv3Jf6Tcjm//qZ0=",
27
27
+
"owner": "nixos",
28
28
+
"repo": "nixpkgs",
29
29
+
"rev": "c11863f1e964833214b767f4a369c6e6a7aba141",
30
30
+
"type": "github"
31
31
+
},
32
32
+
"original": {
33
33
+
"owner": "nixos",
34
34
+
"ref": "nixos-unstable",
35
35
+
"repo": "nixpkgs",
36
36
+
"type": "github"
37
37
+
}
38
38
+
},
39
39
+
"root": {
40
40
+
"inputs": {
41
41
+
"gitignore": "gitignore",
42
42
+
"nixpkgs": "nixpkgs"
43
43
+
}
44
44
+
}
45
45
+
},
46
46
+
"root": "root",
47
47
+
"version": 7
48
48
+
}
+57
flake.nix
···
1
1
+
{
2
2
+
description = "background code checker for golang projects";
3
3
+
4
4
+
inputs = {
5
5
+
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
6
6
+
gitignore = {
7
7
+
url = "github:hercules-ci/gitignore.nix";
8
8
+
inputs.nixpkgs.follows = "nixpkgs";
9
9
+
};
10
10
+
};
11
11
+
12
12
+
outputs = {
13
13
+
self,
14
14
+
nixpkgs,
15
15
+
gitignore,
16
16
+
}: let
17
17
+
supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"];
18
18
+
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
19
19
+
nixpkgsFor = forAllSystems (system:
20
20
+
import nixpkgs {
21
21
+
inherit system;
22
22
+
overlays = [self.overlays.default];
23
23
+
});
24
24
+
inherit (gitignore.lib) gitignoreSource;
25
25
+
in {
26
26
+
overlays.default = final: prev: let
27
27
+
in {
28
28
+
gust = final.buildGoModule {
29
29
+
pname = "gust";
30
30
+
version = "0.1.0";
31
31
+
src = gitignoreSource ./.;
32
32
+
subPackages = ["cmd/gust"];
33
33
+
vendorHash = "sha256-0+WwkJj/ZovrTrhPL4aimmaBfEgaIEtTt6HYDWzUIFE=";
34
34
+
env.CGO_ENABLED = 0;
35
35
+
};
36
36
+
};
37
37
+
packages = forAllSystems (system: {inherit (nixpkgsFor."${system}") gust;});
38
38
+
defaultPackage = forAllSystems (system: nixpkgsFor.${system}.gust);
39
39
+
formatter = forAllSystems (system: nixpkgsFor."${system}".alejandra);
40
40
+
devShells = forAllSystems (system: let
41
41
+
pkgs = nixpkgsFor.${system};
42
42
+
staticShell = pkgs.mkShell.override {
43
43
+
stdenv = pkgs.pkgsStatic.stdenv;
44
44
+
};
45
45
+
in {
46
46
+
default = staticShell {
47
47
+
nativeBuildInputs = [
48
48
+
pkgs.go
49
49
+
pkgs.gopls
50
50
+
pkgs.gust
51
51
+
pkgs.jujutsu
52
52
+
];
53
53
+
CGO_ENABLED = 0;
54
54
+
};
55
55
+
});
56
56
+
};
57
57
+
}
+1
-1
go.mod
···
7
7
github.com/charmbracelet/bubbletea v1.3.4
8
8
github.com/charmbracelet/lipgloss v1.1.0
9
9
github.com/fsnotify/fsnotify v1.9.0
10
10
+
github.com/muesli/reflow v0.3.0
10
11
)
11
12
12
13
require (
···
22
23
github.com/mattn/go-runewidth v0.0.16 // indirect
23
24
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
24
25
github.com/muesli/cancelreader v0.2.2 // indirect
25
25
-
github.com/muesli/reflow v0.3.0 // indirect
26
26
github.com/muesli/termenv v0.16.0 // indirect
27
27
github.com/rivo/uniseg v0.4.7 // indirect
28
28
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect