mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-03 19:43:30 +00:00
d5808aee19
Co-authored-by: Sandro <sandro.jaeckel@gmail.com> Co-authored-by: Arne Keller <2012gdwu+github@posteo.de>
43 lines
1.2 KiB
Nix
43 lines
1.2 KiB
Nix
{
|
|
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 ];
|
|
};
|
|
}
|