lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

uwufetch: 2.0 -> 2.1

rewine c7c8258c 349eefb8

+20 -40
+20 -12
pkgs/tools/misc/uwufetch/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub, fetchpatch, makeWrapper, viu }: 1 + { lib, stdenv, fetchFromGitHub, makeWrapper, viu }: 2 2 3 3 stdenv.mkDerivation rec { 4 4 pname = "uwufetch"; 5 - version = "2.0"; 5 + version = "2.1"; 6 6 7 7 src = fetchFromGitHub { 8 8 owner = "TheDarkBug"; 9 9 repo = pname; 10 10 rev = version; 11 - hash = "sha256-2kktKdQ1xjQRIQR2auwveHgNWGaX1jdJsdlgWrH6l2g="; 11 + hash = "sha256-cA8sajh+puswyKikr0Jp9ei+EpVkH+vhEp+pTerkUqA="; 12 12 }; 13 13 14 - patches = [ 15 - # cannot find images in /usr 16 - ./fix-paths.patch 17 - ]; 14 + postPatch = '' 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.isDarwin '' 23 + substituteInPlace Makefile \ 24 + --replace "local/bin" "bin" \ 25 + --replace "local/lib" "lib" \ 26 + --replace "local/include" "include" \ 27 + --replace "local/share" "share" 28 + ''; 18 29 19 30 nativeBuildInputs = [ makeWrapper ]; 20 31 ··· 24 35 25 36 installFlags = [ 26 37 "DESTDIR=${placeholder "out"}" 27 - "ETC_DIR=${placeholder "out"}" 38 + "ETC_DIR=${placeholder "out"}/etc" 28 39 ]; 29 40 30 - postPatch = '' 31 - substituteAllInPlace uwufetch.c 32 - ''; 33 - 34 41 postFixup = '' 35 42 wrapProgram $out/bin/uwufetch \ 36 43 --prefix PATH ":" ${lib.makeBinPath [ viu ]} ··· 40 47 description = "A meme system info tool for Linux"; 41 48 homepage = "https://github.com/TheDarkBug/uwufetch"; 42 49 license = licenses.gpl3Plus; 50 + platforms = platforms.unix; 43 51 maintainers = with maintainers; [ lourkeur ]; 44 52 }; 45 53 }
-28
pkgs/tools/misc/uwufetch/fix-paths.patch
··· 1 - diff --git a/uwufetch.c b/uwufetch.c 2 - index f2d7857..8191888 100644 3 - --- a/uwufetch.c 4 - +++ b/uwufetch.c 5 - @@ -160,9 +160,9 @@ void print_image(struct info* user_info) { 6 - if (strcmp(user_info->os_name, "android") == 0) 7 - sprintf(command, "viu -t -w 18 -h 8 /data/data/com.termux/files/usr/lib/uwufetch/%s.png 2> /dev/null", user_info->os_name); // image command for android 8 - else if (strcmp(user_info->os_name, "macos") == 0) 9 - - sprintf(command, "viu -t -w 18 -h 8 /usr/local/lib/uwufetch/%s.png 2> /dev/null", user_info->os_name); 10 - + sprintf(command, "viu -t -w 18 -h 8 @out@/lib/uwufetch/%s.png 2> /dev/null", user_info->os_name); 11 - else 12 - - sprintf(command, "viu -t -w 18 -h 8 /usr/lib/uwufetch/%s.png 2> /dev/null", user_info->os_name); // image command for other systems 13 - + sprintf(command, "viu -t -w 18 -h 8 @out@/lib/uwufetch/%s.png 2> /dev/null", user_info->os_name); // image command for other systems 14 - } 15 - printf("\n"); 16 - if (system(command) != 0) // if viu is not installed or the image is missing 17 - @@ -587,9 +587,9 @@ void print_ascii(struct info* user_info) { 18 - if (strcmp(user_info->os_name, "android") == 0) 19 - sprintf(ascii_file, "/data/data/com.termux/files/usr/lib/uwufetch/ascii/%s.txt", user_info->os_name); 20 - else if (strcmp(user_info->os_name, "macos") == 0) 21 - - sprintf(ascii_file, "/usr/local/lib/uwufetch/ascii/%s.txt", user_info->os_name); 22 - + sprintf(ascii_file, "@out@/lib/uwufetch/ascii/%s.txt", user_info->os_name); 23 - else 24 - - sprintf(ascii_file, "/usr/lib/uwufetch/ascii/%s.txt", user_info->os_name); 25 - + sprintf(ascii_file, "@out@/lib/uwufetch/ascii/%s.txt", user_info->os_name); 26 - 27 - file = fopen(ascii_file, "r"); 28 - if (!file) {