Skip to content

Commit

Permalink
handheld-daemon-ui: init at 3.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
toast003 authored and SuperSandro2000 committed Jul 9, 2024
1 parent fd1b1ce commit 18cd880
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions pkgs/by-name/ha/handheld-daemon-ui/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
lib,
appimageTools,
fetchurl,
}:
let
pname = "handheld-daemon-ui";
version = "3.1.1";

src = fetchurl {
url = "https://github.com/hhd-dev/hhd-ui/releases/download/v${version}/hhd-ui.Appimage";
hash = "sha256-KH01MvcCbvCqjp1UZHnwfh9G3Yh50CO9Ecjl1Y8VY9E=";
};
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"
cp ${extractedFiles}/usr/share/icons $out/share -r
'';

meta = with lib; {
description = "The main UI for the Handheld Daemon";
homepage = "https://github.com/hhd-dev/hhd-ui";
license = licenses.gpl3Only;
maintainers = with maintainers; [ toast ];
mainProgram = "hhd-ui";
platforms = [ "x86_64-linux" ];
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
};
}

0 comments on commit 18cd880

Please sign in to comment.