nixpkgs/pkgs/by-name/go/goreplay/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

38 lines
1013 B
Nix

{ lib, buildGoModule, fetchFromGitHub, fetchpatch, libpcap }:
buildGoModule rec {
pname = "goreplay";
version = "1.3.3";
src = fetchFromGitHub {
owner = "buger";
repo = "goreplay";
rev = version;
sha256 = "sha256-FiY9e5FgpPu+K8eoO8TsU3xSaSoPPDxYEu0oi/S8Q1w=";
};
patches = [
# Fix build on arm64-linux, see https://github.com/buger/goreplay/pull/1140
(fetchpatch {
url = "https://github.com/buger/goreplay/commit/a01afa1e322ef06f36995abc3fda3297bdaf0140.patch";
sha256 = "sha256-w3aVe/Fucwd2OuK5Fu2jJTbmMci8ilWaIjYjsWuLRlo=";
})
];
vendorHash = "sha256-jDMAtcq3ZowFdky5BdTkVNxq4ltkhklr76nXYJgGALg=";
ldflags = [ "-s" "-w" ];
buildInputs = [ libpcap ];
doCheck = false;
meta = {
homepage = "https://github.com/buger/goreplay";
license = lib.licenses.lgpl3Only;
description = "Open-source tool for capturing and replaying live HTTP traffic";
maintainers = with lib.maintainers; [ lovek323 ];
mainProgram = "goreplay";
};
}