2021-06-28 23:13:55 +00:00
|
|
|
{ lib, stdenvNoCC, fetchFromGitHub, bash, makeWrapper, pciutils
|
2021-10-01 09:20:50 +00:00
|
|
|
, x11Support ? true, ueberzug, fetchpatch
|
2021-06-28 23:13:55 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-17 17:02:09 +00:00
|
|
|
stdenvNoCC.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "neofetch";
|
2022-06-16 17:23:12 +00:00
|
|
|
version = "unstable-2021-12-10";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dylanaraps";
|
|
|
|
repo = "neofetch";
|
2022-05-18 14:49:53 +00:00
|
|
|
rev = "ccd5d9f52609bbdcd5d8fa78c4fdb0f12954125f";
|
|
|
|
sha256 = "sha256-9MoX6ykqvd2iB0VrZCfhSyhtztMpBTukeKejfAWYW1w=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-10-01 09:20:50 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/dylanaraps/neofetch/commit/413c32e55dc16f0360f8e84af2b59fe45505f81b.patch";
|
|
|
|
sha256 = "1fapdg9z79f0j3vw7fgi72b54aw4brn42bjsj48brbvg3ixsciph";
|
|
|
|
name = "avoid_overwriting_gio_extra_modules_env_var.patch";
|
|
|
|
})
|
2022-06-16 17:23:12 +00:00
|
|
|
# https://github.com/dylanaraps/neofetch/pull/2114
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/dylanaraps/neofetch/commit/c4eb4ec7783bb94cca0dbdc96db45a4d965956d2.patch";
|
|
|
|
sha256 = "sha256-F6Q4dUtfmR28VxLbITiLFJ44FjG4T1Cvuz3a0nLisMs=";
|
|
|
|
name = "update_old_nixos_logo.patch";
|
|
|
|
})
|
2021-10-01 09:20:50 +00:00
|
|
|
];
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
outputs = [ "out" "man" ];
|
|
|
|
|
2021-02-17 17:02:09 +00:00
|
|
|
strictDeps = true;
|
|
|
|
buildInputs = [ bash ];
|
2021-04-17 00:35:05 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2021-02-17 17:02:09 +00:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs --host neofetch
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-17 00:35:05 +00:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/neofetch \
|
2021-06-28 23:13:55 +00:00
|
|
|
--prefix PATH : ${lib.makeBinPath ([ pciutils ] ++ lib.optional x11Support ueberzug) }
|
2021-04-17 00:35:05 +00:00
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
makeFlags = [
|
|
|
|
"PREFIX=${placeholder "out"}"
|
|
|
|
"SYSCONFDIR=${placeholder "out"}/etc"
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A fast, highly customizable system info script";
|
|
|
|
homepage = "https://github.com/dylanaraps/neofetch";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ alibabzo konimex ];
|
2021-05-03 20:48:10 +00:00
|
|
|
mainProgram = "neofetch";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|