2017-11-19 04:07:46 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, makeWrapper, coreutils, gawk, procps, gnused
|
2019-10-15 21:09:25 +01:00
|
|
|
, bc, findutils, xdpyinfo, xprop, gnugrep, ncurses, pciutils
|
2017-11-19 04:07:46 +00:00
|
|
|
, darwin
|
2015-05-10 01:41:40 +01:00
|
|
|
}:
|
2014-05-27 12:11:34 +01:00
|
|
|
|
2018-02-09 10:04:55 +00:00
|
|
|
let
|
|
|
|
path = lib.makeBinPath ([
|
|
|
|
coreutils gawk gnused findutils
|
2019-10-15 21:09:25 +01:00
|
|
|
gnugrep ncurses bc pciutils
|
2018-02-09 10:04:55 +00:00
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
|
|
|
procps
|
|
|
|
xdpyinfo
|
|
|
|
xprop
|
|
|
|
] ++ lib.optionals stdenv.isDarwin (with darwin; [
|
|
|
|
adv_cmds
|
|
|
|
DarwinTools
|
|
|
|
system_cmds
|
|
|
|
"/usr" # some commands like defaults is not available to us
|
|
|
|
]));
|
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "screenFetch";
|
2019-11-29 17:42:16 +00:00
|
|
|
version = "3.9.1";
|
2014-05-27 12:11:34 +01:00
|
|
|
|
2016-10-17 00:07:49 +01:00
|
|
|
src = fetchFromGitHub {
|
2018-02-09 10:04:55 +00:00
|
|
|
owner = "KittyKatt";
|
|
|
|
repo = "screenFetch";
|
|
|
|
rev = "v${version}";
|
2019-11-29 17:42:16 +00:00
|
|
|
sha256 = "04l8aqr474pb115nagn9f6y48jw92n1qfszgw7dbhgl4mpn95lcr";
|
2014-05-27 12:11:34 +01:00
|
|
|
};
|
|
|
|
|
2015-05-10 01:41:40 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
2014-05-27 12:11:34 +01:00
|
|
|
installPhase = ''
|
2015-05-10 01:41:40 +01:00
|
|
|
install -Dm 0755 screenfetch-dev $out/bin/screenfetch
|
2017-08-11 21:42:10 +01:00
|
|
|
install -Dm 0644 screenfetch.1 $out/share/man/man1/screenfetch.1
|
2018-02-09 10:04:55 +00:00
|
|
|
install -Dm 0644 -t $out/share/doc/screenfetch CHANGELOG COPYING README.mkdn TODO
|
2015-05-10 01:41:40 +01:00
|
|
|
|
2018-02-09 10:04:55 +00:00
|
|
|
# Fix all of the dependencies of screenfetch
|
2015-05-10 01:41:40 +01:00
|
|
|
patchShebangs $out/bin/screenfetch
|
|
|
|
wrapProgram "$out/bin/screenfetch" \
|
2018-02-09 10:04:55 +00:00
|
|
|
--prefix PATH : ${path}
|
2014-05-27 12:11:34 +01:00
|
|
|
'';
|
|
|
|
|
2017-11-19 04:07:46 +00:00
|
|
|
meta = with lib; {
|
2014-11-11 13:20:43 +00:00
|
|
|
description = "Fetches system/theme information in terminal for Linux desktop screenshots";
|
2014-05-27 12:11:34 +01:00
|
|
|
longDescription = ''
|
2018-02-09 10:04:55 +00:00
|
|
|
screenFetch is a "Bash Screenshot Information Tool". This handy Bash
|
|
|
|
script can be used to generate one of those nifty terminal theme
|
|
|
|
information + ASCII distribution logos you see in everyone's screenshots
|
|
|
|
nowadays. It will auto-detect your distribution and display an ASCII
|
|
|
|
version of that distribution's logo and some valuable information to the
|
|
|
|
right. There are options to specify no ascii art, colors, taking a
|
|
|
|
screenshot upon displaying info, and even customizing the screenshot
|
|
|
|
command! This script is very easy to add to and can easily be extended.
|
2014-05-27 12:11:34 +01:00
|
|
|
'';
|
2017-11-19 04:07:46 +00:00
|
|
|
license = licenses.gpl3;
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/KittyKatt/screenFetch";
|
2018-02-09 10:04:55 +00:00
|
|
|
maintainers = with maintainers; [ relrod ];
|
2017-11-19 04:07:46 +00:00
|
|
|
platforms = platforms.all;
|
2014-05-27 12:11:34 +01:00
|
|
|
};
|
|
|
|
}
|