Merge pull request #270802 from figsoda/lact

lact: 0.4.4 -> 0.5.0
This commit is contained in:
Weijia Wang 2023-11-30 03:10:59 +01:00 committed by GitHub
commit 05f2f34d78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 14 deletions

View File

@ -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

View File

@ -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";