nixpkgs/pkgs/tools/misc/neofetch/default.nix

50 lines
1.4 KiB
Nix
Raw Normal View History

{ lib, stdenvNoCC, fetchFromGitHub, bash, makeWrapper, pciutils
, x11Support ? true, ueberzug, fetchpatch
}:
2017-01-22 20:46:31 +00:00
stdenvNoCC.mkDerivation rec {
2019-08-31 06:30:22 +01:00
pname = "neofetch";
2021-04-23 18:36:17 +01:00
version = "unstable-2020-11-26";
2019-08-31 06:30:22 +01:00
2017-01-22 20:46:31 +00:00
src = fetchFromGitHub {
owner = "dylanaraps";
repo = "neofetch";
2021-04-23 18:36:17 +01:00
rev = "6dd85d67fc0d4ede9248f2df31b2cd554cca6c2f";
sha256 = "sha256-PZjFF/K7bvPIjGVoGqaoR8pWE6Di/qJVKFNcIz7G8xE=";
2017-01-22 20:46:31 +00:00
};
patches = [
(fetchpatch {
url = "https://github.com/dylanaraps/neofetch/commit/413c32e55dc16f0360f8e84af2b59fe45505f81b.patch";
sha256 = "1fapdg9z79f0j3vw7fgi72b54aw4brn42bjsj48brbvg3ixsciph";
name = "avoid_overwriting_gio_extra_modules_env_var.patch";
})
];
strictDeps = true;
buildInputs = [ bash ];
2021-04-16 15:06:29 +01:00
nativeBuildInputs = [ makeWrapper ];
postPatch = ''
patchShebangs --host neofetch
'';
2017-01-22 20:46:31 +00:00
2021-04-16 15:06:29 +01:00
postInstall = ''
wrapProgram $out/bin/neofetch \
--prefix PATH : ${lib.makeBinPath ([ pciutils ] ++ lib.optional x11Support ueberzug) }
2021-04-16 15:06:29 +01:00
'';
2017-01-22 20:46:31 +00:00
makeFlags = [
2019-08-31 06:30:22 +01:00
"PREFIX=${placeholder "out"}"
"SYSCONFDIR=${placeholder "out"}/etc"
2017-01-22 20:46:31 +00:00
];
meta = with lib; {
2017-01-22 20:46:31 +00:00
description = "A fast, highly customizable system info script";
2020-03-10 09:09:46 +00:00
homepage = "https://github.com/dylanaraps/neofetch";
2017-01-22 20:46:31 +00:00
license = licenses.mit;
platforms = platforms.all;
2017-07-24 11:25:38 +01:00
maintainers = with maintainers; [ alibabzo konimex ];
2021-05-01 21:06:01 +01:00
mainProgram = "neofetch";
2017-01-22 20:46:31 +00:00
};
}