diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 8e86ffa1..d1a241d7 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -45,11 +45,11 @@ jobs: authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} extraPullNames: nix-community - name: Build release - run: nix build .#cross-${{ matrix.target }}-minimal + run: nix build .#cross-${{ matrix.target }} - name: Upload release uses: actions/upload-artifact@v4 with: - name: himalaya-minimal-${{ matrix.target }} + name: himalaya-${{ matrix.target }} path: result/bin/himalaya* - name: Upload share folder uses: actions/upload-artifact@v4 diff --git a/flake.nix b/flake.nix index 5a1aa0e2..2cede38e 100644 --- a/flake.nix +++ b/flake.nix @@ -68,19 +68,9 @@ 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 (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"; - }); - }; + { "cross-${crossPkgs.hostPlatform.system}" = withGitEnvs crossPkg; }; # Apps diff --git a/package.nix b/package.nix index afcfeb76..0f1bad26 100644 --- a/package.nix +++ b/package.nix @@ -45,11 +45,11 @@ rustPlatform.buildRustPackage rec { postInstall = '' mkdir -p $out/share/{applications,completions,man} cp assets/himalaya.desktop "$out"/share/applications/ - '' + lib.optionalString stdenv.buildPlatform.canExecute stdenv.hostPlatform '' + '' + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' "$out"/bin/himalaya man "$out"/share/man '' + lib.optionalString installManPages '' installManPage "$out"/share/man/* - '' + lib.optionalString stdenv.buildPlatform.canExecute stdenv.hostPlatform '' + '' + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' "$out"/bin/himalaya completion bash > "$out"/share/completions/himalaya.bash "$out"/bin/himalaya completion elvish > "$out"/share/completions/himalaya.elvish "$out"/bin/himalaya completion fish > "$out"/share/completions/himalaya.fish