Merge pull request #31814 from matthewbauer/screenfetch-darwin

screenfetch: fix darwin execution
This commit is contained in:
Daiderd Jordan 2017-11-21 00:59:24 +01:00 committed by GitHub
commit d5b02278c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,6 @@
{ stdenv, fetchFromGitHub, makeWrapper, coreutils, gawk, procps, gnused { stdenv, lib, fetchFromGitHub, makeWrapper, coreutils, gawk, procps, gnused
, bc, findutils, xdpyinfo, xprop, gnugrep, ncurses , bc, findutils, xdpyinfo, xprop, gnugrep, ncurses
, darwin
}: }:
stdenv.mkDerivation { stdenv.mkDerivation {
@ -21,13 +22,22 @@ stdenv.mkDerivation {
# Fix all of the depedencies of screenfetch # Fix all of the depedencies of screenfetch
patchShebangs $out/bin/screenfetch patchShebangs $out/bin/screenfetch
wrapProgram "$out/bin/screenfetch" \ wrapProgram "$out/bin/screenfetch" \
--set PATH ${stdenv.lib.makeBinPath [ --set PATH ${lib.makeBinPath ([
coreutils gawk procps gnused findutils xdpyinfo coreutils gawk gnused findutils
xprop gnugrep ncurses bc 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
]))}
''; '';
meta = { meta = with lib; {
description = "Fetches system/theme information in terminal for Linux desktop screenshots"; description = "Fetches system/theme information in terminal for Linux desktop screenshots";
longDescription = '' longDescription = ''
screenFetch is a "Bash Screenshot Information Tool". This handy Bash screenFetch is a "Bash Screenshot Information Tool". This handy Bash
@ -39,9 +49,9 @@ stdenv.mkDerivation {
screenshot upon displaying info, and even customizing the screenshot screenshot upon displaying info, and even customizing the screenshot
command! This script is very easy to add to and can easily be extended. command! This script is very easy to add to and can easily be extended.
''; '';
license = stdenv.lib.licenses.gpl3; license = licenses.gpl3;
homepage = http://git.silverirc.com/cgit.cgi/screenfetch-dev.git/; homepage = http://git.silverirc.com/cgit.cgi/screenfetch-dev.git/;
maintainers = with stdenv.lib.maintainers; [relrod]; maintainers = with maintainers; [relrod];
platforms = stdenv.lib.platforms.all; platforms = platforms.all;
}; };
} }