Skip to content

Commit

Permalink
add minimal features set
Browse files Browse the repository at this point in the history
  • Loading branch information
soywod committed Nov 27, 2024
1 parent b6a062d commit b55935c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
strategy:
fail-fast: false
matrix:
feature: [full, minimal]
include:
- target: aarch64-darwin
os: macos-14
Expand Down Expand Up @@ -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
Expand Down
19 changes: 16 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit b55935c

Please sign in to comment.