diff --git a/externals/packages/weechat-matrix-rs/default.nix b/externals/packages/weechat-matrix-rs/default.nix new file mode 100644 index 0000000..bf7ff9a --- /dev/null +++ b/externals/packages/weechat-matrix-rs/default.nix @@ -0,0 +1,32 @@ +{ stdenv, lib, rustPlatform, fetchFromGitHub, pkg-config, cmake, openssl, llvmPackages, weechat }: + +rustPlatform.buildRustPackage rec { + pname = "weechat-matrix-rs"; + version = "20210530"; + + src = fetchFromGitHub { + owner = "poljar"; + repo = pname; + rev = "a846e76b7abf9b70fbcbf955255f99fde185b9cb"; + sha256 = "1gx5vxc8391i8cr6d8r6gwywypl0zn3d1xjydg6y6228qcxl3vmm"; + }; + + cargoSha256 = "0ikarh474dmbbmg6nz24fap6dqgxg0hy2kp3jpknaz8rgdvjsvjb"; + + WEECHAT_PLUGIN_FILE = "${weechat}/include/weechat/weechat-plugin.h"; + LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib"; + nativeBuildInputs = [ pkg-config cmake llvmPackages.clang ]; + buildInputs = [ openssl ]; + + preFixup = '' + mkdir -p $out/lib/weechat/plugins + mv $out/lib/libmatrix.so $out/lib/weechat/plugins/matrix.so + ''; + + meta = with lib; { + description = "Rust rewrite of the python weechat-matrix script."; + homepage = "https://github.com/poljar/weechat-matrix-rs"; + license = licenses.mit; + matinainers = [ maintainers.artemist ]; + }; +} diff --git a/system/starlight/audio.nix b/system/starlight/audio.nix deleted file mode 100644 index c0976cc..0000000 --- a/system/starlight/audio.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ ... }: - -{ - services.pipewire.config.pipewire = { - "context.properties"."default.clock.rate" = 96000; - "context.objects" - diff --git a/system/starlight/default.nix b/system/starlight/default.nix index b601061..232d309 100644 --- a/system/starlight/default.nix +++ b/system/starlight/default.nix @@ -67,7 +67,13 @@ }; boot.binfmt.emulatedSystems = [ "aarch64-linux" "riscv64-linux" ]; environment.systemPackages = with pkgs; [ - weechat + (weechat.override { + configure = { availablePlugins, ... }: { + plugins = (builtins.attrValues availablePlugins) ++ [ { + pluginFile = "${(callPackage ../../externals/packages/weechat-matrix-rs { })}/lib/weechat/plugins/matrix.so"; + } ]; + }; + }) ]; # Scanning