1 { stdenv, lib, fetchFromGitHub, bash, wget, makeWrapper }:
3 stdenv.mkDerivation rec {
5 version = "unstable-2024-02-02";
7 src = fetchFromGitHub {
10 rev = "09b61e0d1d316dbcfab798dd00bc3f9ceb02431d";
11 sha256 = "sha256-RlbNIDRuf4sFS2zw4fIkTu0mB7xgJfPMDIk1I3UYXLk=";
15 buildInputs = [ bash wget ];
16 nativeBuildInputs = [ makeWrapper ];
18 patchShebangs --host ipfetch
19 # Not only does `/usr` have to be replaced but also `/flags` needs to be added because with Nix the script is broken without this. The `/flags` is somehow not needed if you install via the install script in the source repository.
20 substituteInPlace ./ipfetch --replace /usr/share/ipfetch $out/usr/share/ipfetch/flags
24 mkdir -p $out/usr/share/ipfetch/
25 cp -r flags $out/usr/share/ipfetch/
26 cp ipfetch $out/bin/ipfetch
27 wrapProgram $out/bin/ipfetch --prefix PATH : ${
28 lib.makeBinPath [ bash wget ]
33 description = "Neofetch but for ip addresses";
34 mainProgram = "ipfetch";
35 homepage = "https://github.com/trakBan/ipfetch";
36 license = licenses.gpl3Only;
37 platforms = platforms.all;
38 maintainers = with maintainers; [ annaaurora ];