nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5 writableTmpDirAsHomeHook,
6}:
7
8buildGoModule (finalAttrs: {
9 pname = "harsh";
10 version = "0.13.1";
11
12 src = fetchFromGitHub {
13 owner = "wakatara";
14 repo = "harsh";
15 tag = "v${finalAttrs.version}";
16 hash = "sha256-QaHZg/qssHuxp+flSXqwlbTtB8H/zsfwn+yaw0tOb9o=";
17 };
18
19 vendorHash = "sha256-cjlpCTIugNjgY4RKrjJZd4TSM5BqgSKwpd2HJP6V9i4=";
20
21 nativeCheckInputs = [ writableTmpDirAsHomeHook ];
22
23 checkFlags =
24 let
25 skippedTests = [
26 "TestNewHabitIntegration" # panic: unexpected call to os.Exit(0) during test
27 "TestBuildGraph" # Expected graph length 10, got 24
28 ];
29 in
30 [ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ];
31
32 meta = {
33 description = "CLI habit tracking for geeks";
34 homepage = "https://github.com/wakatara/harsh";
35 changelog = "https://github.com/wakatara/harsh/releases/tag/v${finalAttrs.version}";
36 license = lib.licenses.mit;
37 maintainers = [ ];
38 mainProgram = "harsh";
39 };
40})