1 { lib, stdenv, fetchFromGitHub, makeWrapper, viu }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
11 hash = "sha256-cA8sajh+puswyKikr0Jp9ei+EpVkH+vhEp+pTerkUqA=";
15 substituteInPlace uwufetch.c \
16 --replace "/usr/lib/uwufetch" "$out/lib/uwufetch" \
17 --replace "/usr/local/lib/uwufetch" "$out/lib/uwufetch" \
18 --replace "/etc/uwufetch/config" "$out/etc/uwufetch/config"
19 # fix command_path for package manager (nix-store)
20 substituteInPlace fetch.c \
21 --replace "/usr/bin" "/run/current-system/sw/bin"
22 '' + lib.optionalString stdenv.hostPlatform.isDarwin ''
23 substituteInPlace Makefile \
24 --replace "local/bin" "bin" \
25 --replace "local/lib" "lib" \
26 --replace "local/include" "include" \
27 --replace "local/share" "share"
30 nativeBuildInputs = [ makeWrapper ];
33 "UWUFETCH_VERSION=${version}"
37 "DESTDIR=${placeholder "out"}"
38 "ETC_DIR=${placeholder "out"}/etc"
42 wrapProgram $out/bin/uwufetch \
43 --prefix PATH ":" ${lib.makeBinPath [ viu ]}
47 description = "Meme system info tool for Linux";
48 homepage = "https://github.com/TheDarkBug/uwufetch";
49 license = licenses.gpl3Plus;
50 platforms = platforms.unix;
51 maintainers = with maintainers; [ bbjubjub ];
52 mainProgram = "uwufetch";