Update default.nix
This commit is contained in:
parent
91f1d94070
commit
199341c4ad
|
|
@ -1,9 +1,10 @@
|
||||||
{
|
{
|
||||||
appimageTools ? (import <nixpkgs> { }).appimageTools,
|
pkgs ? import <nixpkgs> { },
|
||||||
fetchurl ? (import <nixpkgs> { }).fetchurl,
|
appimageTools ? pkgs.appimageTools,
|
||||||
|
fetchurl ? pkgs.fetchurl,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
pname = "yak";
|
pname = "yaak";
|
||||||
version = "2025.7.3";
|
version = "2025.7.3";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
|
|
@ -14,31 +15,33 @@ in
|
||||||
appimageTools.wrapType2 {
|
appimageTools.wrapType2 {
|
||||||
inherit pname version src;
|
inherit pname version src;
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mkdir -p $out/share/applications
|
mkdir -p $out/share/pixmaps
|
||||||
mkdir -p $out/share/pixmaps
|
|
||||||
|
|
||||||
chmod +x ${src}
|
chmod +x ${src}
|
||||||
${src} --appimage-extract >/dev/null 2>&1 || true
|
${src} --appimage-extract >/dev/null 2>&1 || true
|
||||||
|
|
||||||
if [ -f squashfs-root/yaak.png ]; then
|
if [ -f squashfs-root/yaak.png ]; then
|
||||||
cp squashfs-root/yaak.png $out/share/pixmaps/yaak.png
|
mkdir -p $out/share/icons/hicolor/128x128/apps $out/share/icons/hicolor/64x64/apps $out/share/icons/hicolor/32x32/apps
|
||||||
elif [ -f squashfs-root/usr/share/icons/hicolor/32x32/apps/yaak-app.png ]; then
|
cp squashfs-root/yaak.png $out/share/icons/hicolor/128x128/apps/yaak.png
|
||||||
mkdir -p $out/share/icons/hicolor/32x32/apps
|
cp squashfs-root/yaak.png $out/share/icons/hicolor/64x64/apps/yaak.png
|
||||||
cp squashfs-root/usr/share/icons/hicolor/32x32/apps/yaak-app.png $out/share/pixmaps/yaak.png
|
cp squashfs-root/yaak.png $out/share/icons/hicolor/32x32/apps/yaak.png
|
||||||
fi
|
cp $out/share/icons/hicolor/128x128/apps/yaak.png $out/share/pixmaps/yaak.png || true
|
||||||
|
elif [ -f squashfs-root/usr/share/icons/hicolor/32x32/apps/yaak-app.png ]; then
|
||||||
|
mkdir -p $out/share/icons/hicolor/32x32/apps
|
||||||
|
cp squashfs-root/usr/share/icons/hicolor/32x32/apps/yaak-app.png $out/share/icons/hicolor/32x32/apps/yaak.png
|
||||||
|
cp $out/share/icons/hicolor/32x32/apps/yaak.png $out/share/pixmaps/yaak.png || true
|
||||||
|
fi
|
||||||
|
|
||||||
rm -rf squashfs-root
|
rm -rf squashfs-root
|
||||||
|
|
||||||
cat > $out/share/applications/${pname}.desktop <<DESKTOP
|
|
||||||
[Desktop Entry]
|
|
||||||
Name=Yaak
|
|
||||||
Comment=Yaak AppImage Launcher
|
|
||||||
Exec=$out/bin/${pname} %U
|
|
||||||
Icon=$out/share/pixmaps/yaak.png
|
|
||||||
Terminal=false
|
|
||||||
Type=Application
|
|
||||||
Categories=Utility;
|
|
||||||
DESKTOP
|
|
||||||
chmod 644 $out/share/applications/${pname}.desktop
|
|
||||||
'';
|
'';
|
||||||
|
desktopItems = [
|
||||||
|
(pkgs.makeDesktopItem {
|
||||||
|
name = "yaak";
|
||||||
|
desktopName = "Yaak";
|
||||||
|
comment = "Yaak API tool";
|
||||||
|
exec = "${pname}";
|
||||||
|
icon = "yaak";
|
||||||
|
categories = [ "Utility" ];
|
||||||
|
})
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue