-
-
Save jtojnar/1e115f666b6bd49dae268ae9d9b16ccd to your computer and use it in GitHub Desktop.
In-progress attempt to package weechat-matrix-rs for nixpkgs; this is one of several files that would be needed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ cmake | |
, fetchFromGitHub | |
, lib | |
, libclang | |
, clang | |
, openssl | |
, olm | |
, glibc | |
, pkg-config | |
, rustPlatform | |
, stdenv | |
, weechat-unwrapped | |
}: | |
let clangVersion = lib.getVersion libclang; | |
in | |
rustPlatform.buildRustPackage rec { | |
pname = "weechat-matrix-rs"; | |
version = "0.1.0"; | |
/* | |
src = fetchFromGitHub { | |
owner = "poljar"; | |
repo = "weechat-matrix-rs"; | |
rev = "a846e76b7abf9b70fbcbf955255f99fde185b9cb"; | |
sha256 = "1gx5vxc8391i8cr6d8r6gwywypl0zn3d1xjydg6y6228qcxl3vmm"; | |
}; | |
*/ | |
src = ./weechat-matrix-rs; # DO NOT SUBMIT | |
#cargoSha256 = "1gx5vxc8391i8cr6d8r6gwywypl0zn3d1xjydg6y6228qcxl3vmm"; | |
cargoSha256 = "0ki59fi6ylsxlzh9bjg50jz09p2vpnxsgx1w5iap9wbqzq9hichk"; # DO NOT SUBMIT | |
nativeBuildInputs = [ | |
cmake # for libolm-sys | |
libclang | |
pkg-config | |
weechat-unwrapped | |
]; | |
buildInputs = [ | |
openssl | |
olm # this is not used since https://gitlab.gnome.org/BrainBlasted/olm-sys/-/commit/fe6eb98d2573b3f21916f73667cd67b57737ec6f builds the vendored libolm | |
]; | |
preBuild = '' | |
export BINDGEN_EXTRA_CLANG_ARGS='-I"${clang.out}/resource-root/include" -I"${glibc.dev}/include"' | |
''; | |
OLM_LINK_VARIANT = "dylib"; | |
WEECHAT_BUNDLED = "1"; | |
LIBCLANG_PATH = "${libclang.lib}/lib"; | |
WEECHAT_PLUGIN_FILE = "${weechat-unwrapped}/include/weechat/weechat-plugin.h"; | |
meta = with lib; { | |
description = "A Rust plugin for Weechat that lets Weechat communicate over the Matrix protocol"; | |
homepage = "https://github.com/poljar/weechat-matrix-rs"; | |
license = licenses.isc; | |
platforms = platforms.unix; | |
maintainers = with maintainers; [ irenes ]; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment