python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / tools / misc / neofetch / default.nix
blob806655ffe9f705fd5d495ad25c968e59db9c7e77
1 { lib, stdenvNoCC, fetchFromGitHub, bash, makeWrapper, pciutils
2 , x11Support ? true, ueberzug, fetchpatch
3 }:
5 stdenvNoCC.mkDerivation rec {
6   pname = "neofetch";
7   version = "unstable-2021-12-10";
9   src = fetchFromGitHub {
10     owner = "dylanaraps";
11     repo = "neofetch";
12     rev = "ccd5d9f52609bbdcd5d8fa78c4fdb0f12954125f";
13     sha256 = "sha256-9MoX6ykqvd2iB0VrZCfhSyhtztMpBTukeKejfAWYW1w=";
14   };
16   patches = [
17     (fetchpatch {
18       url = "https://github.com/dylanaraps/neofetch/commit/413c32e55dc16f0360f8e84af2b59fe45505f81b.patch";
19       sha256 = "1fapdg9z79f0j3vw7fgi72b54aw4brn42bjsj48brbvg3ixsciph";
20       name = "avoid_overwriting_gio_extra_modules_env_var.patch";
21     })
22     # https://github.com/dylanaraps/neofetch/pull/2114
23     (fetchpatch {
24       url = "https://github.com/dylanaraps/neofetch/commit/c4eb4ec7783bb94cca0dbdc96db45a4d965956d2.patch";
25       sha256 = "sha256-F6Q4dUtfmR28VxLbITiLFJ44FjG4T1Cvuz3a0nLisMs=";
26       name = "update_old_nixos_logo.patch";
27     })
28     # https://github.com/dylanaraps/neofetch/pull/2157
29     (fetchpatch {
30       url = "https://github.com/dylanaraps/neofetch/commit/de253afcf41bab441dc58d34cae654040cab7451.patch";
31       sha256 = "sha256-3i7WnCWNfsRjbenTULmKHft5o/o176imzforNmuoJwo=";
32       name = "improve_detect_nixos_version.patch";
33     })
34   ];
36   outputs = [ "out" "man" ];
38   strictDeps = true;
39   buildInputs = [ bash ];
40   nativeBuildInputs = [ makeWrapper ];
41   postPatch = ''
42     patchShebangs --host neofetch
43   '';
45   postInstall = ''
46     wrapProgram $out/bin/neofetch \
47       --prefix PATH : ${lib.makeBinPath ([ pciutils ] ++ lib.optional x11Support ueberzug) }
48   '';
50   makeFlags = [
51     "PREFIX=${placeholder "out"}"
52     "SYSCONFDIR=${placeholder "out"}/etc"
53   ];
55   meta = with lib; {
56     description = "A fast, highly customizable system info script";
57     homepage = "https://github.com/dylanaraps/neofetch";
58     license = licenses.mit;
59     platforms = platforms.all;
60     maintainers = with maintainers; [ alibabzo konimex ];
61     mainProgram = "neofetch";
62   };