system76-power: use fetchCargoVendor and refactor (#388493)

This commit is contained in:
Sandro
2025-03-09 20:49:30 +01:00
committed by GitHub
2 changed files with 5 additions and 1810 deletions
File diff suppressed because it is too large Load Diff
+5 -9
View File
@@ -7,14 +7,14 @@
fetchFromGitHub,
}:
rustPlatform.buildRustPackage rec {
rustPlatform.buildRustPackage (finalAttrs: {
pname = "system76-power";
version = "1.2.3";
src = fetchFromGitHub {
owner = "pop-os";
repo = "system76-power";
rev = version;
tag = finalAttrs.version;
hash = "sha256-fyatAoWw/4ORojayA90er+H5weRykg+2ZzTsGThpW5g=";
};
@@ -24,12 +24,8 @@ rustPlatform.buildRustPackage rec {
libusb1
];
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"sysfs-class-0.1.3" = "sha256-ztfwfCRAkxUd/LLNG5fpVuFdgX+tCKL3F35qYJ2GDm8=";
};
};
useFetchCargoVendor = true;
cargoHash = "sha256-/dhuWgHysJ2oWgJ6jc9u4tsUOxlFt/awlK/9Jk1GHCM=";
postInstall = ''
install -D -m 0644 data/com.system76.PowerDaemon.conf $out/etc/dbus-1/system.d/com.system76.PowerDaemon.conf
@@ -52,4 +48,4 @@ rustPlatform.buildRustPackage rec {
ahoneybun
];
};
}
})