turnon: fix crashing due to missing gschema file (#384547)

This commit is contained in:
Aleksana
2025-02-24 15:52:27 +08:00
committed by GitHub
+21 -6
View File
@@ -8,21 +8,31 @@
libadwaita,
blueprint-compiler,
wrapGAppsHook4,
gsettings-desktop-schemas,
}:
rustPlatform.buildRustPackage rec {
pname = "turnon";
version = "2.3.1";
version = "2.3.4";
src = fetchFromGitHub {
owner = "swsnr";
repo = "turnon";
rev = "v${version}";
hash = "sha256-Dl0uTPXy57W18WBxHpytL6Nq9tTrzYOdC3u1O4Dnm3w=";
hash = "sha256-eKJRyQMZOa/QRUW0VQ0EkXbJSMcYHfCC9wTs0YEB1yo=";
};
useFetchCargoVendor = true;
cargoHash = "sha256-EL7xLXtOzvitVMsDeMUcLR9hdvM2wjBZBEgJPJLanUE=";
cargoHash = "sha256-SjENjQjdg5Vrpd911QOcH9lmW7+BACaN4a/oGb2miI4=";
doCheck = true;
checkFlags = [
# Skipped due to "Permission denied (os error 13)"
"--skip=net::ping::tests::ping_loopback_ipv4"
"--skip=net::ping::tests::ping_loopback_ipv6"
"--skip=net::ping::tests::ping_with_timeout_unroutable"
];
nativeBuildInputs = [
cairo
@@ -34,13 +44,18 @@ rustPlatform.buildRustPackage rec {
buildInputs = [
libadwaita
gsettings-desktop-schemas
];
strictDeps = true;
preBuild = ''
blueprint-compiler format resources/**/*.blp
'';
postInstall =
# The build.rs compiles the settings schema and writes the compiled file next to the .xml file.
# This copies the compiled file to a path that can be detected by gsettings-desktop-schemas
''
mkdir -p "$out/share/glib-2.0/schemas"
cp "schemas/gschemas.compiled" "$out/share/glib-2.0/schemas"
'';
meta = {
description = "Turn on devices in your local network";