Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
result*
2 changes: 2 additions & 0 deletions doc/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sshping.8
sshping.8.gz
27 changes: 27 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 46 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
description = "Measure character-echo latency and bandwidth for an interactive ssh session";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs =
{ self, nixpkgs }:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
in
{
formatter.${system} = pkgs.nixfmt-tree;

packages.${system} = {
default = pkgs.stdenv.mkDerivation {
pname = "sshping";
version = "master";

outputs = [ "out" "man" ];

src = self;

buildInputs = with pkgs; [ libssh perl ];

buildPhase = ''
make bin/sshping
make doc/sshping.8.gz
'';

installPhase = ''
install -Dm755 bin/sshping $out/bin/sshping
install -Dm644 doc/sshping.8.gz $man/share/man/man8/sshping.8.gz
'';

meta = {
homepage = "https://github.com/spook/sshping";
description = "Measure character-echo latency and bandwidth for an interactive ssh session";
license = pkgs.lib.licenses.mit;
platforms = pkgs.lib.platforms.unix;
maintainers = with pkgs.lib.maintainers; [ spook ];
outputsToInstall = [ "out" "man" ];
mainProgram = "sshping";
};
};
};
};
}