diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index d1a241d7..cff42775 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -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 diff --git a/flake.nix b/flake.nix index a0680284..5a1aa0e2 100644 --- a/flake.nix +++ b/flake.nix @@ -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: