chiri: fix mainProgram on non-darwin

The binary was still called `Chiri` on non-darwin platforms, so it needs
to be renamed to `chiri` so that `nix run nixpkgs#chiri` runs without
warnings from nix.
This commit is contained in:
dish
2026-04-13 17:44:48 -04:00
parent eab39ace5b
commit 36bddcd1a5
+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;