Simplify AppImage build to nix build .#xce.appImage
Expose the AppImage as a flake output via the nix-appimage input's mkAppImage (passthru on the xce package) instead of requiring an external 'nix bundle --bundler github:ralismark/nix-appimage' call. Update README and build-deployment steering to match.
This commit is contained in:
parent
45432ae5e7
commit
4a224e8c8d
4 changed files with 108 additions and 11 deletions
|
|
@ -7,9 +7,10 @@
|
|||
extralib.url = "git+ssh://forgejo@gitea.shenrs.eu/nexa/extralibs?ref=main";
|
||||
librtti.url = "git+ssh://forgejo@gitea.shenrs.eu/rshen/librtti?ref=master";
|
||||
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
|
||||
supportedSystems = [ "x86_64-linux" ];
|
||||
myCommitId =
|
||||
|
|
@ -68,7 +69,15 @@
|
|||
inherit pkgs myCommitId myDirtyFingerprint;
|
||||
};
|
||||
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";
|
||||
runtimeInputs = with pkgs; [
|
||||
xpkgs.xcecore
|
||||
|
|
@ -92,7 +101,9 @@
|
|||
meta = {
|
||||
mainProgram = "xce";
|
||||
};
|
||||
};
|
||||
}).overrideAttrs (old: {
|
||||
passthru = (old.passthru or {}) // { inherit appImage; };
|
||||
});
|
||||
in rec {
|
||||
packages = pkgs // xpkgs // { xce = appImageEntryPackage; };
|
||||
defaultPackage = xpkgs.xcecore_debug;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue