mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-02 14:03:06 +00:00
* android-ndk is added * in the derivation, system nim is default but one can change it to nimbus-build-system * special script for creating nimble links, necessary for the compilation to succeed. Referenced issue: * https://github.com/waku-org/nwaku/issues/3232
63 lines
1.8 KiB
Nix
63 lines
1.8 KiB
Nix
{
|
|
description = "NWaku build flake";
|
|
|
|
nixConfig = {
|
|
extra-substituters = [ "https://nix-cache.status.im/" ];
|
|
extra-trusted-public-keys = [ "nix-cache.status.im-1:x/93lOfLU+duPplwMSBR+OlY4+mo+dCN7n0mr4oPwgY=" ];
|
|
};
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs?rev=f44bd8ca21e026135061a0a57dcf3d0775b67a49";
|
|
zerokit = {
|
|
url = "github:vacp2p/zerokit?rev=c60e0c33fc6350a4b1c20e6b6727c44317129582";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs = { self, nixpkgs, zerokit }:
|
|
let
|
|
stableSystems = [
|
|
"x86_64-linux" "aarch64-linux"
|
|
"x86_64-darwin" "aarch64-darwin"
|
|
"x86_64-windows" "i686-linux"
|
|
"i686-windows"
|
|
];
|
|
|
|
forAllSystems = f: nixpkgs.lib.genAttrs stableSystems (system: f system);
|
|
|
|
pkgsFor = forAllSystems (
|
|
system: import nixpkgs {
|
|
inherit system;
|
|
config = {
|
|
android_sdk.accept_license = true;
|
|
allowUnfree = true;
|
|
};
|
|
overlays = [
|
|
(final: prev: {
|
|
androidEnvCustom = prev.callPackage ./nix/pkgs/android-sdk { };
|
|
androidPkgs = final.androidEnvCustom.pkgs;
|
|
androidShell = final.androidEnvCustom.shell;
|
|
})
|
|
];
|
|
}
|
|
);
|
|
|
|
in rec {
|
|
packages = forAllSystems (system: let
|
|
pkgs = pkgsFor.${system};
|
|
in rec {
|
|
libwaku-android-arm64 = pkgs.callPackage ./nix/default.nix {
|
|
inherit stableSystems;
|
|
src = self;
|
|
targets = ["libwaku-android-arm64"];
|
|
androidArch = "aarch64-linux-android";
|
|
zerokitPkg = zerokit.packages.${system}.zerokit-android-arm64;
|
|
};
|
|
default = libwaku-android-arm64;
|
|
});
|
|
|
|
devShells = forAllSystems (system: {
|
|
default = pkgsFor.${system}.callPackage ./nix/shell.nix {};
|
|
});
|
|
};
|
|
} |