whalebird: apply PR feedback
This commit is contained in:
parent
e0de6de3da
commit
3643c79786
|
@ -1,5 +1,5 @@
|
||||||
diff --git a/pkgs/applications/misc/whalebird/default.nix b/pkgs/applications/misc/whalebird/default.nix
|
diff --git a/pkgs/applications/misc/whalebird/default.nix b/pkgs/applications/misc/whalebird/default.nix
|
||||||
index 9b8a7f0a348..0f60f74c91b 100644
|
index 9b8a7f0a348..7170a63ac7f 100644
|
||||||
--- a/pkgs/applications/misc/whalebird/default.nix
|
--- a/pkgs/applications/misc/whalebird/default.nix
|
||||||
+++ b/pkgs/applications/misc/whalebird/default.nix
|
+++ b/pkgs/applications/misc/whalebird/default.nix
|
||||||
@@ -3,11 +3,11 @@
|
@@ -3,11 +3,11 @@
|
||||||
|
@ -16,3 +16,12 @@ index 9b8a7f0a348..0f60f74c91b 100644
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
@@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
|
||||||
|
# Necessary steps to find the tray icon
|
||||||
|
asar extract opt/Whalebird/resources/app.asar "$TMP/work"
|
||||||
|
substituteInPlace $TMP/work/dist/electron/main.js \
|
||||||
|
- --replace "jo,\"tray_icon.png\"" "\"$out/opt/Whalebird/resources/build/icons/tray_icon.png\""
|
||||||
|
+ --replace "Do,\"tray_icon.png\"" "\"$out/opt/Whalebird/resources/build/icons/tray_icon.png\""
|
||||||
|
asar pack --unpack='{*.node,*.ftz,rect-overlay}' "$TMP/work" opt/Whalebird/resources/app.asar
|
||||||
|
|
||||||
|
runHook postBuild
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
diff --git a/pkgs/applications/misc/whalebird/default.nix b/pkgs/applications/misc/whalebird/default.nix
|
diff --git a/pkgs/applications/misc/whalebird/default.nix b/pkgs/applications/misc/whalebird/default.nix
|
||||||
index 7170a63ac7f..16b3e85e1ad 100644
|
index 7170a63ac7f..dcd88fb9a8b 100644
|
||||||
--- a/pkgs/applications/misc/whalebird/default.nix
|
--- a/pkgs/applications/misc/whalebird/default.nix
|
||||||
+++ b/pkgs/applications/misc/whalebird/default.nix
|
+++ b/pkgs/applications/misc/whalebird/default.nix
|
||||||
@@ -1,17 +1,35 @@
|
@@ -1,17 +1,35 @@
|
||||||
|
@ -12,7 +12,7 @@ index 7170a63ac7f..16b3e85e1ad 100644
|
||||||
+ desktopName = "Whalebird";
|
+ desktopName = "Whalebird";
|
||||||
+ genericName = "An Electron based Mastodon client for Windows, Mac and Linux";
|
+ genericName = "An Electron based Mastodon client for Windows, Mac and Linux";
|
||||||
+ categories = [ "Network" ];
|
+ categories = [ "Network" ];
|
||||||
+ exec = "opt/Whalebird/whalebird";
|
+ exec = "@out@/bin/whalebird";
|
||||||
+ icon = "whalebird";
|
+ icon = "whalebird";
|
||||||
+ name = "whalebird";
|
+ name = "whalebird";
|
||||||
+ };
|
+ };
|
||||||
|
@ -44,19 +44,22 @@ index 7170a63ac7f..16b3e85e1ad 100644
|
||||||
autoPatchelfHook
|
autoPatchelfHook
|
||||||
makeWrapper
|
makeWrapper
|
||||||
nodePackages.asar
|
nodePackages.asar
|
||||||
@@ -22,7 +40,10 @@ stdenv.mkDerivation rec {
|
@@ -19,10 +37,11 @@ stdenv.mkDerivation rec {
|
||||||
dontConfigure = true;
|
|
||||||
|
|
||||||
|
buildInputs = [ alsa-lib gtk3 libdbusmenu libxshmfence mesa nss ];
|
||||||
|
|
||||||
|
- dontConfigure = true;
|
||||||
|
-
|
||||||
unpackPhase = ''
|
unpackPhase = ''
|
||||||
- dpkg-deb -x ${src} ./
|
- dpkg-deb -x ${src} ./
|
||||||
+ mkdir -p ./opt
|
+ mkdir -p opt
|
||||||
+ tar -xf ${src} -C ./opt
|
+ tar -xf ${src} -C opt
|
||||||
+ # remove the version/target suffix from the untar'd directory
|
+ # remove the version/target suffix from the untar'd directory
|
||||||
+ mv ./opt/Whalebird-* ./opt/Whalebird
|
+ mv opt/Whalebird-* opt/Whalebird
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
@@ -41,12 +62,21 @@ stdenv.mkDerivation rec {
|
@@ -41,12 +60,23 @@ stdenv.mkDerivation rec {
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
|
|
||||||
mkdir $out
|
mkdir $out
|
||||||
|
@ -70,8 +73,10 @@ index 7170a63ac7f..16b3e85e1ad 100644
|
||||||
+ done
|
+ done
|
||||||
+
|
+
|
||||||
+ # install desktop item
|
+ # install desktop item
|
||||||
+ mkdir -p "$out/share"
|
+ mkdir -p "$out/share/applications"
|
||||||
+ ln -s "${desktopItem}/share/applications" "$out/share/applications"
|
+ substitute "${desktopItem}/share/applications/whalebird.desktop" \
|
||||||
|
+ "$out/share/applications/whalebird.desktop" \
|
||||||
|
+ --subst-var out
|
||||||
|
|
||||||
- substituteInPlace $out/share/applications/whalebird.desktop \
|
- substituteInPlace $out/share/applications/whalebird.desktop \
|
||||||
- --replace '/opt/Whalebird' $out/bin
|
- --replace '/opt/Whalebird' $out/bin
|
||||||
|
|
Loading…
Reference in New Issue
Block a user