| 7 Apr 2024 |
| SYMYƧ changed their display name from sγmγƨ to SYMYƧ. | 08:08:40 |
| 11 Apr 2024 |
| Xe Iaso joined the room. | 21:26:50 |
| 17 Apr 2024 |
| K900 changed their display name from K900 ⚡️ to K9Ö0. | 17:16:42 |
| K900 changed their display name from K9Ö0 to K900. | 17:21:54 |
| K900 | 17:21:54 |
| 18 Apr 2024 |
| SYMYƧ left the room. | 02:37:22 |
| 21 Apr 2024 |
| bogusthing30 joined the room. | 04:00:46 |
| 22 Apr 2024 |
| Frédéric Christ 🌴 17.05. changed their display name from Frédéric Christ to Frédéric Christ 🌴 29.04.-13.05.. | 10:03:42 |
| 23 Apr 2024 |
| dnr joined the room. | 02:32:53 |
dnr | I want to build a package with the binary of one of my tests (using the go testing framework). I'm using buildGoModule for everything else so I'd like to use that too. I thought this would be easy but the best I could figure out was to use buildGoModule and then just override buildPhase = "go test -c -o mytest ./mytest"; (and then installPhase to copy it into $out). That works but I'm missing things like tags and other build flags. I can add those back but it's starting to feel a little wrong.. is there a better way to do this? | 03:00:10 |
@qbit:tapenet.org | building a binary via tests?! | 13:24:29 |
@qbit:tapenet.org | that's weird | 13:24:30 |
jrick | you build a binary every time you run tests! | 13:35:10 |
@qbit:tapenet.org | but saving it for usage elsewhere.. | 13:37:55 |
Paul Meyer (katexochen) | It is not weird, commonly done to run integration tests etc. Especially when building with nix, it allows running integration tests outside the sandbox. | 16:51:01 |
Paul Meyer (katexochen) | At work we have a modified version of buildGoModule. Sadly overriding phases isn't possibly/easy, IIRC we copy most of the builder to make the modification. | 16:52:44 |
Paul Meyer (katexochen) | * At work we have a modified version of buildGoModule for this. Sadly overriding phases isn't possibly/easy, IIRC we copy most of the builder to make the modification. | 16:53:06 |
@qbit:tapenet.org | first time I have encountered it | 17:04:39 |
dnr | The specific reason in this case I need to run the test binary as root and I don't want to run the whole toolchain as root. Also I want to copy it to another system | 22:59:25 |
| 24 Apr 2024 |
Paul Meyer (katexochen) | In reply to @dnrix:matrix.org I want to build a package with the binary of one of my tests (using the go testing framework). I'm using buildGoModule for everything else so I'd like to use that too. I thought this would be easy but the best I could figure out was to use buildGoModule and then just override buildPhase = "go test -c -o mytest ./mytest"; (and then installPhase to copy it into $out). That works but I'm missing things like tags and other build flags. I can add those back but it's starting to feel a little wrong.. is there a better way to do this? looked it up, we copy buildPhase and make the following two changes:
@@ -26,7 +26,7 @@
fi
local OUT
- if ! OUT="$(go $cmd "''${flags[@]}" $dir 2>&1)"; then
+ if ! OUT="$(go $cmd -c -o $GOPATH/bin/ "''${flags[@]}" $dir 2>&1)"; then
if ! echo "$OUT" | grep -qE '(no( buildable| non-test)?|build constraints exclude all) Go (source )?files'; then
echo "$OUT" >&2
return 1
@@ -62,5 +62,5 @@
fi
for pkg in $(getGoDirs ""); do
echo "Building subPackage $pkg"
- buildGoDir install "$pkg"
+ buildGoDir test "$pkg"
done
| 05:50:29 |
| easel joined the room. | 22:01:41 |
| 26 Apr 2024 |
| Diamond (it/she) changed their profile picture. | 04:18:43 |
| Federico Damián Schonborn changed their profile picture. | 14:48:30 |
| svrana joined the room. | 16:00:58 |
| 27 Apr 2024 |
| Xe Iaso left the room. | 16:03:56 |
| 28 Apr 2024 |
| Federico Damián Schonborn changed their profile picture. | 22:47:17 |
| Federico Damián Schonborn left the room. | 23:13:59 |
| 29 Apr 2024 |
| leonardo joined the room. | 01:46:50 |
anthr76 | Hey y'all I'm trying to use the externalPlugins with coredns. I can' | 02:38:45 |
anthr76 | * Hey y'all I'm trying to use the externalPlugins with coredns. I can't seem to add coredns-tailscale or coredns-blocklist | 02:39:02 |