1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5}:
6
7stdenv.mkDerivation rec {
8 pname = "yafetch";
9 version = "unstable-2022-04-20";
10
11 src = fetchFromGitHub {
12 owner = "kira64xyz";
13 repo = pname;
14 rev = "a118cfc13f0b475db7c266105c10138d838788b8";
15 sha256 = "bSJlerfbJG6h5dDwWQKHnVLH6DEuvuUyqaRuJ7jvOsA=";
16 };
17
18 # Use the provided NixOS logo automatically
19 prePatch = ''
20 substituteInPlace ./config.h --replace \
21 "#include \"ascii/gnu.h\"" "#include \"ascii/nixos.h\""
22
23 sed '1i#include <array>' -i config.h # gcc12
24 '';
25
26 # Fixes installation path
27 PREFIX = placeholder "out";
28
29 meta = with lib; {
30 homepage = "https://github.com/kira64xyz/yafetch";
31 description = "Yet another fetch clone written in C++";
32 license = licenses.gpl3Plus;
33 maintainers = with maintainers; [ ashley ];
34 platforms = platforms.linux;
35 mainProgram = "yafetch";
36 };
37}