| * 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.
|