Merge release-24.05 into staging-next-24.05

This commit is contained in:
github-actions[bot]
2024-11-24 00:20:52 +00:00
committed by GitHub
5 changed files with 66 additions and 8 deletions

View File

@@ -11,6 +11,11 @@ in
enable = mkEnableOption "Handheld Daemon";
package = mkPackageOption pkgs "handheld-daemon" { };
ui = {
enable = mkEnableOption "Handheld Daemon UI";
package = mkPackageOption pkgs "handheld-daemon-ui" { };
};
user = mkOption {
type = types.str;
description = ''
@@ -20,7 +25,10 @@ in
};
config = mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
services.handheld-daemon.ui.enable = mkDefault true;
environment.systemPackages = [
cfg.package
] ++ lib.optional cfg.ui.enable cfg.ui.package;
services.udev.packages = [ cfg.package ];
systemd.packages = [ cfg.package ];
@@ -31,6 +39,11 @@ in
restartIfChanged = true;
path = mkIf cfg.ui.enable [
cfg.ui.package
pkgs.lsof
];
serviceConfig = {
ExecStart = "${ lib.getExe cfg.package } --user ${ cfg.user }";
Nice = "-12";

View File

@@ -2797,7 +2797,7 @@ let
hash = "sha256-sHeaMMr5hmQ0kAFZxxMiRk6f0mfjkg2XMnA4Gf+DHwA=";
};
meta = {
license = lib.licenses.mit;
license = lib.licenses.unfree;
};
};

View File

@@ -26,5 +26,8 @@ stdenv.mkDerivation rec {
license = licenses.unfree;
platforms = platforms.all;
maintainers = with maintainers; [ ];
knownVulnerabilities = [
"CVE-2018-13417"
];
};
}

View File

@@ -0,0 +1,42 @@
{
lib,
appimageTools,
fetchurl,
}:
let
pname = "handheld-daemon-ui";
version = "3.2.3";
src = fetchurl {
url = "https://github.com/hhd-dev/hhd-ui/releases/download/v${version}/hhd-ui.Appimage";
hash = "sha256-VhJrOvE+BebJIAeQlwOOsPfqSrvBnJQavGT7glTrG2o=";
};
extractedFiles = appimageTools.extractType2 { inherit pname version src; };
in
appimageTools.wrapType2 {
inherit pname version src;
extraInstallCommands = ''
# Handheld-daemon expects the UI binary to be called hhd-ui
mv $out/bin/${pname}* $out/bin/hhd-ui
mkdir -p $out/share/applications
substitute ${extractedFiles}/hhd-ui.desktop \
$out/share/applications/hhd-ui.desktop \
--replace-fail "Exec=AppRun" "Exec=hhd-ui" \
--replace-fail "Categories=game;" "Categories=Game;"
iconDir=$out/share/icons/hicolor/512x512/apps
mkdir -p $iconDir
cp ${extractedFiles}/hhd-ui.png $iconDir
'';
meta = {
description = "UI for the Handheld Daemon";
homepage = "https://github.com/hhd-dev/hhd-ui";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ toast ];
mainProgram = "hhd-ui";
platforms = [ "x86_64-linux" ];
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
};
}

View File

@@ -1,14 +1,14 @@
{
"darwin": {
"hash": "sha256-7lxfxKiZ8VxXLGY7ma+ctJzGhKZZgUvtidJDoSjCEVA=",
"version": "0.2024.11.12.08.02.stable_02"
"hash": "sha256-zvM7CcWYFXMN9dLoJqXnQlENmWDGYRKXQACtUQnXmmE=",
"version": "0.2024.11.19.08.02.stable_01"
},
"linux_x86_64": {
"hash": "sha256-41icbHntPT52Tc8iW7Tgjr4Su2DkI0SI45d2mQF+9hg=",
"version": "0.2024.11.12.08.02.stable_02"
"hash": "sha256-4uYVA+6NI11X/rYwEzHeTiPnDyntpZcBBBCiZkc9ik8=",
"version": "0.2024.11.19.08.02.stable_01"
},
"linux_aarch64": {
"hash": "sha256-r4PYBhJXgB7tTxMP/W/ZuxdsrvVs1BOMpBQIJwZv8uI=",
"version": "0.2024.11.12.08.02.stable_02"
"hash": "sha256-3Tx/NcWV0zyTRp5FVqWTfnhXoxrW3ph/Ytc2tjfNhcs=",
"version": "0.2024.11.19.08.02.stable_01"
}
}