Files
nixpkgs/pkgs/by-name/ip/ipfetch/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

54 lines
1.4 KiB
Nix

{
stdenv,
lib,
fetchFromGitHub,
bash,
wget,
makeWrapper,
}:
stdenv.mkDerivation {
pname = "ipfetch";
version = "0-unstable-2024-02-02";
src = fetchFromGitHub {
owner = "trakBan";
repo = "ipfetch";
rev = "09b61e0d1d316dbcfab798dd00bc3f9ceb02431d";
sha256 = "sha256-RlbNIDRuf4sFS2zw4fIkTu0mB7xgJfPMDIk1I3UYXLk=";
};
strictDeps = true;
buildInputs = [
bash
wget
];
nativeBuildInputs = [ makeWrapper ];
postPatch = ''
patchShebangs --host ipfetch
# 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.
substituteInPlace ./ipfetch --replace-fail /usr/share/ipfetch $out/usr/share/ipfetch/flags
'';
installPhase = ''
mkdir -p $out/bin
mkdir -p $out/usr/share/ipfetch/
cp -r flags $out/usr/share/ipfetch/
cp ipfetch $out/bin/ipfetch
wrapProgram $out/bin/ipfetch --prefix PATH : ${
lib.makeBinPath [
bash
wget
]
}
'';
meta = with lib; {
description = "Neofetch but for ip addresses";
mainProgram = "ipfetch";
homepage = "https://github.com/trakBan/ipfetch";
license = licenses.gpl3Only;
platforms = platforms.all;
maintainers = with maintainers; [ annaaurora ];
};
}