Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

starc: init at 0.7.5 #354961

Merged
merged 1 commit into from
Dec 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions pkgs/by-name/st/starc/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
stdenvNoCC,
lib,
fetchurl,
appimageTools,
makeWrapper,
}:

stdenvNoCC.mkDerivation (finalAttrs: {
pname = "starc";
version = "0.7.5";

src = fetchurl {
url = "https://github.com/story-apps/starc/releases/download/v${finalAttrs.version}/starc-setup.AppImage";
hash = "sha256-KAY04nXVyXnjKJxzh3Pvi50Vs0EPbLk0VgfZuz7MQR0=";
};

dontUnpack = true;

nativeBuildInputs = [ makeWrapper ];

installPhase =
let
appimageContents = appimageTools.extract { inherit (finalAttrs) pname version src; };
starc-unwrapped = appimageTools.wrapType2 { inherit (finalAttrs) pname version src; };
in
''
runHook preInstall

# Fixup desktop item icons
install -D ${appimageContents}/starc.desktop -t $out/share/applications/

substituteInPlace $out/share/applications/starc.desktop \
--replace-fail "Icon=starc" "${''
Icon=dev.storyapps.starc
StartupWMClass=Story Architect''}"

cp -r ${appimageContents}/share/* $out/share/

makeWrapper ${starc-unwrapped}/bin/starc $out/bin/starc \
--unset QT_PLUGIN_PATH
Comment on lines +40 to +41
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will technically be a double wrapper (starc -> starc-unwrapped -> bwrap of appimage), but I don't think it really matters here.


runHook postInstall
'';

meta = {
description = "Intuitive screenwriting app that streamlines the writing process";
homepage = "https://starc.app/";
mainProgram = "starc";
license = lib.licenses.unfree;
maintainers = with lib.maintainers; [ pancaek ];
platforms = [ "x86_64-linux" ];
};
})
Loading