| 4 Mar 2024 |
adamcstephens 🐝 | * So it looks like just running nix-update and skipping the version then? | 14:53:40 |
Diamond (it/she) | personally if I'm having a workflow for my own repo, I tend to use gomod2nix and have it maintain that instead of the vendorHash | 14:54:45 |
Diamond (it/she) | something like this: https://github.com/diamondburned/dissent/blob/main/.github/workflows/publish.yml#L30-L65 | 14:55:17 |
| 5 Mar 2024 |
| 渔棠 joined the room. | 03:21:28 |
Sandro 🐧 | In reply to @diamondburned:matrix.org personally if I'm having a workflow for my own repo, I tend to use gomod2nix and have it maintain that instead of the vendorHash That brings a whole bunch of new problems with it, especially since go is such picky about it's deps | 10:31:06 |
Diamond (it/she) | what are the problems? | 10:57:58 |
Sandro 🐧 | The previous version of such a tool, vgo2nix, just didn't worked with some combination of dependencies | 13:50:21 |
Sandro 🐧 | also it makes remote building a pain | 13:50:28 |
Sandro 🐧 | * also it makes remote building a take a longer time | 13:50:35 |
Diamond (it/she) | In reply to @sandro:supersandro.de The previous version of such a tool, vgo2nix, just didn't worked with some combination of dependencies hm, never had such a program with gomod2nix | 14:06:37 |
Diamond (it/she) | not too sure about remote building either | 14:06:46 |
Diamond (it/she) | * hm, never had such a problem with gomod2nix | 14:07:02 |
Diamond (it/she) | given how it works, that would make sense | 14:07:12 |
adamcstephens 🐝 | if it splits all the deps into individual derivations, then remote building will be slower due to its inefficient ways of handing off builds | 14:07:26 |
Diamond (it/she) | but it also seems fairly minor? especially when you can probably easily override that if you don't already have them on some cache | 14:07:39 |
| reese (they/them) joined the room. | 23:05:44 |
| 7 Mar 2024 |
reese (they/them) | hey folks! i recently saw that the e2ee photo storage service ente.io had open-sourced their server so i'm trying to write a flake for it so i can self-host it. i'm doing that by looking at the Dockerfile in the server dir, and created a flake.nix. however, i'm running into trouble. here's what my flake looks like so far:
{
description = "ente.io Museum server";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, utils }:
utils.lib.eachSystem [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
] (system: let
pkgs = nixpkgs.legacyPackages.${system};
version = "v2.0.34";
in {
packages = {
default = pkgs.buildGoModule {
pname = "museum";
inherit version;
src = ./.;
nativeBuildInputs = with pkgs; [ gcc git libsodium musl pkg-config ];
vendorHash = "sha256-D3pJYrip2EEj98q3pawnSkRUiIyjLm82jlmV7owA69Q=";
};
};
# apps.default = utils.lib.mkApp { drv = self.packages.${system}.default; };
# Ignore this, not relevant to the question
#devShells.default = pkgs.mkShell {
#buildInputs = with pkgs; [ gcc git go gopls gotools go-tools libsodium musl pkg-config ];
#};
});
}
when i run nix build:
warning: Git tree '...' is dirty
error: builder for '/nix/store/lwpw9bpyrvq8gs53jbwwz2gkimcgk7gl-museum-v2.0.34.drv' failed with exit code 1;
last 10 log lines:
> # pkg-config --cflags -- libsodium libsodium
> Package libsodium was not found in the pkg-config search path.
> Perhaps you should add the directory containing `libsodium.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'libsodium' found
> Package libsodium was not found in the pkg-config search path.
> Perhaps you should add the directory containing `libsodium.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'libsodium' found
> pkg-config: exit status 1
For full logs, run 'nix log /nix/store/lwpw9bpyrvq8gs53jbwwz2gkimcgk7gl-museum-v2.0.34.drv'.
why is pkg-config not finding libsodium? is there something i need to pass to pkgs.buildGoModule to make it work?
thanks in advance.
| 00:30:13 |
reese (they/them) | * hey folks! i recently saw that the e2ee photo storage service ente.io had open-sourced their server so i'm trying to write a flake for it so i can self-host it. i'm doing that by looking at the Dockerfile in the server dir, and this flake.nix is in that dir as well. however, i'm running into trouble. here's what my flake looks like so far:
{
description = "ente.io Museum server";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, utils }:
utils.lib.eachSystem [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
] (system: let
pkgs = nixpkgs.legacyPackages.${system};
version = "v2.0.34";
in {
packages = {
default = pkgs.buildGoModule {
pname = "museum";
inherit version;
src = ./.;
nativeBuildInputs = with pkgs; [ gcc git libsodium musl pkg-config ];
vendorHash = "sha256-D3pJYrip2EEj98q3pawnSkRUiIyjLm82jlmV7owA69Q=";
};
};
# apps.default = utils.lib.mkApp { drv = self.packages.${system}.default; };
# Ignore this, not relevant to the question
#devShells.default = pkgs.mkShell {
#buildInputs = with pkgs; [ gcc git go gopls gotools go-tools libsodium musl pkg-config ];
#};
});
}
when i run nix build:
warning: Git tree '...' is dirty
error: builder for '/nix/store/lwpw9bpyrvq8gs53jbwwz2gkimcgk7gl-museum-v2.0.34.drv' failed with exit code 1;
last 10 log lines:
> # pkg-config --cflags -- libsodium libsodium
> Package libsodium was not found in the pkg-config search path.
> Perhaps you should add the directory containing `libsodium.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'libsodium' found
> Package libsodium was not found in the pkg-config search path.
> Perhaps you should add the directory containing `libsodium.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'libsodium' found
> pkg-config: exit status 1
For full logs, run 'nix log /nix/store/lwpw9bpyrvq8gs53jbwwz2gkimcgk7gl-museum-v2.0.34.drv'.
why is pkg-config not finding libsodium? is there something i need to pass to pkgs.buildGoModule to make it work?
thanks in advance.
| 01:02:52 |
@qbit:tapenet.org | In reply to @reese:cyberia.club
hey folks! i recently saw that the e2ee photo storage service ente.io had open-sourced their server so i'm trying to write a flake for it so i can self-host it. i'm doing that by looking at the Dockerfile in the server dir, and this flake.nix is in that dir as well. however, i'm running into trouble. here's what my flake looks like so far:
{
description = "ente.io Museum server";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, utils }:
utils.lib.eachSystem [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
] (system: let
pkgs = nixpkgs.legacyPackages.${system};
version = "v2.0.34";
in {
packages = {
default = pkgs.buildGoModule {
pname = "museum";
inherit version;
src = ./.;
nativeBuildInputs = with pkgs; [ gcc git libsodium musl pkg-config ];
vendorHash = "sha256-D3pJYrip2EEj98q3pawnSkRUiIyjLm82jlmV7owA69Q=";
};
};
# apps.default = utils.lib.mkApp { drv = self.packages.${system}.default; };
# Ignore this, not relevant to the question
#devShells.default = pkgs.mkShell {
#buildInputs = with pkgs; [ gcc git go gopls gotools go-tools libsodium musl pkg-config ];
#};
});
}
when i run nix build:
warning: Git tree '...' is dirty
error: builder for '/nix/store/lwpw9bpyrvq8gs53jbwwz2gkimcgk7gl-museum-v2.0.34.drv' failed with exit code 1;
last 10 log lines:
> # pkg-config --cflags -- libsodium libsodium
> Package libsodium was not found in the pkg-config search path.
> Perhaps you should add the directory containing `libsodium.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'libsodium' found
> Package libsodium was not found in the pkg-config search path.
> Perhaps you should add the directory containing `libsodium.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'libsodium' found
> pkg-config: exit status 1
For full logs, run 'nix log /nix/store/lwpw9bpyrvq8gs53jbwwz2gkimcgk7gl-museum-v2.0.34.drv'.
why is pkg-config not finding libsodium? is there something i need to pass to pkgs.buildGoModule to make it work?
thanks in advance.
nice! I was gonna do the same :D | 01:32:12 |
@qbit:tapenet.org | reese (they/them): you might need libsodium in buildInputs | 01:35:05 |
@qbit:tapenet.org | also you will need proxyVendor = true; | 01:35:07 |
reese (they/them) | well now i get this wall of text:
error: builder for '/nix/store/3zrl40q8fcn8159qcp9wq059lk0fx3dh-museum-v2.0.34.drv' failed with exit code 1;
last 10 log lines:
> pkg/middleware/rate_limit.go:16:2: github.com/ulule/limiter/v3@v3.8.0: reading file:///nix/store/m73mv6hcxpiahl09ipgm8zyg4p67bvh1-museum-v2.0.34-go-modules/github.com/ulule/limiter/v3/@v/v3.8.0.zip: no such file or directory
> cmd/museum/main.go:60:2: github.com/gin-contrib/gzip@v0.0.5: reading file:///nix/store/m73mv6hcxpiahl09ipgm8zyg4p67bvh1-museum-v2.0.34-go-modules/github.com/gin-contrib/gzip/@v/v0.0.5.zip: no such file or directory
> cmd/museum/main.go:62:2: github.com/gin-contrib/timeout@v0.0.3: reading file:///nix/store/m73mv6hcxpiahl09ipgm8zyg4p67bvh1-museum-v2.0.34-go-modules/github.com/gin-contrib/timeout/@v/v0.0.3.zip: no such file or directory
> cmd/museum/main.go:64:2: github.com/golang-migrate/migrate/v4@v4.12.2: reading file:///nix/store/m73mv6hcxpiahl09ipgm8zyg4p67bvh1-museum-v2.0.34-go-modules/github.com/golang-migrate/migrate/v4/@v/v4.12.2.zip: no such file or directory
> cmd/museum/main.go:65:2: github.com/golang-migrate/migrate/v4@v4.12.2: reading file:///nix/store/m73mv6hcxpiahl09ipgm8zyg4p67bvh1-museum-v2.0.34-go-modules/github.com/golang-migrate/migrate/v4/@v/v4.12.2.zip: no such file or directory
> cmd/museum/main.go:66:2: github.com/golang-migrate/migrate/v4@v4.12.2: reading file:///nix/store/m73mv6hcxpiahl09ipgm8zyg4p67bvh1-museum-v2.0.34-go-modules/github.com/golang-migrate/migrate/v4/@v/v4.12.2.zip: no such file or directory
> cmd/museum/main.go:71:2: github.com/prometheus/client_golang@v1.11.1: reading file:///nix/store/m73mv6hcxpiahl09ipgm8zyg4p67bvh1-museum-v2.0.34-go-modules/github.com/prometheus/client_golang/@v/v1.11.1.zip: no such file or directory
> cmd/museum/main.go:72:2: github.com/robfig/cron/v3@v3.0.1: reading file:///nix/store/m73mv6hcxpiahl09ipgm8zyg4p67bvh1-museum-v2.0.34-go-modules/github.com/robfig/cron/v3/@v/v3.0.1.zip: no such file or directory
> cmd/museum/main.go:75:2: github.com/zsais/go-gin-prometheus@v0.1.0: reading file:///nix/store/m73mv6hcxpiahl09ipgm8zyg4p67bvh1-museum-v2.0.34-go-modules/github.com/zsais/go-gin-prometheus/@v/v0.1.0.zip: no such file or directory
> cmd/museum/main.go:76:2: gopkg.in/natefinch/lumberjack.v2@v2.0.0: reading file:///nix/store/m73mv6hcxpiahl09ipgm8zyg4p67bvh1-museum-v2.0.34-go-modules/gopkg.in/natefinch/lumberjack.v2/@v/v2.0.0.zip: no such file or directory
For full logs, run 'nix log /nix/store/3zrl40q8fcn8159qcp9wq059lk0fx3dh-museum-v2.0.34.drv'.
| 01:42:48 |
Diamond (it/she) | In reply to @qbit:tapenet.org also you will need proxyVendor = true; what's this for! | 01:44:22 |
Diamond (it/she) | * what's this for? | 01:44:29 |
reese (they/them) | without that i get
error: builder for '/nix/store/4fb4z6mgl19hyg79065jgm7bs9mgxrij-museum-v2.0.34.drv' failed with exit code 1;
last 10 log lines:
> Building subPackage ./pkg/utils/time
> Building subPackage ./tools/abort-unfinished-multipart-uploads
> Building subPackage ./tools/gen-random-keys
> Building subPackage ./tools/pkg/cli
> Building subPackage ./tools/test-wasabi-compliance
> buildPhase completed in 30 seconds
> Running phase: checkPhase
> time="2024-03-07T01:45:40Z" level=fatal msg="Not running tests in non-test environment"
> FAIL github.com/ente-io/museum/pkg/repo/storagebonus 0.006s
> FAIL
| 01:48:36 |
reese (they/them) | * without proxyVendor i get
error: builder for '/nix/store/4fb4z6mgl19hyg79065jgm7bs9mgxrij-museum-v2.0.34.drv' failed with exit code 1;
last 10 log lines:
> Building subPackage ./pkg/utils/time
> Building subPackage ./tools/abort-unfinished-multipart-uploads
> Building subPackage ./tools/gen-random-keys
> Building subPackage ./tools/pkg/cli
> Building subPackage ./tools/test-wasabi-compliance
> buildPhase completed in 30 seconds
> Running phase: checkPhase
> time="2024-03-07T01:45:40Z" level=fatal msg="Not running tests in non-test environment"
> FAIL github.com/ente-io/museum/pkg/repo/storagebonus 0.006s
> FAIL
| 01:48:53 |
@qbit:tapenet.org | In reply to @reese:cyberia.club
without proxyVendor i get
error: builder for '/nix/store/4fb4z6mgl19hyg79065jgm7bs9mgxrij-museum-v2.0.34.drv' failed with exit code 1;
last 10 log lines:
> Building subPackage ./pkg/utils/time
> Building subPackage ./tools/abort-unfinished-multipart-uploads
> Building subPackage ./tools/gen-random-keys
> Building subPackage ./tools/pkg/cli
> Building subPackage ./tools/test-wasabi-compliance
> buildPhase completed in 30 seconds
> Running phase: checkPhase
> time="2024-03-07T01:45:40Z" level=fatal msg="Not running tests in non-test environment"
> FAIL github.com/ente-io/museum/pkg/repo/storagebonus 0.006s
> FAIL
you might need to specify the submodules to build | 01:58:56 |
@qbit:tapenet.org | subpackages? i can't ever remember | 01:59:04 |
@qbit:tapenet.org | In reply to @diamondburned:matrix.org what's this for? stuff that uses cgo | 01:59:10 |
Diamond (it/she) | wait interesting | 01:59:35 |