| 9 Jan 2025 |
Diamond (it/she) | hmm | 00:52:36 |
Diamond (it/she) | then you want an extra step to symlink the output path to a known constant path maybe | 00:53:37 |
Diamond (it/she) | something like ln -s $(devenv build [package]) /tmp/build-output | 00:53:50 |
Diamond (it/she) | or even cp -r if you hate that for some reason | 00:53:54 |
vendion | In reply to @diamondburned:matrix.org something like ln -s $(devenv build [package]) /tmp/build-output Yeah, I was just thinking that | 00:54:13 |
Diamond (it/she) | then you should be able to give it - /tmp/build-output/bin/$name | 00:54:14 |
vendion | Thanks for clarifying that, I think that approach should work for my use case. | 00:55:25 |
Diamond (it/she) | yeah np! | 00:55:30 |
| 21 Jan 2025 |
| kaya changed their profile picture. | 00:26:13 |
| Joel joined the room. | 12:11:12 |
| 25 Jan 2025 |
| lnlsn changed their profile picture. | 20:16:08 |
| 27 Jan 2025 |
| antifuchs removed their profile picture. | 20:02:30 |
antifuchs | so I have a derivation here where I'd like to disable building with CGO. Previously, I'd do CGO_ENABLED = 0, but now that warns: "specify CGO_ENABLED with env.CGO_ENABLED instead."; so now I'm setting env.CGO_ENABLED = 0; and am getting this error: "error: The env attribute set cannot contain any attributes passed to derivation. The following attributes are overlapping: - CGO_ENABLED: in env: 0; in derivation arguments: 1" | 20:04:30 |
antifuchs | here's the build in CI where that happens https://github.com/boinkor-net/hoopsnake/actions/runs/12997213156/job/36247707654?pr=80#step:5:323 and here's the PR: https://github.com/boinkor-net/hoopsnake/pull/80/files | 20:04:52 |
antifuchs | I'm not sure what to take away from that message, or how to fix this. I did try a lib.mkForce, which alters the error message to indicate that the value has a greater priority, but that's it | 20:05:28 |
antifuchs | oh grump, I had to update nixpkgs in the flake's dev lockfile. | 20:11:41 |
antifuchs | wonder how that migration should go for external code, then: Do we just tolerate the warning until the derivation no longer sets that? Or do we flip over to get rid of the warning on unstable and break everyone using stable releases? | 20:12:34 |
antifuchs | * wonder how that migration should go for external code, then: Do we just tolerate the warning until the latest release's buildGoModule builder no longer sets that? Or do we flip over to get rid of the warning on unstable and break everyone using stable releases? | 20:15:26 |
| 30 Jan 2025 |
| ofalvai joined the room. | 19:45:23 |
| 31 Jan 2025 |
| raboof changed their display name from raboof to raboof@FOSDEM. | 23:54:12 |
| 2 Feb 2025 |
K900 | I've got a Go thing here that's failing to link with | 10:25:19 |
K900 | /nix/store/a1cr17kwgakznfw4pp8paw8yv189ikk5-binutils-2.43.1/bin/ld: cannot find -lresolv: No such file or directory
/nix/store/a1cr17kwgakznfw4pp8paw8yv189ikk5-binutils-2.43.1/bin/ld: cannot find -lpthread: No such file or directory
/nix/store/a1cr17kwgakznfw4pp8paw8yv189ikk5-binutils-2.43.1/bin/ld: cannot find -ldl: No such file or directory
/nix/store/a1cr17kwgakznfw4pp8paw8yv189ikk5-binutils-2.43.1/bin/ld: cannot find -lc: No such file or directory
| 10:25:21 |
K900 | Tried giving it glibc and it still doesn't work | 10:25:31 |
Paul Meyer (katexochen) | @k900:0upti.me: no instant idea, can you share code for this? | 10:43:34 |
K900 | Uhh give me like 15 minutes | 10:44:41 |
K900 | Need to finish some chores before I get to a computer | 10:44:51 |
K900 | {
lib,
buildGoModule,
fetchFromGitHub,
libpcap,
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;
buildInputs = [
libpcap
];
NIX_LDFLAGS = [
"-L${glibc}/lib"
];
ldflags = [
"-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";
};
}
| 10:55:21 |
K900 | The NIX_LDFLAGS was my attempt at getting it to work | 10:55:40 |
K900 | And it did not work anyway | 10:55:44 |
Paul Meyer (katexochen) | {
buildGoModule,
fetchFromGitHub,
stdenv,
bpftools,
lib,
nspr,
libpcap,
clang,
fd,
go-bindata,
glibc,
gnutls,
bashInteractive,
postgresql,
mariadb,
openssl,
bash,
zsh,
nix-update-script,
}:
buildGoModule rec {
pname = "ecapture";
version = "0.9.3";
src = fetchFromGitHub {
owner = "gojue";
repo = "ecapture";
tag = "v${version}";
hash = "sha256-nqNFbZrmCleWcRM2HsbgmCHqsar3KmiGYxt55ZqhY+U=";
fetchSubmodules = true;
};
nativeBuildInputs = [
clang
fd
bpftools
go-bindata
];
newlibpcap = libpcap.overrideAttrs (previousAttrs: {
configureFlags = previousAttrs.configureFlags ++ [ "--without-libnl" ];
});
buildInputs = [
newlibpcap
glibc.static
glibc
];
CGO_LDFLAGS = "-lpcap -lpthread -static";
ldflags = [
"-extldflags '-static'"
"-linkmode=external"
];
hardeningDisable = [
"zerocallusedregs"
];
postPatch = ''
substituteInPlace user/config/config_gnutls_linux.go \
--replace-fail 'return errors.New("cant found Gnutls so load path")' 'gc.Gnutls = "${lib.getLib gnutls}/lib/libgnutls.so.30"' \
--replace-fail '"errors"' ' '
substituteInPlace user/module/probe_bash.go \
--replace-fail '/bin/bash' '${lib.getExe bashInteractive}'
substituteInPlace user/config/config_bash.go \
--replace-fail '/bin/bash' '${lib.getExe bashInteractive}'
substituteInPlace user/config/config_nspr_linux.go \
--replace-fail '/usr/lib/firefox/libnspr4.so' '${lib.getLib nspr}/lib/libnspr4.so'
substituteInPlace user/config/config_zsh.go \
--replace-fail '/bin/zsh' '${lib.getExe zsh}'
substituteInPlace user/module/probe_zsh.go \
--replace-fail '/bin/zsh' '${lib.getExe zsh}'
substituteInPlace cli/cmd/postgres.go \
--replace-fail '/usr/bin/postgres' '${postgresql}/bin/postgres'
substituteInPlace cli/cmd/mysqld.go \
--replace-fail '/usr/sbin/mariadbd' '${mariadb}/bin/mariadbd'
substituteInPlace user/module/probe_mysqld.go \
--replace-fail '/usr/sbin/mariadbd' '${mariadb}/bin/mariadbd'
substituteInPlace user/config/config_openssl_linux.go \
--replace-fail 'return errors.New("cant found openssl so load path")' 'oc.Openssl = "${lib.getLib openssl}/lib/libssl.so.3"' \
--replace-fail '"errors"' ' '
'';
postConfigure = ''
sed -i '/git/d' Makefile
sed -i '/git/d' variables.mk
substituteInPlace Makefile \
--replace-fail '/bin/bash' '${lib.getExe bash}'
make ebpf
go-bindata -pkg assets -o "assets/ebpf_probe.go" $(find user/bytecode -name "*.o" -printf "./%p ")
'';
checkFlags =
let
skippedTests = [
"TestCheckLatest"
];
in
[ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ];
vendorHash = "sha256-8ilfqPt5Phuj5Uaf90+Ir/DFN27oW5Fd+Wsp34/EU9M=";
passthru.updateScript = nix-update-script { };
meta = {
description = "Capture SSL/TLS text content without CA certificate Using eBPF";
changelog = "https://github.com/gojue/ecapture/releases/tag/v${version}";
homepage = "https://ecapture.cc";
platforms = [
"x86_64-linux"
"aarch64-linux"
];
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ bot-wxt1221 ];
mainProgram = "ecapture";
};
}
| 11:26:26 |