chiri: fix mainProgram on non-darwin (#509743)

This commit is contained in:
dish
2026-04-13 23:30:37 +00:00
committed by GitHub
+12 -4
View File
@@ -88,10 +88,18 @@ rustPlatform.buildRustPackage (finalAttrs: {
pnpm build
'';
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir -p $out/bin
makeWrapper "$out/Applications/Chiri.app/Contents/MacOS/chiri" "$out/bin/chiri"
'';
postInstall =
if stdenv.hostPlatform.isDarwin then
''
mkdir -p $out/bin
makeWrapper "$out/Applications/Chiri.app/Contents/MacOS/chiri" "$out/bin/chiri"
''
else
''
mv $out/bin/Chiri $out/bin/chiri
substituteInPlace $out/share/applications/Chiri.desktop \
--replace-fail "Exec=Chiri" "Exec=chiri"
'';
doCheck = false;