-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
53 lines (46 loc) · 1.55 KB
/
Copy pathflake.nix
File metadata and controls
53 lines (46 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{
description = "readest-hardcover-sync development environment";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
};
outputs = { self, nixpkgs }:
let
supportedSystems = [ "x86_64-linux" "aarch64-darwin" "x86_64-darwin" "aarch64-linux" ];
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
pkgs = import nixpkgs { inherit system; };
});
# go-test-coverage package (not in nixpkgs)
mkGoTestCoverage = pkgs: pkgs.buildGoModule rec {
pname = "go-test-coverage";
version = "2.18.3";
src = pkgs.fetchFromGitHub {
owner = "vladopajic";
repo = "go-test-coverage";
rev = "v${version}";
hash = "sha256-8KPnufCLGR3beBjTJSGSkxZd+m3r1pYDtTBLhG/eSEg=";
};
vendorHash = "sha256-iJ3VFnzPYd0ovyK/QdCDolh5p8fe/aXulnHxAia5UuE=";
# Skip tests - upstream has integration tests requiring GitHub credentials
# and nil pointer bugs with newer Go versions
doCheck = false;
checkPhase = "";
meta = {
description = "Tool to report issues when test coverage falls below threshold";
homepage = "https://github.com/vladopajic/go-test-coverage";
};
};
in
{
devShells = forEachSupportedSystem ({ pkgs }: {
default = pkgs.mkShell {
packages = with pkgs; [
go_1_26
golangci-lint
go-task
pre-commit
(mkGoTestCoverage pkgs)
];
};
});
};
}