used embeded .desktop file and icons
This commit is contained in:
parent
63b45642b8
commit
044bcc975b
21
flake.nix
21
flake.nix
@ -15,31 +15,28 @@
|
|||||||
name = "starc";
|
name = "starc";
|
||||||
version = "0.6.4";
|
version = "0.6.4";
|
||||||
|
|
||||||
appImage = pkgs.fetchurl {
|
src = pkgs.fetchurl {
|
||||||
url = "https://github.com/story-apps/starc/releases/download/v${version}/starc-setup.AppImage";
|
url = "https://github.com/story-apps/starc/releases/download/v${version}/starc-setup.AppImage";
|
||||||
sha256 = "sha256-KLawvuLyqd7aPidH3ghr7mLl9NFQ7nduhnxAq0RpToQ=";
|
sha256 = "sha256-KLawvuLyqd7aPidH3ghr7mLl9NFQ7nduhnxAq0RpToQ=";
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
packages.${system} = {
|
packages.${system} = {
|
||||||
default = pkgs.appimageTools.wrapType2 {
|
default = pkgs.appimageTools.wrapType2 {
|
||||||
inherit name;
|
inherit name src;
|
||||||
|
|
||||||
src = appImage;
|
|
||||||
|
|
||||||
extraInstallCommands = let
|
extraInstallCommands = let
|
||||||
contents = pkgs.appimageTools.extract {
|
contents = pkgs.appimageTools.extract {
|
||||||
src = appImage;
|
inherit name src;
|
||||||
pname = name;
|
|
||||||
inherit version;
|
|
||||||
};
|
};
|
||||||
in ''
|
in ''
|
||||||
# Install .desktop file
|
# Install .desktop file
|
||||||
mkdir -p $out/share/applications
|
install -m 444 ${contents}/${name}.desktop -Dt $out/share/applications
|
||||||
cp ${contents}/${name}.desktop $out/share/applications
|
|
||||||
|
|
||||||
# Install icons
|
# Install icons
|
||||||
mkdir -p $out/share
|
for file in $(find ${contents}/share/icons -type f); do
|
||||||
cp -r ${contents}/share/icons $out/share
|
directory=$(dirname ''${file#${contents}})
|
||||||
|
install -m 444 $file -D $out/$directory/${name}.png
|
||||||
|
done
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -47,7 +44,7 @@
|
|||||||
apps.${system} = {
|
apps.${system} = {
|
||||||
dev = {
|
dev = {
|
||||||
program = "${pkgs.writeShellScript "download-appimage" ''
|
program = "${pkgs.writeShellScript "download-appimage" ''
|
||||||
${pkgs.curl}/bin/curl ${appImage.url} -Lo ${name}.AppImage
|
${pkgs.curl}/bin/curl ${src.url} -Lo ${name}.AppImage
|
||||||
''}";
|
''}";
|
||||||
type = "app";
|
type = "app";
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user