about summary refs log tree commit diff
path: root/pkgs/by-name/ma/maxfetch/package.nix
blob: 3b664020a4e86810c1c14593a05d8c6919eebc6d (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
{ lib
, stdenvNoCC
, fetchFromGitHub
, makeBinaryWrapper
, gnused
, ncurses
, procps
}:

stdenvNoCC.mkDerivation {
  pname = "maxfetch";
  version = "unstable-2023-07-31";

  src = fetchFromGitHub {
    owner = "jobcmax";
    repo = "maxfetch";
    rev = "17baa4047073e20572403b70703c69696af6b68d";
    hash = "sha256-LzOhrFFjGs9GIDjk1lUFKhlnzJuEUrKjBcv1eT3kaY8=";
  };

  nativeBuildInputs = [ makeBinaryWrapper ];

  installPhase = ''
    runHook preInstall
    install -Dm755 maxfetch $out/bin/maxfetch
    wrapProgram $out/bin/maxfetch \
     --prefix PATH : ${lib.makeBinPath [ gnused ncurses procps ]}
    runHook postInstall
  '';

  meta = with lib; {
    description = "Nice fetching program written in sh";
    homepage = "https://github.com/jobcmax/maxfetch";
    license = licenses.gpl2Plus;
    mainProgram = "maxfetch";
    maintainers = with maintainers; [ jtbx ];
    platforms = platforms.unix;
  };
}