mirror of
https://github.com/pimalaya/himalaya.git
synced 2024-12-09 21:18:39 +03:00
remove emulators
This commit is contained in:
11
.github/workflows/pre-release.yml
vendored
11
.github/workflows/pre-release.yml
vendored
@@ -47,11 +47,16 @@ jobs:
|
||||
- name: Build release
|
||||
run: |
|
||||
nix build .#cross-${{ matrix.target }}
|
||||
nix run .#cross-${{ matrix.target }} -- --version
|
||||
- name: Upload release artifacts
|
||||
- name: Upload release
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: "himalaya-${{ matrix.target }}"
|
||||
path: |
|
||||
result/bin/himalaya*
|
||||
result/bin/share
|
||||
- name: Upload share folder
|
||||
uses: actions/upload-artifact@v4
|
||||
if: matrix.target == "x86_64-linux"
|
||||
with:
|
||||
name: "share"
|
||||
path: |
|
||||
result/share
|
||||
|
||||
@@ -3,7 +3,7 @@ Type=Application
|
||||
Name=himalaya
|
||||
DesktopName=Himalaya
|
||||
GenericName=Mail Reader
|
||||
Comment=Command-line interface for email management
|
||||
Comment=CLI to manage emails
|
||||
Terminal=true
|
||||
Exec=himalaya %U
|
||||
Categories=Application;Network
|
||||
@@ -13,4 +13,4 @@ Actions=Compose
|
||||
|
||||
[Desktop Action Compose]
|
||||
Name=Compose
|
||||
Exec=himalaya write %U
|
||||
Exec=himalaya message write %U
|
||||
|
||||
32
default.nix
32
default.nix
@@ -28,18 +28,12 @@ let
|
||||
'';
|
||||
};
|
||||
|
||||
himalayaExe =
|
||||
let ext = lib.optionalString hostPlatform.isWindows ".exe";
|
||||
in "${hostPlatform.emulator pkgs} ./himalaya${ext}";
|
||||
|
||||
himalaya = import ./package.nix {
|
||||
inherit lib rustPlatform;
|
||||
fetchFromGitHub = crossPkgs.fetchFromGitHub;
|
||||
stdenv = crossPkgs.stdenv;
|
||||
apple-sdk = if hostPlatform.isx86_64 then crossPkgs.apple-sdk_13 else crossPkgs.apple-sdk_14;
|
||||
installShellFiles = false;
|
||||
installShellCompletions = false;
|
||||
installManPages = false;
|
||||
installShellFiles = crossPkgs.installShellFiles;
|
||||
notmuch = crossPkgs.notmuch;
|
||||
gpgme = crossPkgs.gpgme;
|
||||
pkg-config = crossPkgs.pkg-config;
|
||||
@@ -54,29 +48,7 @@ himalaya.overrideAttrs (drv: {
|
||||
propagatedBuildInputs = (drv.propagatedBuildInputs or [ ])
|
||||
++ lib.optional hostPlatform.isWindows empty-libgcc_eh;
|
||||
|
||||
# NOTE: manual wineprefix update is somehow needed:
|
||||
# <https://github.com/NixOS/nixpkgs/issues/321332>
|
||||
postInstall = (drv.postInstall or "") + lib.optionalString hostPlatform.isWindows ''
|
||||
export WINEPREFIX="$(${lib.getExe mktemp} -d)"
|
||||
'' + ''
|
||||
mkdir -p $out/bin/share/{applications,completions,man,services}
|
||||
cp assets/himalaya.desktop $out/bin/share/applications/
|
||||
cp assets/himalaya-watch@.service $out/bin/share/services/
|
||||
|
||||
cd $out/bin
|
||||
${himalayaExe} man ./share/man
|
||||
${himalayaExe} completion bash > ./share/completions/himalaya.bash
|
||||
${himalayaExe} completion elvish > ./share/completions/himalaya.elvish
|
||||
${himalayaExe} completion fish > ./share/completions/himalaya.fish
|
||||
${himalayaExe} completion powershell > ./share/completions/himalaya.powershell
|
||||
${himalayaExe} completion zsh > ./share/completions/himalaya.zsh
|
||||
|
||||
${lib.getExe gnutar} -czf himalaya.tgz himalaya* share
|
||||
mv himalaya.tgz ../
|
||||
|
||||
${lib.getExe zip} -r himalaya.zip himalaya* share
|
||||
mv himalaya.zip ../
|
||||
'';
|
||||
postInstall = null;
|
||||
|
||||
src = crossPkgs.nix-gitignore.gitignoreSource [ ] ./.;
|
||||
|
||||
|
||||
38
package.nix
38
package.nix
@@ -28,12 +28,6 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
cargoHash = "sha256-YS8IamapvmdrOPptQh2Ef9Yold0IK1XIeGs0kDIQ5b8=";
|
||||
|
||||
doCheck = false;
|
||||
auditable = false;
|
||||
|
||||
# unit tests only
|
||||
cargoTestFlags = [ "--lib" ];
|
||||
|
||||
nativeBuildInputs = [ pkg-config ]
|
||||
++ lib.optional (installManPages || installShellCompletions) installShellFiles;
|
||||
|
||||
@@ -42,15 +36,31 @@ rustPlatform.buildRustPackage rec {
|
||||
++ lib.optional (builtins.elem "notmuch" buildFeatures) notmuch
|
||||
++ lib.optional (builtins.elem "pgp-gpg" buildFeatures) gpgme;
|
||||
|
||||
postInstall = lib.optionalString installManPages ''
|
||||
mkdir -p $out/man
|
||||
$out/bin/himalaya man $out/man
|
||||
installManPage $out/man/*
|
||||
doCheck = false;
|
||||
auditable = false;
|
||||
|
||||
# unit tests only
|
||||
cargoTestFlags = [ "--lib" ];
|
||||
|
||||
preInstall = ''
|
||||
mkdir -p $out/share/applications
|
||||
cp assets/himalaya.desktop "$out"/share/applications/
|
||||
'' + lib.optionalString installManPages ''
|
||||
mkdir -p "$out"/share/man
|
||||
"$out"/bin/himalaya man "$out"/share/man
|
||||
'' + lib.optionalString installShellCompletions ''
|
||||
installShellCompletion --cmd himalaya \
|
||||
--bash <($out/bin/himalaya completion bash) \
|
||||
--fish <($out/bin/himalaya completion fish) \
|
||||
--zsh <($out/bin/himalaya completion zsh)
|
||||
mkdir -p "$out"/share/completions
|
||||
"$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
|
||||
"$out"/bin/himalaya completion powershell > "$out"/share/completions/himalaya.powershell
|
||||
"$out"/bin/himalaya completion zsh > "$out"/share/completions/himalaya.zsh
|
||||
'';
|
||||
|
||||
postInstall = lib.optionalString installManPages ''
|
||||
installManPage "$out"/share/man/*
|
||||
'' + lib.optionalString installShellCompletions ''
|
||||
installShellCompletion "$out"/share/completions/himalaya.{bash,fish,zsh}
|
||||
'';
|
||||
|
||||
meta = {
|
||||
|
||||
Reference in New Issue
Block a user