summaryrefslogtreecommitdiff
path: root/pkgs/neowofetch/package.nix
blob: 8efa1674b24267fe394477bb38cc404cc76cceaa (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{
  lib,
  bash,
  hyfetch,
  installShellFiles,
  makeBinaryWrapper,
  pciutils,
  stdenvNoCC,
  ueberzug,
  withX11Support ? stdenvNoCC.hostPlatform.isLinux,
}:

stdenvNoCC.mkDerivation (finalAttrs: {
  pname = "neowofetch";

  inherit (hyfetch) version src;

  strictDeps = true;

  nativeBuildInputs = [
    installShellFiles
    makeBinaryWrapper
  ];

  buildInputs = [ bash ];

  dontConfigure = true;
  dontBuild = true;

  postInstall = ''
    mv {neo,neowo}fetch
    installBin neowofetch

    mv docs/{neo,neowo}fetch.1
    installManPage docs/neowofetch.1
  '';

  postFixup = ''
    wrapProgram "$out"/bin/neowofetch \
      --prefix PATH : ${lib.makeBinPath finalAttrs.passthru.binPath}
  '';

  passthru = {
    binPath = [ pciutils ] ++ lib.optional withX11Support ueberzug;
  };

  meta = {
    description = "Fast, highly customizable system info script (Maintained fork)";
    homepage = "https://github.com/hykilpikonna/hyfetch";
    changelog = "https://github.com/hykilpikonna/hyfetch/releases/tag/${finalAttrs.version}";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ getchoo ];
    mainProgram = "neowofetch";
  };
})