From 0b48bf4232aa46b9717715d0b043038b84c11350 Mon Sep 17 00:00:00 2001 From: figsoda Date: Tue, 28 Nov 2023 22:29:43 -0500 Subject: [PATCH] lact: 0.4.4 -> 0.5.0 Diff: https://github.com/ilya-zlobintsev/LACT/compare/v0.4.4...v0.5.0 --- pkgs/tools/system/lact/default.nix | 10 ++++++---- pkgs/tools/system/lact/pci-ids.patch | 10 ---------- 2 files changed, 6 insertions(+), 14 deletions(-) delete mode 100644 pkgs/tools/system/lact/pci-ids.patch diff --git a/pkgs/tools/system/lact/default.nix b/pkgs/tools/system/lact/default.nix index 234e58832fca..16ce41007ea7 100644 --- a/pkgs/tools/system/lact/default.nix +++ b/pkgs/tools/system/lact/default.nix @@ -1,6 +1,7 @@ { lib , rustPlatform , fetchFromGitHub +, blueprint-compiler , pkg-config , wrapGAppsHook , gdk-pixbuf @@ -13,18 +14,19 @@ rustPlatform.buildRustPackage rec { pname = "lact"; - version = "0.4.4"; + version = "0.5.0"; src = fetchFromGitHub { owner = "ilya-zlobintsev"; repo = "LACT"; rev = "v${version}"; - hash = "sha256-5tFXwx76KudojKnynCB+cnHcClB/JJD+9ugwxHG5xy4="; + hash = "sha256-B3YAlEKELbHGIQ8AIvortYZsHY6wsuaFxm9lC9Uh+Zg="; }; - cargoHash = "sha256-QnJmczOep9XtPoNolrO2DSj+g6qLLowd4rgWQilnV+U="; + cargoHash = "sha256-MbE6OrYJGPoQPQggxa9dssx8Nc6/5w53V58E1yLLeq0="; nativeBuildInputs = [ + blueprint-compiler pkg-config wrapGAppsHook ]; @@ -53,7 +55,7 @@ rustPlatform.buildRustPackage rec { pushd $cargoDepsCopy/pciid-parser oldHash=$(sha256sum src/lib.rs | cut -d " " -f 1) - sed 's|@hwdata@|${hwdata}|g' < ${./pci-ids.patch} | patch -p1 + substituteInPlace src/lib.rs --subst-var-by hwdata ${hwdata} substituteInPlace .cargo-checksum.json \ --replace $oldHash $(sha256sum src/lib.rs | cut -d " " -f 1) popd diff --git a/pkgs/tools/system/lact/pci-ids.patch b/pkgs/tools/system/lact/pci-ids.patch deleted file mode 100644 index e861ade68ace..000000000000 --- a/pkgs/tools/system/lact/pci-ids.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/src/lib.rs -+++ b/src/lib.rs -@@ -18,7 +18,7 @@ use std::{ - }; - use tracing::trace; - --const DB_PATHS: &[&str] = &["/usr/share/hwdata/pci.ids", "/usr/share/misc/pci.ids"]; -+const DB_PATHS: &[&str] = &["@hwdata@/share/hwdata/pci.ids"]; - #[cfg(feature = "online")] - const URL: &str = "https://pci-ids.ucw.cz/v2.2/pci.ids";