Update cargo dependencies

This commit is contained in:
Victor Fuentes 2023-02-06 17:55:19 -05:00
parent 8a1a4ba782
commit bd87e55f62
No known key found for this signature in database
GPG Key ID: 0A88B68D6A9ACAE0
6 changed files with 163 additions and 126 deletions

130
Cargo.lock generated
View File

@ -86,9 +86,9 @@ dependencies = [
[[package]]
name = "async-trait"
version = "0.1.60"
version = "0.1.64"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "677d1d8ab452a3936018a687b20e6f7cf5363d713b732b8884001317b0e48aa3"
checksum = "1cd7fce9ba8c3c042128ce72d8b2ddbf3a05747efb67ea0313c635e10bda47a2"
dependencies = [
"proc-macro2",
"quote",
@ -292,9 +292,9 @@ dependencies = [
[[package]]
name = "clap"
version = "4.0.29"
version = "4.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4d63b9e9c07271b9957ad22c173bae2a4d9a81127680962039296abcd2f8251d"
checksum = "f13b9c79b5d1dd500d20ef541215a6423c75829ef43117e1b4d17fd8af0b5d76"
dependencies = [
"bitflags",
"clap_derive",
@ -307,9 +307,9 @@ dependencies = [
[[package]]
name = "clap_derive"
version = "4.0.21"
version = "4.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0177313f9f02afc995627906bbd8967e2be069f5261954222dac78290c2b9014"
checksum = "684a277d672e91966334af371f1a7b5833f9aa00b07c84e92fbce95e00208ce8"
dependencies = [
"heck",
"proc-macro-error",
@ -355,6 +355,12 @@ version = "2.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "328b822bdcba4d4e402be8d9adb6eebf269f969f8eadef977a553ff3c4fbcb58"
[[package]]
name = "countme"
version = "3.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7704b5fdd17b18ae31c4c1da5a2e0305a2bf17b5249300a9ee9ed7b72114c636"
[[package]]
name = "cpufeatures"
version = "0.2.5"
@ -695,9 +701,9 @@ dependencies = [
[[package]]
name = "futures"
version = "0.3.25"
version = "0.3.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "38390104763dc37a5145a53c29c63c1290b5d316d6086ec32c293f6736051bb0"
checksum = "13e2792b0ff0340399d58445b88fd9770e3489eff258a4cbc1523418f12abf84"
dependencies = [
"futures-channel",
"futures-core",
@ -710,9 +716,9 @@ dependencies = [
[[package]]
name = "futures-channel"
version = "0.3.25"
version = "0.3.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed"
checksum = "2e5317663a9089767a1ec00a487df42e0ca174b61b4483213ac24448e4664df5"
dependencies = [
"futures-core",
"futures-sink",
@ -720,15 +726,15 @@ dependencies = [
[[package]]
name = "futures-core"
version = "0.3.25"
version = "0.3.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac"
checksum = "ec90ff4d0fe1f57d600049061dc6bb68ed03c7d2fbd697274c41805dcb3f8608"
[[package]]
name = "futures-executor"
version = "0.3.25"
version = "0.3.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7acc85df6714c176ab5edf386123fafe217be88c0840ec11f199441134a074e2"
checksum = "e8de0a35a6ab97ec8869e32a2473f4b1324459e14c29275d14b10cb1fd19b50e"
dependencies = [
"futures-core",
"futures-task",
@ -748,15 +754,15 @@ dependencies = [
[[package]]
name = "futures-io"
version = "0.3.25"
version = "0.3.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb"
checksum = "bfb8371b6fb2aeb2d280374607aeabfc99d95c72edfe51692e42d3d7f0d08531"
[[package]]
name = "futures-macro"
version = "0.3.25"
version = "0.3.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d"
checksum = "95a73af87da33b5acf53acfebdc339fe592ecf5357ac7c0a7734ab9d8c876a70"
dependencies = [
"proc-macro2",
"quote",
@ -765,21 +771,21 @@ dependencies = [
[[package]]
name = "futures-sink"
version = "0.3.25"
version = "0.3.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9"
checksum = "f310820bb3e8cfd46c80db4d7fb8353e15dfff853a127158425f31e0be6c8364"
[[package]]
name = "futures-task"
version = "0.3.25"
version = "0.3.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea"
checksum = "dcf79a1bf610b10f42aea489289c5a2c478a786509693b80cd39c44ccd936366"
[[package]]
name = "futures-util"
version = "0.3.25"
version = "0.3.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6"
checksum = "9c1d6de3acfef38d2be4b1f543f553131788603495be83da675e180c8d6b7bd1"
dependencies = [
"futures-channel",
"futures-core",
@ -1694,14 +1700,14 @@ dependencies = [
[[package]]
name = "nix-editor"
version = "0.3.0-beta.1"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "54cc1d93deb37efb27faaf8ffbdf9d0a536a371fb0c1e9dae2bffe01ba55f65a"
checksum = "a3f6bd8df3788c4d2c5c0a74957dc4d747808a3fe934e3d398cbaf6786f416ae"
dependencies = [
"clap 4.0.29",
"clap 4.1.4",
"nixpkgs-fmt",
"owo-colors",
"rnix",
"rnix 0.11.0",
"thiserror",
]
@ -1745,8 +1751,8 @@ dependencies = [
"crossbeam-channel 0.4.4",
"ignore",
"libc",
"rnix",
"rowan",
"rnix 0.10.2",
"rowan 0.12.6",
"serde_json",
"smol_str",
]
@ -1765,7 +1771,7 @@ dependencies = [
name = "nsc-helper"
version = "0.1.0"
dependencies = [
"clap 4.0.29",
"clap 4.1.4",
"users",
]
@ -1811,9 +1817,9 @@ dependencies = [
[[package]]
name = "once_cell"
version = "1.16.0"
version = "1.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860"
checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66"
[[package]]
name = "opaque-debug"
@ -2136,9 +2142,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
[[package]]
name = "quick-xml"
version = "0.25.0"
version = "0.27.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "58e21a144a0ffb5fad7b464babcdab934a325ad69b7c0373bcfef5cbd9799ca9"
checksum = "ffc053f057dd768a56f62cd7e434c42c831d296968997e9ac1f76ea7c2d14c41"
dependencies = [
"memchr",
"serde",
@ -2239,9 +2245,9 @@ checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848"
[[package]]
name = "relm4"
version = "0.5.0-beta.5"
version = "0.5.0-rc.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "78f3d1cf55679e62455a7cecb143a93a47123577b53007f73339411aaeb9e137"
checksum = "f58551ea79da1673b8b76d6d7439a9c62e3f09fdcd269c19bde77c0770fc4aa7"
dependencies = [
"async-trait",
"flume",
@ -2257,9 +2263,9 @@ dependencies = [
[[package]]
name = "relm4-components"
version = "0.5.0-beta.5"
version = "0.5.0-rc.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "19ac6f0899f58c73f01f6dcdf31717f02e9c3eaa51338a66a52f0e0c133f9d5f"
checksum = "81cf9006e56def0c7fb18ad43ea658e19bf2b7216b5bda816ce67d4b2cedb559"
dependencies = [
"log",
"once_cell",
@ -2269,9 +2275,9 @@ dependencies = [
[[package]]
name = "relm4-macros"
version = "0.5.0-beta.5"
version = "0.5.0-rc.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "01a9d8c4a1b1000ad963a3deed0db21084c2b337df3fb8a36acd06ea36e03ea2"
checksum = "215bd73732fae1b978f1274484bc48db07f11fe00fa309207fc541cc99148812"
dependencies = [
"proc-macro2",
"quote",
@ -2333,17 +2339,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8024a523e8836f1a5d051203dc00d833357fee94e351b51348dfaeca5364daa9"
dependencies = [
"cbitset",
"rowan",
"rowan 0.12.6",
"smol_str",
]
[[package]]
name = "rnix"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb35cedbeb70e0ccabef2a31bcff0aebd114f19566086300b8f42c725fc2cb5f"
dependencies = [
"rowan 0.15.10",
]
[[package]]
name = "rowan"
version = "0.12.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1b36e449f3702f3b0c821411db1cbdf30fb451726a9456dce5dabcd44420043"
dependencies = [
"countme",
"countme 2.0.4",
"hashbrown 0.9.1",
"memoffset 0.6.5",
"rustc-hash",
@ -2351,6 +2366,19 @@ dependencies = [
"text-size",
]
[[package]]
name = "rowan"
version = "0.15.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5811547e7ba31e903fe48c8ceab10d40d70a101f3d15523c847cce91aa71f332"
dependencies = [
"countme 3.0.1",
"hashbrown 0.12.3",
"memoffset 0.6.5",
"rustc-hash",
"text-size",
]
[[package]]
name = "rustc-hash"
version = "1.1.0"
@ -2635,9 +2663,9 @@ dependencies = [
[[package]]
name = "spdx"
version = "0.9.0"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a346909b3fd07776f9b96b98d4a58e3666f831c9a672c279b10f795a34c36425"
checksum = "52dd48832ddda0d79ca6062064d530680e24c5ee85ba1d9fae41f102b2d9f34f"
dependencies = [
"smallvec",
]
@ -2936,9 +2964,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
[[package]]
name = "tokio"
version = "1.23.0"
version = "1.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eab6d665857cc6ca78d6e80303a02cea7a7851e85dfbd77cbdc09bd129f1ef46"
checksum = "c8e00990ebabbe4c14c08aca901caed183ecd5c09562a12c824bb53d3c3fd3af"
dependencies = [
"autocfg",
"bytes",
@ -3049,18 +3077,18 @@ dependencies = [
[[package]]
name = "tracker"
version = "0.1.2"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5458a19f88ae9feb85b92b6c46adc1f5166efb15ceb1fdd57fedfe3c184af174"
checksum = "4948dd579c7facd8b583a8838956177740021c7bbcc1074ff49f7a5e76a150fd"
dependencies = [
"tracker-macros",
]
[[package]]
name = "tracker-macros"
version = "0.1.7"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0cac6de426774c1356e0d02c8735887fa8c7625fab19b6876a1cf88046306057"
checksum = "32b086e6cb7f65c79bc0b132db4e468c4159133c917da44e1b97594101e9e7e0"
dependencies = [
"proc-macro2",
"quote",

View File

@ -5,19 +5,19 @@ edition = "2021"
default-run = "nix-software-center"
[dependencies]
relm4 = { version = "0.5.0-beta.5", features = ["libadwaita", "macros"] }
relm4-components = { package = "relm4-components", version = "0.5.0-beta.5"}
relm4 = { version = "0.5.0-rc.2", features = ["libadwaita", "macros"] }
relm4-components = { package = "relm4-components", version = "0.5.0-rc.2"}
adw = { package = "libadwaita", version = "0.2", features = ["v1_2", "gtk_v4_6"] }
gtk = { package = "gtk4", version = "0.5", features = ["v4_6"] }
sourceview5 = { version = "0.5", features = ["v5_4"] }
tokio = { version = "1.21", features = ["rt", "macros", "time", "rt-multi-thread", "sync", "process"] }
tracker = "0.1"
tokio = { version = "1.25", features = ["rt", "macros", "time", "rt-multi-thread", "sync", "process"] }
tracker = "0.2"
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
serde_yaml = "0.9"
nix-editor = "0.3.0-beta.1"
nix-editor = "0.3.0"
nix-data = { git = "https://github.com/snowflakelinux/nix-data" }
sqlx = { version = "0.6", features = [ "runtime-tokio-native-tls" , "sqlite" ] }
@ -26,12 +26,12 @@ html2pango = "0.5"
log = "0.4"
pretty_env_logger = "0.4"
flate2 = "1.0"
quick-xml = { version = "0.25", features = ["serialize"] }
quick-xml = { version = "0.27", features = ["serialize"] }
rand = "0.8"
reqwest = { version = "0.11", features = ["blocking"] }
sha256 = "1.0"
sha256 = "1.1"
image = "0.24"
spdx = "0.9"
spdx = "0.10"
anyhow = "1.0"

View File

@ -20,7 +20,7 @@ pkgs.stdenv.mkDerivation rec {
cargoDeps = pkgs.rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-4blPvAvAZlGgQ4pVPwpekjbesMIUIJzpq2IKycF64ck=";
hash = "sha256-P04PDf6jKumCbeH4/adrW8xFCB/y7HCPQvF+Ev0dcR0=";
};
nativeBuildInputs = with pkgs; [

View File

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
clap = { version = "4.0", features = ["derive"] }
clap = { version = "4.1", features = ["derive"] }
users = "0.11"
[[bin]]

View File

@ -1018,7 +1018,7 @@ impl Component for PkgModel {
let scrnfactory = model.screenshots.widget();
relm4::set_global_css(
b".scrnbox {
".scrnbox {
border-left-width: 0;
border-right-width: 0;
border-top-width: 1px;

View File

@ -15,7 +15,13 @@ use crate::{
use adw::prelude::*;
use log::*;
use nix_data::config::configfile::NixDataConfig;
use relm4::{actions::*, factory::*, *};
use relm4::{
self,
actions::{RelmAction, RelmActionGroup},
factory::FactoryVecDeque,
Component, ComponentController, ComponentParts, ComponentSender, Controller, MessageBroker,
RelmWidgetExt, WorkerController,
};
use spdx::Expression;
use sqlx::{QueryBuilder, Sqlite, SqlitePool};
use std::{
@ -707,7 +713,7 @@ impl Component for AppModel {
warn!("Failed to update config");
}
let nixos = Path::new("/etc/NIXOS").exists();
if systemconfig.is_some() &&nixos {
if systemconfig.is_some() && nixos {
if self.syspkgtype == SystemPkgs::None {
if self.config.flake.is_some() {
self.syspkgtype = SystemPkgs::Flake;
@ -1429,18 +1435,18 @@ FROM pkgs JOIN meta ON (pkgs.attribute = meta.attribute) WHERE pkgs.attribute =
let mut installedsystemitems = vec![];
let mut updatesystemitems = vec![];
for installedpkg in &self.installedsystempkgs {
let (pname, version): (String, String) =
let versionpname: sqlx::Result<(String, String)> =
sqlx::query_as("SELECT pname, version FROM pkgs where attribute = $1")
.bind(installedpkg)
.fetch_one(pool)
.await
.unwrap();
let (description,): (String,) =
.await;
if let Ok((version, pname)) = versionpname {
let desc: sqlx::Result<(String,)> =
sqlx::query_as("SELECT description FROM meta WHERE attribute = $1")
.bind(installedpkg)
.fetch_one(pool)
.await
.unwrap();
.await;
if let Ok((description,)) = desc {
let mut name = pname.to_string();
let mut summary = if description.is_empty() {
None
@ -1481,8 +1487,9 @@ FROM pkgs JOIN meta ON (pkgs.attribute = meta.attribute) WHERE pkgs.attribute =
if let Ok(currentpool) =
&SqlitePool::connect(&format!("sqlite://{}", current)).await
{
let (currver,): (String,) =
sqlx::query_as("SELECT version FROM pkgs WHERE attribute = $1")
let (currver,): (String,) = sqlx::query_as(
"SELECT version FROM pkgs WHERE attribute = $1",
)
.bind(installedpkg)
.fetch_one(currentpool)
.await
@ -1503,6 +1510,8 @@ FROM pkgs JOIN meta ON (pkgs.attribute = meta.attribute) WHERE pkgs.attribute =
}
}
}
}
}
// Add NixOS system to update list
match self.syspkgtype {