forked from NixOS/nixpkgs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
handheld-daemon-ui: init at 3.2.3 (NixOS#305027)
Co-authored-by: Sandro <[email protected]> Co-authored-by: Arne Keller <[email protected]>
- Loading branch information
1 parent
026f90f
commit d5808ae
Showing
2 changed files
with
56 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ]; | ||
}; | ||
} |