2022-11-05 11:51:36 +00:00
|
|
|
{
|
2022-11-05 11:53:23 +00:00
|
|
|
description = "moxxmpp";
|
2022-11-05 11:51:36 +00:00
|
|
|
inputs = {
|
2023-08-06 10:23:46 +00:00
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
|
|
android-nixpkgs.url = "github:tadfisher/android-nixpkgs";
|
2022-11-05 11:51:36 +00:00
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
};
|
|
|
|
|
2023-08-06 10:23:46 +00:00
|
|
|
outputs = { self, nixpkgs, android-nixpkgs, flake-utils }: flake-utils.lib.eachDefaultSystem (system: let
|
|
|
|
pkgs = import nixpkgs {
|
2022-11-05 11:51:36 +00:00
|
|
|
inherit system;
|
|
|
|
config = {
|
|
|
|
android_sdk.accept_license = true;
|
|
|
|
allowUnfree = true;
|
|
|
|
};
|
|
|
|
};
|
2023-08-06 10:23:46 +00:00
|
|
|
# Everything to make Flutter happy
|
|
|
|
sdk = android-nixpkgs.sdk.${system} (sdkPkgs: with sdkPkgs; [
|
|
|
|
cmdline-tools-latest
|
|
|
|
build-tools-30-0-3
|
|
|
|
build-tools-33-0-2
|
|
|
|
build-tools-34-0-0
|
|
|
|
platform-tools
|
|
|
|
emulator
|
|
|
|
patcher-v4
|
|
|
|
platforms-android-28
|
|
|
|
platforms-android-29
|
|
|
|
platforms-android-30
|
|
|
|
platforms-android-31
|
|
|
|
platforms-android-33
|
|
|
|
]);
|
|
|
|
lib = pkgs.lib;
|
2023-03-10 22:13:18 +00:00
|
|
|
pinnedJDK = pkgs.jdk17;
|
2023-01-28 14:22:37 +00:00
|
|
|
|
|
|
|
pythonEnv = pkgs.python3.withPackages (ps: with ps; [
|
|
|
|
pyyaml
|
|
|
|
requests
|
|
|
|
]);
|
|
|
|
|
|
|
|
moxxmppPubCache = import ./nix/pubcache.moxxmpp.nix {
|
|
|
|
inherit (pkgs) fetchzip runCommand;
|
|
|
|
};
|
2022-11-05 11:51:36 +00:00
|
|
|
in {
|
2023-01-28 14:22:37 +00:00
|
|
|
packages = {
|
|
|
|
moxxmppDartDocs = pkgs.callPackage ./nix/moxxmpp-docs.nix {
|
|
|
|
inherit (moxxmppPubCache) pubCache;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-04-02 15:20:14 +00:00
|
|
|
devShell = let
|
2023-08-06 10:23:46 +00:00
|
|
|
prosody-newer-community-modules = pkgs.prosody.overrideAttrs (old: {
|
2023-04-02 15:20:14 +00:00
|
|
|
communityModules = pkgs.fetchhg {
|
|
|
|
url = "https://hg.prosody.im/prosody-modules";
|
|
|
|
rev = "e3a3a6c86a9f";
|
|
|
|
sha256 = "sha256-C2x6PCv0sYuj4/SroDOJLsNPzfeNCodYKbMqmNodFrk=";
|
|
|
|
};
|
|
|
|
|
|
|
|
src = pkgs.fetchhg {
|
|
|
|
url = "https://hg.prosody.im/trunk";
|
|
|
|
rev = "8a2f75e38eb2";
|
|
|
|
sha256 = "sha256-zMNp9+wQ/hvUVyxFl76DqCVzQUPP8GkNdstiTDkG8Hw=";
|
|
|
|
};
|
|
|
|
});
|
|
|
|
prosody-sasl2 = prosody-newer-community-modules.override {
|
|
|
|
withCommunityModules = [
|
|
|
|
"sasl2" "sasl2_fast" "sasl2_sm" "sasl2_bind2"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
in pkgs.mkShell {
|
2022-11-05 11:51:36 +00:00
|
|
|
buildInputs = with pkgs; [
|
2023-08-06 10:23:46 +00:00
|
|
|
flutter37 pinnedJDK sdk dart # Dart
|
2022-11-05 11:53:23 +00:00
|
|
|
gitlint # Code hygiene
|
2023-01-28 14:22:37 +00:00
|
|
|
ripgrep # General utilities
|
2022-11-07 22:20:45 +00:00
|
|
|
|
2023-01-28 14:22:37 +00:00
|
|
|
# Flutter dependencies for Linux desktop
|
2022-11-07 22:20:45 +00:00
|
|
|
atk
|
|
|
|
cairo
|
|
|
|
clang
|
|
|
|
cmake
|
|
|
|
epoxy
|
|
|
|
gdk-pixbuf
|
|
|
|
glib
|
|
|
|
gtk3
|
|
|
|
harfbuzz
|
|
|
|
ninja
|
|
|
|
pango
|
|
|
|
pcre
|
|
|
|
pkg-config
|
|
|
|
xorg.libX11
|
|
|
|
xorg.xorgproto
|
2023-01-28 14:22:37 +00:00
|
|
|
|
2023-01-28 14:31:36 +00:00
|
|
|
# For the scripts in ./scripts/
|
2023-01-28 14:22:37 +00:00
|
|
|
pythonEnv
|
2023-04-02 15:20:14 +00:00
|
|
|
|
|
|
|
# For integration testing against a local prosody server
|
|
|
|
prosody-sasl2
|
|
|
|
mkcert
|
2022-11-05 11:51:36 +00:00
|
|
|
];
|
|
|
|
|
2022-11-07 22:20:45 +00:00
|
|
|
CPATH = "${pkgs.xorg.libX11.dev}/include:${pkgs.xorg.xorgproto}/include";
|
2022-11-08 13:22:12 +00:00
|
|
|
LD_LIBRARY_PATH = with pkgs; lib.makeLibraryPath [ atk cairo epoxy gdk-pixbuf glib gtk3 harfbuzz pango ];
|
2022-11-07 22:20:45 +00:00
|
|
|
|
2023-08-06 10:23:46 +00:00
|
|
|
ANDROID_SDK_ROOT = "${sdk}/share/android-sdk";
|
|
|
|
ANDROID_HOME = "${sdk}/share/android-sdk";
|
2022-11-05 11:51:36 +00:00
|
|
|
JAVA_HOME = pinnedJDK;
|
2023-08-06 10:23:46 +00:00
|
|
|
|
|
|
|
# Fix an issue with Flutter using an older version of aapt2, which does not know
|
|
|
|
# an used parameter.
|
|
|
|
GRADLE_OPTS = "-Dorg.gradle.project.android.aapt2FromMavenOverride=${sdk}/share/android-sdk/build-tools/34.0.0/aapt2";
|
2022-11-05 11:51:36 +00:00
|
|
|
};
|
|
|
|
});
|
|
|
|
}
|