Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 78 lines 2.2 kB view raw
1{ 2 lib, 3 stdenvNoCC, 4 fetchFromGitHub, 5 bash, 6 makeWrapper, 7 pciutils, 8 x11Support ? !stdenvNoCC.hostPlatform.isOpenBSD, 9 ueberzug, 10 fetchpatch, 11}: 12 13stdenvNoCC.mkDerivation { 14 pname = "neofetch"; 15 version = "unstable-2021-12-10"; 16 17 src = fetchFromGitHub { 18 owner = "dylanaraps"; 19 repo = "neofetch"; 20 rev = "ccd5d9f52609bbdcd5d8fa78c4fdb0f12954125f"; 21 sha256 = "sha256-9MoX6ykqvd2iB0VrZCfhSyhtztMpBTukeKejfAWYW1w="; 22 }; 23 24 patches = [ 25 (fetchpatch { 26 url = "https://github.com/dylanaraps/neofetch/commit/413c32e55dc16f0360f8e84af2b59fe45505f81b.patch"; 27 sha256 = "1fapdg9z79f0j3vw7fgi72b54aw4brn42bjsj48brbvg3ixsciph"; 28 name = "avoid_overwriting_gio_extra_modules_env_var.patch"; 29 }) 30 # https://github.com/dylanaraps/neofetch/pull/2114 31 (fetchpatch { 32 url = "https://github.com/dylanaraps/neofetch/commit/c4eb4ec7783bb94cca0dbdc96db45a4d965956d2.patch"; 33 sha256 = "sha256-F6Q4dUtfmR28VxLbITiLFJ44FjG4T1Cvuz3a0nLisMs="; 34 name = "update_old_nixos_logo.patch"; 35 }) 36 # https://github.com/dylanaraps/neofetch/pull/2157 37 (fetchpatch { 38 url = "https://github.com/dylanaraps/neofetch/commit/de253afcf41bab441dc58d34cae654040cab7451.patch"; 39 sha256 = "sha256-3i7WnCWNfsRjbenTULmKHft5o/o176imzforNmuoJwo="; 40 name = "improve_detect_nixos_version.patch"; 41 }) 42 ]; 43 44 outputs = [ 45 "out" 46 "man" 47 ]; 48 49 strictDeps = true; 50 buildInputs = [ bash ]; 51 nativeBuildInputs = [ makeWrapper ]; 52 postPatch = '' 53 patchShebangs --host neofetch 54 ''; 55 56 postInstall = '' 57 wrapProgram $out/bin/neofetch \ 58 --prefix PATH : ${ 59 lib.makeBinPath ( 60 lib.optional (!stdenvNoCC.hostPlatform.isOpenBSD) pciutils ++ lib.optional x11Support ueberzug 61 ) 62 } 63 ''; 64 65 makeFlags = [ 66 "PREFIX=${placeholder "out"}" 67 "SYSCONFDIR=${placeholder "out"}/etc" 68 ]; 69 70 meta = with lib; { 71 description = "Fast, highly customizable system info script"; 72 homepage = "https://github.com/dylanaraps/neofetch"; 73 license = licenses.mit; 74 platforms = platforms.all; 75 maintainers = with maintainers; [ konimex ]; 76 mainProgram = "neofetch"; 77 }; 78}