add minimal features set

This commit is contained in:
Clément DOUIN
2024-11-27 15:20:26 +01:00
parent b6a062d8bd
commit b55935cc39
2 changed files with 19 additions and 5 deletions

View File

@@ -9,6 +9,7 @@ jobs:
strategy:
fail-fast: false
matrix:
feature: [full, minimal]
include:
- target: aarch64-darwin
os: macos-14
@@ -45,11 +46,11 @@ jobs:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: nix-community
- name: Build release
run: nix build .#cross-${{ matrix.target }}
run: nix build .#cross-${{ matrix.target }}${{ matrix.feature == 'minimal' && '-minimal' || '' }}
- name: Upload release
uses: actions/upload-artifact@v4
with:
name: himalaya-${{ matrix.target }}
name: himalaya${{ matrix.feature == 'minimal' && '-minimal' || '' }}-${{ matrix.target }}
path: result/bin/himalaya*
- name: Upload share folder
uses: actions/upload-artifact@v4

View File

@@ -68,14 +68,27 @@
pkgs = import nixpkgs { inherit system; };
crossSystem = { config = crossConfig; isStatic = true; };
crossPkgs = import nixpkgs { inherit system crossSystem; };
crossPkg = import ./default.nix { inherit pkgs crossPkgs; fenix = fenix.packages.${system}; };
in
{ "cross-${crossPkgs.hostPlatform.system}" = withGitEnvs crossPkg; };
{
"cross-${crossPkgs.hostPlatform.system}" = withGitEnvs (import ./default.nix {
inherit pkgs crossPkgs;
fenix = fenix.packages.${system};
});
"cross-${crossPkgs.hostPlatform.system}-minimal" = withGitEnvs (import ./default.nix {
inherit pkgs crossPkgs;
fenix = fenix.packages.${system};
defaultFeatures = false;
features = "imap,smtp";
});
};
# Apps
mkApps = system: mkCrossApps system // {
default = { type = "app"; program = lib.getExe self.packages.${system}.default; };
default = {
type = "app";
program = lib.getExe self.packages.${system}.default;
};
};
mkCrossApps = system: