| 28 Feb 2024 |
Paul Meyer (katexochen) | I also looked into removing Go 1.20, as it is EOL since some weeks. But I couldn't fix the remaining packages relying on it yet. | 10:20:43 |
kirillrdy | feel free ping me, and/ro marsam ( maybe he doesn't use matrix ) | 10:23:45 |
Paul Meyer (katexochen) | In reply to @kirillrdy:matrix.org feel free ping me, and/ro marsam ( maybe he doesn't use matrix ) Thanks, will do. I hope I'll find some time for it this weekend. | 10:25:33 |
Paul Meyer (katexochen) | kirillrdy: Have you seen my PRs on buildGoModule? I'm still looking for someone to merge https://github.com/NixOS/nixpkgs/pull/279391 and https://github.com/NixOS/nixpkgs/pull/278115 | 10:29:00 |
Paul Meyer (katexochen) | As well as for some early feedback on https://github.com/NixOS/nixpkgs/pull/284568 | 10:29:37 |
kirillrdy | no i have not, I am happy to have a look at them | 10:31:04 |
| 4 Mar 2024 |
Sandro 🐧 | Do we have some script/GHA/etc to extract the vendor hash when updating golang dependencies, so that it can be automatically updated for a git flake in the same repo? | 10:14:07 |
Paul Meyer (katexochen) | In reply to @sandro:supersandro.de Do we have some script/GHA/etc to extract the vendor hash when updating golang dependencies, so that it can be automatically updated for a git flake in the same repo? Is nix-update --version=skip --flake attr what you are looking for? | 14:19:25 |
Sandro 🐧 | Does that work when I am in the upstream repo itself and just want to update the vendorHash? | 14:20:00 |
Paul Meyer (katexochen) | it does | 14:20:22 |
Paul Meyer (katexochen) | We use renovate at work to update Go deps, and the following action to push vendorHash updates on renovate PRs:
https://github.com/edgelesssys/uplosi/blob/main/.github/workflows/lint.yml#L85-L126 | 14:22:02 |
adamcstephens 🐝 | So it looks like just running nix-update then? | 14:52:56 |
adamcstephens 🐝 | * So it looks like just running nix-update and skipping the version then? | 14:53:40 |
diamond (it/its) | 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/its) | 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/its) | 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/its) | 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/its) | not too sure about remote building either | 14:06:46 |
diamond (it/its) | * hm, never had such a problem with gomod2nix | 14:07:02 |
diamond (it/its) | 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/its) | 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:cyberia.club joined the room. | 23:05:44 |
| 7 Mar 2024 |
@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 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: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.
| 01:02:52 |