Commit 36bddcd1 authored by dish's avatar dish
Browse files

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.
parent eab39ace
Loading
Loading
Loading
Loading
+12 −4
Original line number Diff line number Diff line
@@ -88,9 +88,17 @@ rustPlatform.buildRustPackage (finalAttrs: {
    pnpm build
  '';

  postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
  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;