fix(nix): fix container architecture

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
Sefa Eyeoglu 2024-05-01 11:06:51 +02:00
parent c8501b1bf4
commit b37602a263
No known key found for this signature in database
GPG key ID: E13DFD4B47127951
2 changed files with 10 additions and 9 deletions

View file

@ -83,15 +83,12 @@
rust-overlay = rust-overlay.packages.${system};
};
mkContainerFor = refraction: let
architecture = refraction.stdenv.hostPlatform.ubootArch;
in
pkgs.dockerTools.buildLayeredImage {
name = "refraction";
tag = "latest-${architecture}";
config.Cmd = [(lib.getExe refraction)];
inherit architecture;
};
mkContainerFor = refraction: pkgs.dockerTools.buildLayeredImage {
name = "refraction";
tag = "latest-${refraction.stdenv.hostPlatform.qemuArch}";
config.Cmd = [(lib.getExe refraction)];
inherit (refraction) architecture;
};
in {
refraction = pkgs.callPackage ./nix/derivation.nix {inherit self;};

View file

@ -1,6 +1,7 @@
{
lib,
stdenv,
go,
rustPlatform,
darwin,
self,
@ -53,6 +54,9 @@ rustPlatform.buildRustPackage {
strip = "symbols";
});
# useful for container images
passthru.architecture = go.GOARCH;
meta = with lib; {
mainProgram = "refraction";
description = "Discord bot for Prism Launcher";