starc-flake/flake.nix

54 lines
1.4 KiB
Nix
Raw Normal View History

2024-01-24 20:50:46 +00:00
{
description = "An advanced text editor for script writers working professionally in film, novel, theatre, radio or writing for comic books.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = {
self,
nixpkgs,
}: let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
name = "starc";
version = "0.6.4";
2024-01-25 11:55:25 +00:00
2024-01-25 13:50:10 +00:00
icon = pkgs.fetchurl {
url = "https://github.com/story-apps/starc/blob/v${version}/img/starc.png";
sha256 = "sha256-wixqb1cV+WEhgxsl2CeOjrid4P0daHqh0O40h2iPst4=";
};
2024-01-25 11:55:25 +00:00
desktopItem = pkgs.makeDesktopItem {
exec = name;
2024-01-25 12:54:09 +00:00
inherit name;
desktopName = "Story Architect";
genericName = "Storywriting Software";
2024-01-25 13:50:10 +00:00
icon = name;
2024-01-25 12:54:09 +00:00
2024-01-25 13:50:10 +00:00
comment = "Advanced text editor for script writers.";
categories = ["Office" "TextEditor" "Utility"];
2024-01-25 11:55:25 +00:00
};
2024-01-24 20:50:46 +00:00
in {
packages.${system} = {
default = pkgs.appimageTools.wrapType1 {
inherit name;
src = pkgs.fetchurl {
url = "https://github.com/story-apps/starc/releases/download/v${version}/starc-setup.AppImage";
sha256 = "sha256-KLawvuLyqd7aPidH3ghr7mLl9NFQ7nduhnxAq0RpToQ=";
};
2024-01-25 11:55:25 +00:00
extraInstallCommands = ''
2024-01-25 13:50:10 +00:00
mkdir -p $out/share/icons/hicolor/1024x1024/apps/
ln -s "${icon}" $out/share/icons/hicolor/1024x1024/apps/${name}.png
2024-01-25 11:55:25 +00:00
ln -s "${desktopItem}/share" $out/share
'';
2024-01-24 20:50:46 +00:00
};
};
};
}