| 11 Jan 2024 |
symys | signaslbot/errUtils is a custom package in the same repo | 05:43:08 |
symys | * signaslbot/errUtils is a custom package in the same repo. How can I make it available to the nix store before it gets to this build step? | 05:45:16 |
@qbit:tapenet.org | if you want it to be a shell you need to use mkShell, no? | 13:31:30 |
@qbit:tapenet.org | https://github.com/mplsbugbounty/signASLBot/blob/main/go.mod#L1 ah, i see you have a second go.mod in the errUtils dir | 13:32:54 |
@qbit:tapenet.org | that can't be ref'd as "signaslbot/errUtils" | 13:33:17 |
@qbit:tapenet.org | in go | 13:33:19 |
@qbit:tapenet.org | because your "sub" module is literally called "errUtils" | 13:33:43 |
@qbit:tapenet.org | remote the errUtils/go.* files and things might work | 13:34:18 |
@qbit:tapenet.org | https://go.dev/ref/mod#modules-overview | 13:35:14 |
@qbit:tapenet.org | your errUtils is a package in the signaslbot module | 13:35:50 |
@qbit:tapenet.org |
Each package within a module is a collection of source files in the same directory that are compiled together. A package path is the module path joined with the subdirectory containing the package (relative to the module root). For example, the module "golang.org/x/net" contains a package in the directory "html". That package’s path is "golang.org/x/net/html".
| 13:35:51 |
@qbit:tapenet.org | doing sub-modules is .. tricky and probably not what you want for a project of this size | 13:43:21 |
symys | In reply to @qbit:tapenet.org doing sub-modules is .. tricky and probably not what you want for a project of this size Yeah I really just did that because I wanted to get more experience structuring projects this way | 16:03:46 |
@qbit:tapenet.org | i think to do sub-modules you need to use the "full" path of the module | 16:05:34 |
@qbit:tapenet.org | so github.com/mplsbugbounty/signaslbot | 16:06:25 |
@qbit:tapenet.org | instead of signaslbot | 16:06:36 |
symys | I've been thinking a lot lately that a good way to structure programs is to write a library and then implement the app using that library. And errUtils contains some code that I've just been copying around between my go programs so it seemed a good first candidate. | 16:07:23 |
symys | In reply to @qbit:tapenet.org so github.com/mplsbugbounty/signaslbot Okay thanks, I'll give that a shot! | 16:07:45 |
symys | In reply to @qbit:tapenet.org remote the errUtils/go.* files and things might work I'm having some issues still after trying renaming the submodule paths in a few different ways. When you say remote the errUtils.go.* files, you mean like just make a new repo for them? I guess that would make more sense anyway. | 19:30:23 |
@qbit:tapenet.org | no, I was suggesting making them just a package, not a full blown submodule | 19:31:03 |
@qbit:tapenet.org | so you'd remove the go.* files and then ref github.com/mplsbugbounty/signaslbot/errUtils | 19:31:41 |
@qbit:tapenet.org | where errUtils is the package name in the errUtils dir | 19:31:53 |
| 13 Jan 2024 |
symys | I decided to just refactor it to avoid the custom import which wasn't really necessary. Now I'm having another problem with the build: | 00:47:48 |
symys | * I decided to just refactor it to avoid the custom import which wasn't really necessary. Now I'm having another problem with the build:
error: builder for '/nix/store/zf22x2ygw6ldag7b7dxi8r4gd7vgbd3q-signASLbot-.drv' failed with exit code 1;
last 10 log lines:
> Running phase: patchPhase
> Running phase: updateAutotoolsGnuConfigScriptsPhase
> Running phase: configurePhase
> Running phase: buildPhase
> Building subPackage .
> # maunium.net/go/mautrix/crypto/olm
> vendor/maunium.net/go/mautrix/crypto/olm/account.go:4:11: fatal error: olm/olm.h: No such file or directory
> 4 | // #include <olm/olm.h>
> | ^~~~~~~~~~~
| 00:48:04 |
symys | I tried to make libolm available to my environment by installing it in my configuration, e.g.:
environment.systemPackages = [
pkgs.olm
];
Might not be the right package, or might not be what I need to do to make olm.h available . Does anybody know what to do here?
| 00:49:55 |
@qbit:tapenet.org | you might need pkg-config | 00:58:06 |
@qbit:tapenet.org | but also you probably want olm in your derivation that builds signaslbot | 00:58:21 |
@qbit:tapenet.org | here's an example that uses some x11 stuff: https://github.com/qbit/traygent/blob/main/flake.nix#L28 | 01:02:02 |
@qbit:tapenet.org | all your deps go in buildInputs | 01:02:14 |
symys | thanks again for all the help | 01:25:30 |