nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 clangStdenv,
4 fetchFromGitHub,
5}:
6
7clangStdenv.mkDerivation (finalAttrs: {
8 pname = "yafetch";
9 version = "unstable-2022-04-20";
10
11 src = fetchFromGitHub {
12 owner = "kira64xyz";
13 repo = "yafetch";
14 rev = "a118cfc13f0b475db7c266105c10138d838788b8";
15 hash = "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 = {
30 homepage = "https://github.com/kira64xyz/yafetch";
31 description = "Yet another fetch clone written in C++";
32 license = lib.licenses.gpl3Plus;
33 maintainers = with lib.maintainers; [ ashley ];
34 platforms = lib.platforms.linux;
35 mainProgram = "yafetch";
36 };
37})