50 lines
1.2 KiB
Nix
50 lines
1.2 KiB
Nix
{ pkgs ? import <nixpkgs> { }
|
|
, pkgsLinux ? import <nixpkgs> { system = "x86_64-linux"; }
|
|
}:
|
|
|
|
let
|
|
vars = import ./vars.nix;
|
|
|
|
# generate the reproducable blob below via:
|
|
# $ nix-shell -p nix-prefetch-docker --run 'nix-prefetch-docker ghcr.io/manyfold3d/manyfold-solo 0.120.0'
|
|
|
|
manyfoldImage = pkgs.dockerTools.pullImage {
|
|
imageName = "ghcr.io/manyfold3d/manyfold-solo";
|
|
imageDigest = "sha256:84524b9cf8c8e6467ca4938e58ff65a2a5d8c507fd44e7056003b3e2dcffb266";
|
|
sha256 = "0sb4icq19vqsnhi01jbaqqr2k66bfma08hp0rm0y4hdnbqsscxvd";
|
|
finalImageName = "ghcr.io/manyfold3d/manyfold-solo";
|
|
finalImageTag = "0.120.0";
|
|
};
|
|
|
|
in
|
|
rec
|
|
{
|
|
|
|
xrforgeImage = pkgs.dockerTools.buildImage {
|
|
|
|
name = "xrforge";
|
|
tag = "latest";
|
|
created = "now";
|
|
fromImage = manyfoldImage;
|
|
|
|
# add nix pkgs + local files
|
|
contents = pkgs.buildEnv {
|
|
name = "image-root";
|
|
pathsToLink = ["/manyfold" "/bin"];
|
|
paths = [
|
|
pkgs.pkgsStatic.rsync
|
|
pkgs.pkgsStatic.sqlite
|
|
pkgs.pkgsStatic.rclone
|
|
pkgs.pkgsStatic.fuse3
|
|
./..
|
|
];
|
|
};
|
|
|
|
config = {
|
|
Cmd = ["/init"];
|
|
# We substitute the /init entrypoing with our own wrapper
|
|
EntryPoint = ["/manyfold/cli/manyfold.sh" "boot"];
|
|
};
|
|
};
|
|
|
|
}
|