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