1{ stdenv, lib, fetchFromGitHub, makeWrapper, coreutils, gawk, procps, gnused
2, bc, findutils, xdpyinfo, xprop, gnugrep, ncurses
3, darwin
4}:
5
6let
7 path = lib.makeBinPath ([
8 coreutils gawk gnused findutils
9 gnugrep ncurses bc
10 ] ++ lib.optionals stdenv.isLinux [
11 procps
12 xdpyinfo
13 xprop
14 ] ++ lib.optionals stdenv.isDarwin (with darwin; [
15 adv_cmds
16 DarwinTools
17 system_cmds
18 "/usr" # some commands like defaults is not available to us
19 ]));
20
21in stdenv.mkDerivation rec {
22 name = "screenFetch-${version}";
23 version = "3.8.0";
24
25 src = fetchFromGitHub {
26 owner = "KittyKatt";
27 repo = "screenFetch";
28 rev = "v${version}";
29 sha256 = "00ibv72cb7cqfpljyzgvajhbp0clqsqliz18nyv83bfy3gkf2qs8";
30 };
31
32 nativeBuildInputs = [ makeWrapper ];
33
34 installPhase = ''
35 install -Dm 0755 screenfetch-dev $out/bin/screenfetch
36 install -Dm 0644 screenfetch.1 $out/share/man/man1/screenfetch.1
37 install -Dm 0644 -t $out/share/doc/screenfetch CHANGELOG COPYING README.mkdn TODO
38
39 # Fix all of the dependencies of screenfetch
40 patchShebangs $out/bin/screenfetch
41 wrapProgram "$out/bin/screenfetch" \
42 --prefix PATH : ${path}
43 '';
44
45 meta = with lib; {
46 description = "Fetches system/theme information in terminal for Linux desktop screenshots";
47 longDescription = ''
48 screenFetch is a "Bash Screenshot Information Tool". This handy Bash
49 script can be used to generate one of those nifty terminal theme
50 information + ASCII distribution logos you see in everyone's screenshots
51 nowadays. It will auto-detect your distribution and display an ASCII
52 version of that distribution's logo and some valuable information to the
53 right. There are options to specify no ascii art, colors, taking a
54 screenshot upon displaying info, and even customizing the screenshot
55 command! This script is very easy to add to and can easily be extended.
56 '';
57 license = licenses.gpl3;
58 homepage = https://github.com/KittyKatt/screenFetch;
59 maintainers = with maintainers; [ relrod ];
60 platforms = platforms.all;
61 };
62}