mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-14 13:22:37 +00: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
|
let
|
||||||
pkgs = pkgsFor system;
|
pkgs = pkgsFor system;
|
||||||
paseo = pkgs.callPackage ./nix/package.nix { };
|
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
|
in
|
||||||
{
|
{
|
||||||
default = paseo;
|
default = paseo;
|
||||||
paseo = 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,
|
makeDesktopItem,
|
||||||
electron,
|
electron,
|
||||||
libuv,
|
libuv,
|
||||||
|
buildVersion,
|
||||||
# Reuse the daemon's prebuilt npm-deps FOD. Same lockfile, same content —
|
# Reuse the daemon's prebuilt npm-deps FOD. Same lockfile, same content —
|
||||||
# without this, the desktop drv produces a separately-named store path
|
# without this, the desktop drv produces a separately-named store path
|
||||||
# (`paseo-desktop-<v>-npm-deps`) and refetches the entire registry. Override
|
# (`paseo-desktop-<v>-npm-deps`) and refetches the entire registry. Override
|
||||||
@@ -126,6 +127,7 @@ buildNpmPackage {
|
|||||||
--mac \
|
--mac \
|
||||||
--publish never \
|
--publish never \
|
||||||
--config.electronDist="$electron_dist" \
|
--config.electronDist="$electron_dist" \
|
||||||
|
--config.buildVersion=${lib.escapeShellArg buildVersion} \
|
||||||
--config.mac.identity=null \
|
--config.mac.identity=null \
|
||||||
--config.mac.hardenedRuntime=false \
|
--config.mac.hardenedRuntime=false \
|
||||||
--config.mac.notarize=false
|
--config.mac.notarize=false
|
||||||
|
|||||||
@@ -42,6 +42,8 @@ mac:
|
|||||||
extraResources:
|
extraResources:
|
||||||
- from: bin/paseo
|
- from: bin/paseo
|
||||||
to: bin/paseo
|
to: bin/paseo
|
||||||
|
- from: assets/icon.png
|
||||||
|
to: icon.png
|
||||||
target:
|
target:
|
||||||
- dmg
|
- dmg
|
||||||
- zip
|
- zip
|
||||||
|
|||||||
@@ -651,8 +651,8 @@ function applyAppIcon(): void {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const iconPath = path.resolve(__dirname, "../assets/icon.png");
|
const iconPath = getWindowIconPath();
|
||||||
if (!existsSync(iconPath)) {
|
if (!iconPath) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user