!QCCCSJHEsTIfozrZxz:nixos.org

Nix + Go

217 Members
Go packaging for and with Nixpkgs. | Be excellent to each other.46 Servers

Load older messages


SenderMessageTime
2 Feb 2025
@katexochen:matrix.orgPaul Meyer (katexochen) *
{
  lib,
  buildGoModule,
  fetchFromGitHub,
  libpcap,
  pkg-config,
  glibc,
}:

buildGoModule rec {
  pname = "ptcpdump";
  version = "0.32.0";

  src = fetchFromGitHub {
    owner = "mozillazg";
    repo = "ptcpdump";
    rev = "v${version}";
    hash = "sha256-ndDSOWaBmKvn7Eo8h72Zg9qGbcz2/IBcSJSw/mk7fUs=";
  };

  vendorHash = null;

  subPackages = [ "." ];

  # nativeBuildInputs = [ pkg-config ];
  buildInputs = [
    libpcap
    glibc.static
    glibc
  ];

  tags = [ "static" ];

  ldflags = [
    "-linkmode external"
    "-extldflags -static"
    "-X=github.com/mozillazg/ptcpdump/internal.Version=${version}"
    "-X=github.com/mozillazg/ptcpdump/internal.GitCommit=${src.rev}"
  ];

  # env.CGO_FLAGS_STATIC = "-I${libpcap}/include";
  # env.CGO_LDFLAGS_STATIC = "-L${libpcap}/lib -lpcap ${libpcap}/lib/libpcap.a";

  meta = {
    description = "Process-aware, eBPF-based tcpdump";
    homepage = "https://github.com/mozillazg/ptcpdump";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ k900 ];
    mainProgram = "ptcpdump";
  };
}

11:26:50
@katexochen:matrix.orgPaul Meyer (katexochen)This should get you at least one step further. I found package ecapture to have similar hacks in place, maybe there are more helpful thinks in there. 11:28:06
@katexochen:matrix.orgPaul Meyer (katexochen)* This should get you at least one step further. I found package ecapture to have similar hacks in place, maybe there are more helpful things in there. 11:30:28
@katexochen:matrix.orgPaul Meyer (katexochen)
{
  lib,
  buildGoModule,
  fetchFromGitHub,
  libpcap,
  glibc,
}:

let
  newlibpcap = libpcap.overrideAttrs (previousAttrs: {
    configureFlags = previousAttrs.configureFlags ++ [ "--without-libnl" ];
  });
in

buildGoModule rec {
  pname = "ptcpdump";
  version = "0.32.0";

  src = fetchFromGitHub {
    owner = "mozillazg";
    repo = "ptcpdump";
    rev = "v${version}";
    hash = "sha256-ndDSOWaBmKvn7Eo8h72Zg9qGbcz2/IBcSJSw/mk7fUs=";
  };

  vendorHash = null;

  subPackages = [ "." ];

  buildInputs = [
    newlibpcap
    glibc.static
    glibc
  ];

  tags = [ "static" ];

  ldflags = [
    "-linkmode external"
    "-extldflags -static"
    "-X=github.com/mozillazg/ptcpdump/internal.Version=${version}"
    "-X=github.com/mozillazg/ptcpdump/internal.GitCommit=${src.rev}"
  ];

  meta = {
    description = "Process-aware, eBPF-based tcpdump";
    homepage = "https://github.com/mozillazg/ptcpdump";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ k900 ];
    mainProgram = "ptcpdump";
  };
}
11:46:08
@katexochen:matrix.orgPaul Meyer (katexochen)Works.11:47:44
@k900:0upti.meK900Oof 11:48:03
@k900:0upti.meK900OK I think I'm not going to bother lol 11:48:11
@k900:0upti.meK900This looks giga cursed 11:50:45
@katexochen:matrix.orgPaul Meyer (katexochen)The libpcap override? Or the static linking part?11:51:33
@k900:0upti.meK900Both?11:58:09
@raboof:matrix.org@raboof:matrix.org changed their display name from raboof@FOSDEM to raboof.22:18:17
3 Feb 2025
@anarcompiler:beeper.com@anarcompiler:beeper.com joined the room.07:00:59
5 Feb 2025
@13k:matrix.org@13k:matrix.org left the room.07:34:33
7 Feb 2025
@vxtls:synapse.skymansion.netvxtls joined the room.18:33:56
@jsnf:matrix.orgjsnf joined the room.21:30:00
@diamondburned:matrix.orgdiamond (it/its) changed their profile picture.23:11:04
@diamondburned:matrix.orgdiamond (it/its) changed their profile picture.23:19:12
11 Feb 2025
@lunchtime:envs.net@lunchtime:envs.net left the room.19:06:53
13 Feb 2025
@glepage:matrix.orgGaétan LepageIs there a simple way to skip specific go tests?13:30:28
@katexochen:matrix.orgPaul Meyer (katexochen)https://nixos.org/manual/nixpkgs/unstable/#ssec-skip-go-tests13:31:19
@glepage:matrix.orgGaétan LepageThanks!13:31:43
15 Feb 2025
@benjb83:matrix.orgBenjB83 joined the room.10:16:33
@benjb83:matrix.orgBenjB83 changed their display name from Benjamín Buske to BenjB83.10:43:07
17 Feb 2025
@marcusramberg:matrix.orgMarcus changed their profile picture.21:38:21
19 Feb 2025
@vpio:deepin.orgvpio joined the room.00:19:28
21 Feb 2025
@anarcompiler:beeper.com@anarcompiler:beeper.com left the room.16:10:01
@2kool4idkwhat:matrix.orgLuna joined the room.19:16:24
22 Feb 2025
@ondrej:vlach.xyznarg joined the room.12:22:47
@katexochen:matrix.orgPaul Meyer (katexochen)https://github.com/NixOS/nixpkgs/pull/38422913:07:09
24 Feb 2025
@liberodark:matrix.orgliberodark joined the room.10:59:36

Show newer messages


Back to Room ListRoom Version: 9