nixpkgs-suyu/pkgs/tools/misc/screenfetch/default.nix

63 lines
2.1 KiB
Nix
Raw Normal View History

{ stdenv, lib, fetchFromGitHub, makeWrapper, coreutils, gawk, procps, gnused
, bc, findutils, xdpyinfo, xprop, gnugrep, ncurses
, darwin
2015-05-10 02:41:40 +02:00
}:
2018-02-09 11:04:55 +01:00
let
path = lib.makeBinPath ([
coreutils gawk gnused findutils
gnugrep ncurses bc
] ++ 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 {
name = "screenFetch-${version}";
version = "3.8.0";
2016-10-17 01:07:49 +02:00
src = fetchFromGitHub {
2018-02-09 11:04:55 +01:00
owner = "KittyKatt";
repo = "screenFetch";
rev = "v${version}";
sha256 = "00ibv72cb7cqfpljyzgvajhbp0clqsqliz18nyv83bfy3gkf2qs8";
};
2015-05-10 02:41:40 +02:00
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
2015-05-10 02:41:40 +02:00
install -Dm 0755 screenfetch-dev $out/bin/screenfetch
2017-08-11 22:42:10 +02:00
install -Dm 0644 screenfetch.1 $out/share/man/man1/screenfetch.1
2018-02-09 11:04:55 +01:00
install -Dm 0644 -t $out/share/doc/screenfetch CHANGELOG COPYING README.mkdn TODO
2015-05-10 02:41:40 +02:00
2018-02-09 11:04:55 +01:00
# Fix all of the dependencies of screenfetch
2015-05-10 02:41:40 +02:00
patchShebangs $out/bin/screenfetch
wrapProgram "$out/bin/screenfetch" \
2018-02-09 11:04:55 +01:00
--prefix PATH : ${path}
'';
meta = with lib; {
2014-11-11 14:20:43 +01:00
description = "Fetches system/theme information in terminal for Linux desktop screenshots";
longDescription = ''
2018-02-09 11:04:55 +01: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.
'';
license = licenses.gpl3;
2018-02-09 11:04:55 +01:00
homepage = https://github.com/KittyKatt/screenFetch;
maintainers = with maintainers; [ relrod ];
platforms = platforms.all;
};
}