2021-04-22 03:39:12 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
|
|
|
, rustPlatform
|
2021-05-11 18:40:33 +00:00
|
|
|
, libiconv
|
2021-04-22 03:39:12 +00:00
|
|
|
, Security
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "anevicon";
|
|
|
|
version = "0.1.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rozgo";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1m3ci7g7nn28p6x5m85av3ljgszwlg55f1hmgjnarc6bas5bapl7";
|
|
|
|
};
|
|
|
|
|
|
|
|
cargoSha256 = "1g15v13ysx09fy0b8qddw5fwql2pvwzc2g2h1ndhzpxvfy7fzpr1";
|
|
|
|
|
2021-05-11 18:40:33 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ];
|
2021-04-22 03:39:12 +00:00
|
|
|
|
|
|
|
cargoPatches = [
|
|
|
|
# Add Cargo.lock file, https://github.com/rozgo/anevicon/pull/1
|
|
|
|
(fetchpatch {
|
|
|
|
name = "cargo-lock-file.patch";
|
|
|
|
url = "https://github.com/rozgo/anevicon/commit/205440a0863aaea34394f30f4255fa0bb1704aed.patch";
|
|
|
|
sha256 = "02syzm7irn4slr3s5dwwhvg1qx8fdplwlhza8gfkc6ajl7vdc7ri";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-05-11 18:40:33 +00:00
|
|
|
# Tries to send large UDP packets that Darwin rejects.
|
|
|
|
doCheck = !stdenv.isDarwin;
|
|
|
|
|
2021-04-22 03:39:12 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "UDP-based load generator";
|
|
|
|
homepage = "https://github.com/rozgo/anevicon";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|