summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/jd/jdd/package.nix
blob: 9d61d4509041ef480348d348365d6b4d2c4becf7 (plain)
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
{
  lib,
  fetchFromGitHub,
  buildGoModule,
  versionCheckHook,
}:

buildGoModule (finalAttrs: {
  pname = "jdd";
  version = "0.4.5";

  src = fetchFromGitHub {
    owner = "mahyarmirrashed";
    repo = "jdd";
    tag = "v${finalAttrs.version}";
    hash = "sha256-3keJrKbR3+J3z22W8Xoabz9YhvjRRBBMo59l/eJo7Hs=";
  };

  vendorHash = "sha256-KEg5X2wHx7KPHEL1zJd/DeDnR69FyB6pajpHIYdep2k=";

  ldflags = [ "-X=main.version=${finalAttrs.version}" ];

  doInstallCheck = true;
  nativeInstallCheckInputs = [ versionCheckHook ];

  meta = {
    description = "Johnny Decimal daemon for automatically organizing files into the correct drawer using their filename";
    homepage = "https://github.com/mahyarmirrashed/jdd";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ mahyarmirrashed ];
    mainProgram = "jdd";
  };
})