From b55935cc3948f21452224f79eb37d14bc508013e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20DOUIN?= Date: Wed, 27 Nov 2024 15:20:26 +0100 Subject: [PATCH] add minimal features set --- .github/workflows/pre-release.yml | 5 +++-- flake.nix | 19 ++++++++++++++++--- 2 files changed, 19 insertions(+), 5 deletions(-) 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: