feat: build docker images with nix
This commit is contained in:
@@ -17,6 +17,13 @@
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
yoi = pkgs.callPackage ./package.nix { };
|
||||
dockerImages =
|
||||
if pkgs.stdenv.isLinux then
|
||||
import ./docker.nix {
|
||||
inherit pkgs yoi;
|
||||
}
|
||||
else
|
||||
{ };
|
||||
mkApp = name: description: {
|
||||
type = "app";
|
||||
program = "${yoi}/bin/${name}";
|
||||
@@ -24,8 +31,16 @@
|
||||
};
|
||||
in
|
||||
{
|
||||
packages.default = yoi;
|
||||
packages.yoi = yoi;
|
||||
packages = {
|
||||
default = yoi;
|
||||
yoi = yoi;
|
||||
}
|
||||
// pkgs.lib.optionalAttrs pkgs.stdenv.isLinux {
|
||||
docker-runtime = dockerImages.runtime;
|
||||
docker-server = dockerImages.server;
|
||||
docker-webui = dockerImages.webui;
|
||||
webui-static = dockerImages.webui-static;
|
||||
};
|
||||
|
||||
apps.default = mkApp "yoi" "Run the Yoi terminal UI";
|
||||
apps.yoi = mkApp "yoi" "Run the Yoi terminal UI";
|
||||
|
||||
Reference in New Issue
Block a user