about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/misc/yafetch/default.nix
blob: 8dad93d0debbc93aafa02803e1378492906fb6ef (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
{ lib, stdenv, fetchFromGitLab }:

stdenv.mkDerivation rec {
  pname = "yafetch";
  version = "unstable-2021-06-15";

  src = fetchFromGitLab {
    owner = "cyberkitty";
    repo = pname;
    rev = "423a7d1f1ef8f0e4caf586710828620d3cb593e3";
    sha256 = "184yy7i8ca2fh6d1rxyhxi9gqb57fpz7ia0i56dl1zhg769m8b99";
  };

  # Use the provided NixOS logo automatically
  prePatch = ''
    substituteInPlace ./config.h --replace \
      "#include \"ascii/tux.h\"" "#include \"ascii/nixos.h\""
  '';

  # Fixes installation path
  PREFIX = placeholder "out";

  meta = with lib; {
    homepage = "https://gitlab.com/cyberkitty/yafetch";
    description = "Yet another fetch clone written in C++";
    license = licenses.gpl2Only;
    maintainers = with maintainers; [ ivar ashley ];
    platforms = platforms.linux;
  };
}