This commit is contained in:
2026-05-24 02:40:17 -03:00
parent af8bc99e81
commit f9335a42d6
3 changed files with 52 additions and 30 deletions
+24 -13
View File
@@ -1,8 +1,5 @@
{ { lib, pkgs, ... }:
lib,
pkgs,
...
}:
pkgs.appimageTools.wrapType2 rec { pkgs.appimageTools.wrapType2 rec {
pname = "hayase"; pname = "hayase";
version = "6.4.67"; version = "6.4.67";
@@ -12,22 +9,36 @@ pkgs.appimageTools.wrapType2 rec {
hash = "sha256-npUSNtiCKTcAK2nOta225W9+07Rsm235vsiAAAALVFU="; hash = "sha256-npUSNtiCKTcAK2nOta225W9+07Rsm235vsiAAAALVFU=";
}; };
nativeBuildInputs = with pkgs; [ makeWrapperArgs = [
makeWrapper "--add-flags"
"--ozone-platform=wayland"
]; ];
extraInstallCommands = extraInstallCommands =
let let
contents = pkgs.appimageTools.extractType2 { inherit pname version src; }; contents = pkgs.appimageTools.extract { inherit pname version src; };
in in
'' ''
mkdir -p "$out/share/applications" mkdir -p "$out/share/applications"
mkdir -p "$out/share/lib/hayase" mkdir -p "$out/share/lib/hayase"
cp -r ${contents}/{locales,resources} "$out/share/lib/hayase"
cp -r ${contents}/usr/share/* "$out/share" if [ -d ${contents}/resources ]; then
cp "${contents}/${pname}.desktop" "$out/share/applications/" cp -r ${contents}/resources "$out/share/lib/hayase/"
wrapProgram $out/bin/hayase --add-flags "--ozone-platform=wayland" fi
substituteInPlace $out/share/applications/${pname}.desktop --replace-fail 'Exec=AppRun' 'Exec=${meta.mainProgram}'
if [ -d ${contents}/locales ]; then
cp -r ${contents}/locales "$out/share/lib/hayase/"
fi
if [ -d ${contents}/usr/share ]; then
cp -r ${contents}/usr/share/* "$out/share/"
fi
if [ -f ${contents}/*.desktop ]; then
install -Dm444 ${contents}/*.desktop "$out/share/applications/hayase.desktop"
substituteInPlace "$out/share/applications/hayase.desktop" \
--replace-fail 'Exec=AppRun' 'Exec=hayase'
fi
''; '';
meta = { meta = {
+7 -2
View File
@@ -14,7 +14,12 @@ pkgs.appimageTools.wrapType2 rec {
contents = pkgs.appimageTools.extract { inherit pname version src; }; contents = pkgs.appimageTools.extract { inherit pname version src; };
in in
'' ''
install -m 444 -D ${contents}/${pname}.desktop -t $out/share/applications if [ -f ${contents}/*.desktop ]; then
cp -r ${contents}/usr/share/icons $out/share install -Dm444 ${contents}/*.desktop -t $out/share/applications
fi
if [ -d ${contents}/usr/share/icons ]; then
cp -r ${contents}/usr/share/icons $out/share
fi
''; '';
} }
+21 -15
View File
@@ -1,8 +1,5 @@
{ { lib, pkgs, ... }:
lib,
pkgs,
...
}:
pkgs.appimageTools.wrapType2 rec { pkgs.appimageTools.wrapType2 rec {
pname = "shiru"; pname = "shiru";
version = "v6.6.0"; version = "v6.6.0";
@@ -12,22 +9,31 @@ pkgs.appimageTools.wrapType2 rec {
hash = "sha256-Y7R8gKsPm7NmzKXC0C24KqY1s7boWal3w5Lin35eswk="; hash = "sha256-Y7R8gKsPm7NmzKXC0C24KqY1s7boWal3w5Lin35eswk=";
}; };
nativeBuildInputs = with pkgs; [
makeWrapper
];
extraInstallCommands = extraInstallCommands =
let let
contents = pkgs.appimageTools.extractType2 { inherit pname version src; }; contents = pkgs.appimageTools.extract { inherit pname version src; };
in in
'' ''
mkdir -p "$out/share/applications" mkdir -p "$out/share/applications"
mkdir -p "$out/share/lib/shiru" mkdir -p "$out/share/lib/shiru"
cp -r ${contents}/{locales,resources} "$out/share/lib/shiru"
cp -r ${contents}/usr/share/* "$out/share" if [ -d ${contents}/resources ]; then
cp "${contents}/${pname}.desktop" "$out/share/applications/" cp -r ${contents}/resources "$out/share/lib/shiru/"
wrapProgram $out/bin/shiru --add-flags "--ozone-platform=wayland" fi
substituteInPlace $out/share/applications/${pname}.desktop --replace-fail 'Exec=AppRun' 'Exec=${meta.mainProgram}'
if [ -d ${contents}/locales ]; then
cp -r ${contents}/locales "$out/share/lib/shiru/"
fi
if [ -d ${contents}/usr/share ]; then
cp -r ${contents}/usr/share/* "$out/share/"
fi
if [ -f ${contents}/*.desktop ]; then
install -Dm444 ${contents}/*.desktop "$out/share/applications/shiru.desktop"
substituteInPlace "$out/share/applications/shiru.desktop" \
--replace-fail 'Exec=AppRun' 'Exec=shiru'
fi
''; '';
meta = { meta = {