mirror of
https://github.com/pimalaya/himalaya.git
synced 2026-06-17 13:17:55 +08:00
add custom emulator
This commit is contained in:
+6
-6
@@ -1,18 +1,18 @@
|
||||
{ target ? null
|
||||
{ target
|
||||
, defaultFeatures ? true
|
||||
, features ? ""
|
||||
}:
|
||||
|
||||
let
|
||||
systems = import ./systems.nix;
|
||||
inherit (systems.${target}) rustTarget isStatic;
|
||||
system = systems.${target};
|
||||
|
||||
pkgs = import (fetchTarball "https://github.com/soywod/nixpkgs/archive/master.tar.gz") (if isNull target then { } else {
|
||||
pkgs = import (fetchTarball "https://github.com/soywod/nixpkgs/archive/master.tar.gz") {
|
||||
crossSystem = {
|
||||
isStatic = true;
|
||||
config = target;
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
inherit (pkgs) lib hostPlatform;
|
||||
|
||||
@@ -22,7 +22,7 @@ let
|
||||
|
||||
rustToolchain = mkToolchain.fromTarget {
|
||||
inherit lib;
|
||||
targetSystem = rustTarget;
|
||||
targetSystem = system.rustTarget;
|
||||
};
|
||||
|
||||
rustPlatform = pkgs.makeRustPlatform {
|
||||
@@ -32,7 +32,7 @@ let
|
||||
|
||||
himalayaExe =
|
||||
let ext = lib.optionalString hostPlatform.isWindows ".exe";
|
||||
in "${hostPlatform.emulator pkgs.buildPackages} ./himalaya${ext}";
|
||||
in "${(system.emulator or hostPlatform.emulator) pkgs.buildPackages} ./himalaya${ext}";
|
||||
|
||||
himalaya = import ./package.nix {
|
||||
inherit lib hostPlatform rustPlatform;
|
||||
|
||||
@@ -37,6 +37,7 @@ rustPlatform.buildRustPackage rec {
|
||||
++ lib.optional (installManPages || installShellCompletions) installShellFiles;
|
||||
|
||||
buildInputs = [ ]
|
||||
++ lib.optionals hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ Security ])
|
||||
++ lib.optional (builtins.elem "notmuch" buildFeatures) notmuch
|
||||
++ lib.optional (builtins.elem "pgp-gpg" buildFeatures) gpgme;
|
||||
|
||||
|
||||
+1
-9
@@ -1,46 +1,38 @@
|
||||
{
|
||||
aarch64-apple-darwin = {
|
||||
rustTarget = "aarch64-apple-darwin";
|
||||
isStatic = true;
|
||||
};
|
||||
|
||||
aarch64-unknown-linux-musl = {
|
||||
rustTarget = "aarch64-unknown-linux-musl";
|
||||
isStatic = true;
|
||||
};
|
||||
|
||||
armv6l-unknown-linux-musleabihf = {
|
||||
rustTarget = "arm-unknown-linux-musleabihf";
|
||||
isStatic = true;
|
||||
};
|
||||
|
||||
armv7l-unknown-linux-musleabihf = {
|
||||
rustTarget = "armv7-unknown-linux-musleabihf";
|
||||
isStatic = true;
|
||||
};
|
||||
|
||||
i686-unknown-linux-musl = {
|
||||
rustTarget = "i686-unknown-linux-musl";
|
||||
isStatic = true;
|
||||
};
|
||||
|
||||
i686-w64-mingw32 = {
|
||||
rustTarget = "i686-pc-windows-gnu";
|
||||
isStatic = false;
|
||||
emulator = pkgs: "${pkgs.wine}/bin/wine";
|
||||
};
|
||||
|
||||
x86_64-apple-darwin = {
|
||||
rustTarget = "x86_64-apple-darwin";
|
||||
isStatic = true;
|
||||
};
|
||||
|
||||
x86_64-unknown-linux-musl = {
|
||||
rustTarget = "x86_64-unknown-linux-musl";
|
||||
isStatic = true;
|
||||
};
|
||||
|
||||
x86_64-w64-mingw32 = {
|
||||
rustTarget = "x86_64-pc-windows-gnu";
|
||||
isStatic = false;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user