about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/de/devdash/package.nix
blob: 210a016277f69174376da5c3a4e09c8c3ff3bb77 (plain) (blame)
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
{
  lib
, buildGoModule
, fetchFromGitHub
, nix-update-script
, coreutils
}:

buildGoModule rec {
  pname = "devdash";
  version = "0.5.0";

  src = fetchFromGitHub {
    owner = "Phantas0s";
    repo = "devdash";
    rev = "refs/tags/v${version}";
    hash = "sha256-RUPpgMVl9Cm8uhztdfKnuQ6KdMn9m9PewlT59NnTSiY=";
  };

  vendorHash = "sha256-xuc8rAkyCInNFxs5itwabqBe4CPg/sAuhcTJsapx7Q8=";

  ldflags = [
    "-s -w"
    "-X github.com/Phantas0s/devdash/cmd.current=${version}"
    "-X github.com/Phantas0s/devdash/cmd.buildDate=1970-01-01-00:00:01"
  ];

  patchPhase = ''
    runHook prePatch

    shopt -s globstar
    substituteInPlace **/*.go --replace '"/bin/' '"/usr/bin/env '
    shopt -u globstar

    runHook postPatch
  '';

  runtimeDependencies = [
    coreutils
  ];

  passthru.updateScript = nix-update-script { };

  meta = {
    description = "Highly configurable terminal dashboard for developers and creators";
    homepage = "https://github.com/Phantas0s/devdash";
    changelog = "https://github.com/Phantas0s/devdash/blob/v${version}/CHANGELOG.md";
    maintainers = with lib.maintainers; [ h7x4 ];
    license = lib.licenses.asl20;
    mainProgram = "devdash";
  };
}