mirror of
https://github.com/getpaseo/paseo.git
synced 2026-09-14 20:36:44 +08:00
Fix Darwin Nix desktop app icon (#2783)
* Fix Darwin Nix desktop app icon * Refresh Darwin Nix bundle identity
This commit is contained in:
@@ -26,11 +26,22 @@
|
||||
let
|
||||
pkgs = pkgsFor system;
|
||||
paseo = pkgs.callPackage ./nix/package.nix { };
|
||||
versionParts = pkgs.lib.splitString "." paseo.version;
|
||||
sourceRevision = if self ? revCount && self.revCount != null then self.revCount else 0;
|
||||
buildRevision = sourceRevision - (sourceRevision / 10000) * 10000;
|
||||
desktopBuildVersion = pkgs.lib.concatStringsSep "." [
|
||||
(builtins.elemAt versionParts 0)
|
||||
(builtins.elemAt versionParts 1)
|
||||
(toString buildRevision)
|
||||
];
|
||||
in
|
||||
{
|
||||
default = paseo;
|
||||
paseo = paseo;
|
||||
desktop = pkgs.callPackage ./nix/desktop-package.nix { inherit paseo; };
|
||||
desktop = pkgs.callPackage ./nix/desktop-package.nix {
|
||||
inherit paseo;
|
||||
buildVersion = desktopBuildVersion;
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
makeDesktopItem,
|
||||
electron,
|
||||
libuv,
|
||||
buildVersion,
|
||||
# Reuse the daemon's prebuilt npm-deps FOD. Same lockfile, same content —
|
||||
# without this, the desktop drv produces a separately-named store path
|
||||
# (`paseo-desktop-<v>-npm-deps`) and refetches the entire registry. Override
|
||||
@@ -126,6 +127,7 @@ buildNpmPackage {
|
||||
--mac \
|
||||
--publish never \
|
||||
--config.electronDist="$electron_dist" \
|
||||
--config.buildVersion=${lib.escapeShellArg buildVersion} \
|
||||
--config.mac.identity=null \
|
||||
--config.mac.hardenedRuntime=false \
|
||||
--config.mac.notarize=false
|
||||
|
||||
@@ -42,6 +42,8 @@ mac:
|
||||
extraResources:
|
||||
- from: bin/paseo
|
||||
to: bin/paseo
|
||||
- from: assets/icon.png
|
||||
to: icon.png
|
||||
target:
|
||||
- dmg
|
||||
- zip
|
||||
|
||||
@@ -651,8 +651,8 @@ function applyAppIcon(): void {
|
||||
return;
|
||||
}
|
||||
|
||||
const iconPath = path.resolve(__dirname, "../assets/icon.png");
|
||||
if (!existsSync(iconPath)) {
|
||||
const iconPath = getWindowIconPath();
|
||||
if (!iconPath) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user