Merge branch 'simplify_app_image' into scheduler-framework
This commit is contained in:
commit
2cb6953d4f
4 changed files with 108 additions and 11 deletions
|
|
@ -76,7 +76,7 @@ nix build .#xcecore_debug # default package: debug + ASAN
|
||||||
nix build .#xcecli # CLI only
|
nix build .#xcecli # CLI only
|
||||||
```
|
```
|
||||||
|
|
||||||
**AppImage**: `nix build .#xcecore`/`.#xcecore_debug` do not produce an AppImage — they only install `xce` (a copy of `tools/appimage/entry.sh`, see `src/meson.build`) as a plain shell entry-point binary. The `xce` flake package (`appImageEntryPackage` in `src/flake.nix`) wraps that entry script with bundled daemons, haproxy, glow, and less; the actual `.AppImage` file is produced separately with `nix bundle --bundler github:ralismark/nix-appimage --option sandbox false .#xce` (see README.md, "3.5 build AppImage package").
|
**AppImage**: `nix build .#xcecore`/`.#xcecore_debug` do not produce an AppImage — they only install `xce` (a copy of `tools/appimage/entry.sh`, see `src/meson.build`) as a plain shell entry-point binary. The `xce` flake package (`appImageEntryPackage` in `src/flake.nix`) wraps that entry script with bundled daemons, haproxy, glow, and less; the actual `.AppImage` file is produced by the `xce.appImage` flake output (`nix build .#xce.appImage`, via the `nix-appimage` flake input's `mkAppImage` — no external `nix bundle --bundler` invocation, see README.md 3.5).
|
||||||
|
|
||||||
## Local HA Cluster Deployment
|
## Local HA Cluster Deployment
|
||||||
|
|
||||||
|
|
@ -158,5 +158,5 @@ Go modules are independent — `apiserver` and `xcecli` have separate `go.mod` f
|
||||||
| REST API server | same | `xce_apiserver` binary |
|
| REST API server | same | `xce_apiserver` binary |
|
||||||
| CLI tool | `nix build .#xcecli` | `xcecli` binary |
|
| CLI tool | `nix build .#xcecli` | `xcecli` binary |
|
||||||
| Admin config CLI (installable) | `/xce-build xceadmin` | `xceadmin-<version>-py3-none-any.whl` at `<build_dir>/xceadmin/dist/` — `pip install` it directly |
|
| Admin config CLI (installable) | `/xce-build xceadmin` | `xceadmin-<version>-py3-none-any.whl` at `<build_dir>/xceadmin/dist/` — `pip install` it directly |
|
||||||
| AppImage | `nix bundle --bundler github:ralismark/nix-appimage --option sandbox false .#xce` | `.AppImage` bundle (see README.md 3.5) |
|
| AppImage | `nix build .#xce.appImage` | `xce.AppImage` bundle at `./result` (see README.md 3.5) |
|
||||||
| Debug build | `nix build .#xcecore_debug` | full debug + ASAN binaries |
|
| Debug build | `nix build .#xcecore_debug` | full debug + ASAN binaries |
|
||||||
|
|
|
||||||
|
|
@ -164,10 +164,10 @@ meson compile -C xce.build
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cd xce/src
|
cd xce/src
|
||||||
nix bundle --bundler github:ralismark/nix-appimage .#xce
|
nix build .#xce.appImage
|
||||||
```
|
```
|
||||||
|
|
||||||
This will create all in one AppImage file which contains everything for package delivery.
|
This will create an all-in-one `xce.AppImage` (available at `./result`) which contains everything for package delivery.
|
||||||
|
|
||||||
# 4. misc
|
# 4. misc
|
||||||
## 4.1. Windows remap ctrl and alt key
|
## 4.1. Windows remap ctrl and alt key
|
||||||
|
|
|
||||||
94
src/flake.lock
generated
94
src/flake.lock
generated
|
|
@ -20,6 +20,22 @@
|
||||||
"url": "ssh://forgejo@gitea.shenrs.eu/nexa/extralibs"
|
"url": "ssh://forgejo@gitea.shenrs.eu/nexa/extralibs"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"flake-compat": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1733328505,
|
||||||
|
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"flake-utils": {
|
"flake-utils": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems"
|
"systems": "systems"
|
||||||
|
|
@ -110,6 +126,24 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"flake-utils_6": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems_6"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1731533236,
|
||||||
|
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"librtti": {
|
"librtti": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_3",
|
"flake-utils": "flake-utils_3",
|
||||||
|
|
@ -131,6 +165,26 @@
|
||||||
"url": "ssh://forgejo@gitea.shenrs.eu/rshen/librtti"
|
"url": "ssh://forgejo@gitea.shenrs.eu/rshen/librtti"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nix-appimage": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": "flake-compat",
|
||||||
|
"flake-utils": "flake-utils_5",
|
||||||
|
"nixpkgs": "nixpkgs_4"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1757920913,
|
||||||
|
"narHash": "sha256-jd0QwCVz4O1sHHkeaZILD/7D6oyalceEJ4EFnWCgm0k=",
|
||||||
|
"owner": "ralismark",
|
||||||
|
"repo": "nix-appimage",
|
||||||
|
"rev": "7946addbc0d97e358a6d7aefe5e82310f0fe6b18",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "ralismark",
|
||||||
|
"repo": "nix-appimage",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764517877,
|
"lastModified": 1764517877,
|
||||||
|
|
@ -180,6 +234,22 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_4": {
|
"nixpkgs_4": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1745997950,
|
||||||
|
"narHash": "sha256-FklMkU+bPPx0L3i6pdrw65js05VO9He3DTeKguX9GQY=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "cf3ffa5d140899101f1deb3f4d16b1a1aa2de849",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_5": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1769461804,
|
"lastModified": 1769461804,
|
||||||
"narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=",
|
"narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=",
|
||||||
|
|
@ -195,7 +265,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_5": {
|
"nixpkgs_6": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1777954456,
|
"lastModified": 1777954456,
|
||||||
"narHash": "sha256-hGdgeU2Nk87RAuZyYjyDjFL6LK7dAZN5RE9+hrDTkDU=",
|
"narHash": "sha256-hGdgeU2Nk87RAuZyYjyDjFL6LK7dAZN5RE9+hrDTkDU=",
|
||||||
|
|
@ -325,7 +395,8 @@
|
||||||
"extralib": "extralib",
|
"extralib": "extralib",
|
||||||
"flake-utils": "flake-utils_2",
|
"flake-utils": "flake-utils_2",
|
||||||
"librtti": "librtti",
|
"librtti": "librtti",
|
||||||
"nixpkgs": "nixpkgs_4",
|
"nix-appimage": "nix-appimage",
|
||||||
|
"nixpkgs": "nixpkgs_5",
|
||||||
"xbuild": "xbuild_2"
|
"xbuild": "xbuild_2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -404,6 +475,21 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"systems_6": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"uv2nix": {
|
"uv2nix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
|
@ -475,8 +561,8 @@
|
||||||
},
|
},
|
||||||
"xbuild_2": {
|
"xbuild_2": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_5",
|
"flake-utils": "flake-utils_6",
|
||||||
"nixpkgs": "nixpkgs_5",
|
"nixpkgs": "nixpkgs_6",
|
||||||
"npm-lockfile-fix": "npm-lockfile-fix",
|
"npm-lockfile-fix": "npm-lockfile-fix",
|
||||||
"pyproject-build-systems": "pyproject-build-systems",
|
"pyproject-build-systems": "pyproject-build-systems",
|
||||||
"pyproject-nix": "pyproject-nix_2",
|
"pyproject-nix": "pyproject-nix_2",
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,10 @@
|
||||||
extralib.url = "git+ssh://forgejo@gitea.shenrs.eu/nexa/extralibs?ref=main";
|
extralib.url = "git+ssh://forgejo@gitea.shenrs.eu/nexa/extralibs?ref=main";
|
||||||
librtti.url = "git+ssh://forgejo@gitea.shenrs.eu/rshen/librtti?ref=master";
|
librtti.url = "git+ssh://forgejo@gitea.shenrs.eu/rshen/librtti?ref=master";
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
nix-appimage.url = "github:ralismark/nix-appimage";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, xbuild, extralib, librtti, flake-utils }:
|
outputs = { self, nixpkgs, xbuild, extralib, librtti, flake-utils, nix-appimage }:
|
||||||
let
|
let
|
||||||
supportedSystems = [ "x86_64-linux" ];
|
supportedSystems = [ "x86_64-linux" ];
|
||||||
myCommitId =
|
myCommitId =
|
||||||
|
|
@ -68,7 +69,15 @@
|
||||||
inherit pkgs myCommitId myDirtyFingerprint;
|
inherit pkgs myCommitId myDirtyFingerprint;
|
||||||
};
|
};
|
||||||
appImageScriptContent = builtins.readFile ./tools/appimage/entry.sh;
|
appImageScriptContent = builtins.readFile ./tools/appimage/entry.sh;
|
||||||
appImageEntryPackage = pkgs.writeShellApplication {
|
# The AppImage bundle, exposed as a passthru attribute on the `xce`
|
||||||
|
# package so it can be built directly with `nix build .#xce.appImage`
|
||||||
|
# -- no external `nix bundle --bundler github:ralismark/nix-appimage`
|
||||||
|
# invocation required.
|
||||||
|
appImage = nix-appimage.lib.${system}.mkAppImage {
|
||||||
|
program = "${appImageEntryPackage}/bin/xce";
|
||||||
|
name = "xce.AppImage";
|
||||||
|
};
|
||||||
|
appImageEntryPackage = (pkgs.writeShellApplication {
|
||||||
name = "xce";
|
name = "xce";
|
||||||
runtimeInputs = with pkgs; [
|
runtimeInputs = with pkgs; [
|
||||||
xpkgs.xcecore
|
xpkgs.xcecore
|
||||||
|
|
@ -92,7 +101,9 @@
|
||||||
meta = {
|
meta = {
|
||||||
mainProgram = "xce";
|
mainProgram = "xce";
|
||||||
};
|
};
|
||||||
};
|
}).overrideAttrs (old: {
|
||||||
|
passthru = (old.passthru or {}) // { inherit appImage; };
|
||||||
|
});
|
||||||
in rec {
|
in rec {
|
||||||
packages = pkgs // xpkgs // { xce = appImageEntryPackage; };
|
packages = pkgs // xpkgs // { xce = appImageEntryPackage; };
|
||||||
defaultPackage = xpkgs.xcecore_debug;
|
defaultPackage = xpkgs.xcecore_debug;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue