fix(nix): fix container architecture
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
parent
c8501b1bf4
commit
b37602a263
2 changed files with 10 additions and 9 deletions
15
flake.nix
15
flake.nix
|
@ -83,15 +83,12 @@
|
||||||
rust-overlay = rust-overlay.packages.${system};
|
rust-overlay = rust-overlay.packages.${system};
|
||||||
};
|
};
|
||||||
|
|
||||||
mkContainerFor = refraction: let
|
mkContainerFor = refraction: pkgs.dockerTools.buildLayeredImage {
|
||||||
architecture = refraction.stdenv.hostPlatform.ubootArch;
|
name = "refraction";
|
||||||
in
|
tag = "latest-${refraction.stdenv.hostPlatform.qemuArch}";
|
||||||
pkgs.dockerTools.buildLayeredImage {
|
config.Cmd = [(lib.getExe refraction)];
|
||||||
name = "refraction";
|
inherit (refraction) architecture;
|
||||||
tag = "latest-${architecture}";
|
};
|
||||||
config.Cmd = [(lib.getExe refraction)];
|
|
||||||
inherit architecture;
|
|
||||||
};
|
|
||||||
in {
|
in {
|
||||||
refraction = pkgs.callPackage ./nix/derivation.nix {inherit self;};
|
refraction = pkgs.callPackage ./nix/derivation.nix {inherit self;};
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
stdenv,
|
stdenv,
|
||||||
|
go,
|
||||||
rustPlatform,
|
rustPlatform,
|
||||||
darwin,
|
darwin,
|
||||||
self,
|
self,
|
||||||
|
@ -53,6 +54,9 @@ rustPlatform.buildRustPackage {
|
||||||
strip = "symbols";
|
strip = "symbols";
|
||||||
});
|
});
|
||||||
|
|
||||||
|
# useful for container images
|
||||||
|
passthru.architecture = go.GOARCH;
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
mainProgram = "refraction";
|
mainProgram = "refraction";
|
||||||
description = "Discord bot for Prism Launcher";
|
description = "Discord bot for Prism Launcher";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue