Merge pull request #164132 from papojari/ipfetch

ipfetch: init at unstable-2022-03-24
This commit is contained in:
Lassulus 2022-04-03 16:57:15 +01:00 committed by GitHub
commit ea97f88d44
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 40 additions and 0 deletions

View file

@ -0,0 +1,38 @@
{ stdenv, lib, fetchFromGitHub, bash, wget, makeWrapper }:
stdenv.mkDerivation rec {
pname = "ipfetch";
version = "unstable-2022-03-24";
src = fetchFromGitHub {
owner = "trakBan";
repo = "ipfetch";
rev = "fc295bfda4f9fea6eee9f6f3f2dabc26b6f25be4";
sha256 = "sha256-YKQ9pRBj2hgPg2ShCqWGxzHs/n7kNhKRNyElRDwHDBU=";
};
strictDeps = true;
buildInputs = [ bash wget ];
nativeBuildInputs = [ makeWrapper ];
patchPhase = ''
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 /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 adresses";
license = licenses.gpl3Only;
platforms = platforms.all;
maintainers = with maintainers; [ papojari ];
};
}

View file

@ -6867,6 +6867,8 @@ with pkgs;
iperf3 = callPackage ../tools/networking/iperf/3.nix { };
iperf = iperf3;
ipfetch = callPackage ../tools/networking/ipfetch { };
ipfs = callPackage ../applications/networking/ipfs {
buildGoModule = buildGo116Module;
};