mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-12 16:53:21 +00:00
755b915a15
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \ | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
55 lines
1.5 KiB
Nix
55 lines
1.5 KiB
Nix
{ lib, stdenv, fetchFromGitHub, makeWrapper, viu }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "uwufetch";
|
|
version = "2.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "TheDarkBug";
|
|
repo = pname;
|
|
rev = version;
|
|
hash = "sha256-cA8sajh+puswyKikr0Jp9ei+EpVkH+vhEp+pTerkUqA=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace uwufetch.c \
|
|
--replace "/usr/lib/uwufetch" "$out/lib/uwufetch" \
|
|
--replace "/usr/local/lib/uwufetch" "$out/lib/uwufetch" \
|
|
--replace "/etc/uwufetch/config" "$out/etc/uwufetch/config"
|
|
# fix command_path for package manager (nix-store)
|
|
substituteInPlace fetch.c \
|
|
--replace "/usr/bin" "/run/current-system/sw/bin"
|
|
'' + lib.optionalString stdenv.isDarwin ''
|
|
substituteInPlace Makefile \
|
|
--replace "local/bin" "bin" \
|
|
--replace "local/lib" "lib" \
|
|
--replace "local/include" "include" \
|
|
--replace "local/share" "share"
|
|
'';
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
makeFlags = [
|
|
"UWUFETCH_VERSION=${version}"
|
|
];
|
|
|
|
installFlags = [
|
|
"DESTDIR=${placeholder "out"}"
|
|
"ETC_DIR=${placeholder "out"}/etc"
|
|
];
|
|
|
|
postFixup = ''
|
|
wrapProgram $out/bin/uwufetch \
|
|
--prefix PATH ":" ${lib.makeBinPath [ viu ]}
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Meme system info tool for Linux";
|
|
homepage = "https://github.com/TheDarkBug/uwufetch";
|
|
license = licenses.gpl3Plus;
|
|
platforms = platforms.unix;
|
|
maintainers = with maintainers; [ bbjubjub ];
|
|
mainProgram = "uwufetch";
|
|
};
|
|
}
|