From 781441cc13f22a4e47b7ed4dbadc90f8490c4619 Mon Sep 17 00:00:00 2001 From: Werner Kroneman Date: Sun, 10 Dec 2023 18:51:06 +0100 Subject: [PATCH] Added the start of a package definition in flake.nix --- Cargo.lock | 2 +- Cargo.toml | 2 +- flake.nix | 22 +++++++++++++++++++++- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f40d408..dd3248e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4984,7 +4984,7 @@ dependencies = [ [[package]] name = "xmpp" version = "0.5.0" -source = "git+https://gitlab.com/werner.kroneman/xmpp-rs.git?rev=ecd0be4aad985e9812626d6c4499c2586c158aba#ecd0be4aad985e9812626d6c4499c2586c158aba" +source = "git+https://gitlab.com/xmpp-rs/xmpp-rs.git?rev=2b433d7036209f35ff7daf033a7b7692e58ab6c3#2b433d7036209f35ff7daf033a7b7692e58ab6c3" dependencies = [ "futures", "log", diff --git a/Cargo.toml b/Cargo.toml index 37d26dd..86069d7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,7 +29,7 @@ dioxus = "0.4.3" dioxus-desktop = "0.4.3" dioxus-hot-reload = { version="0.4.3", features=["file_watcher"] } futures-util = "0.3.29" -xmpp = { git = "https://gitlab.com/werner.kroneman/xmpp-rs.git", rev="ecd0be4aad985e9812626d6c4499c2586c158aba"} +xmpp = { git = "https://gitlab.com/xmpp-rs/xmpp-rs.git", rev="2b433d7036209f35ff7daf033a7b7692e58ab6c3" } keyring = "2.1.0" jid = { version = "0.10.0", features = ["serde"] } confy = "0.5.1" diff --git a/flake.nix b/flake.nix index a79af06..af31109 100644 --- a/flake.nix +++ b/flake.nix @@ -50,6 +50,26 @@ RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}"; }; - + packages.${system}.default = pkgs.rustPlatform.buildRustPackage { + name = "Dergchat"; + src = pkgs.lib.cleanSource ./.; + nativeBuildInputs = with pkgs; [ + pkg-config + ]; + buildInputs = with pkgs; [ + rust-toolchain + pkg-config + openssl + glibc + gtk3 + webkitgtk_4_1 + ]; + cargoLock = { + lockFile = ./Cargo.lock; + outputHashes = { + "xmpp-0.5.0" = "sha256-zRHI2qSCLgI/mrRrToRrDbvZYSa9vwxoDwghzNyN4mg="; + }; + }; + }; }; }