about summary refs log tree commit diff
path: root/pkgs/applications/misc/simplenote
diff options
context:
space:
mode:
authorRobert Djubek <envy1988@gmail.com>2019-12-26 22:01:36 +0000
committerRobert Djubek <envy1988@gmail.com>2019-12-26 22:01:36 +0000
commitcc2037307bed926dc6f484f5b51a87fcdc36dfed (patch)
tree432b97d9a870fb1807a5f298097926328dd33a45 /pkgs/applications/misc/simplenote
parent690390d49349be4ac5cff7616dffc47ece45fb77 (diff)
downloadnixlib-cc2037307bed926dc6f484f5b51a87fcdc36dfed.tar
nixlib-cc2037307bed926dc6f484f5b51a87fcdc36dfed.tar.gz
nixlib-cc2037307bed926dc6f484f5b51a87fcdc36dfed.tar.bz2
nixlib-cc2037307bed926dc6f484f5b51a87fcdc36dfed.tar.lz
nixlib-cc2037307bed926dc6f484f5b51a87fcdc36dfed.tar.xz
nixlib-cc2037307bed926dc6f484f5b51a87fcdc36dfed.tar.zst
nixlib-cc2037307bed926dc6f484f5b51a87fcdc36dfed.zip
simplenote: fix libstdc++ error
Fixes a bug that was noticed during an automated version bump.

What was needed was to add an LD_LIBRARY_PATH entry for stdenv.cc.cc in
makeWrapper

```
--prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [ stdenv.cc.cc ] }" \
```

The error as seen in developer tools console was:

```
/nix/store/d4b2xcpdf4y4hspbwrmjdz540m493894-simplenote-1.12.0/opt/Simplenote/resources/electron.asar/renderer/init.js:158 Unable to load preload script: /nix/store/d4b2xcpdf4y4hspbwrmjdz540m493894-simplenote-1.12.0/opt/Simplenote/resources/app.asar/desktop/preload.js
(anonymous) @ /nix/store/d4b2xcpdf4y4hspbwrmjdz540m493894-simplenote-1.12.0/opt/Simplenote/resources/electron.asar/renderer/init.js:158
/nix/store/d4b2xcpdf4y4hspbwrmjdz540m493894-simplenote-1.12.0/opt/Simplenote/resources/electron.asar/renderer/init.js:159 Error: libstdc++.so.6: cannot open shared object file: No such file or directory
    at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:160:31)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:722)
    at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:169:18)
    at Module.load (internal/modules/cjs/loader.js:602)
    at tryModuleLoad (internal/modules/cjs/loader.js:541)
    at Function.Module._load (internal/modules/cjs/loader.js:533)
    at Module.require (internal/modules/cjs/loader.js:640)
    at require (internal/modules/cjs/helpers.js:20)
    at Object.<anonymous> (/nix/store/d4b2xcpdf4y4hspbwrmjdz540m493894-simplenote-1.12.0/opt/Simplenote/resources/app.asar/node_modules/@paulcbetts/spellchecker/lib/spellchecker.js:3)
    at Object.<anonymous> (/nix/store/d4b2xcpdf4y4hspbwrmjdz540m493894-simplenote-1.12.0/opt/Simplenote/resources/app.asar/node_modules/@paulcbetts/spellchecker/lib/spellchecker.js:116)
```
To (help) anyone that may find have errors like this in the future:

makeWrapper requiring the makeLibraryPath with stdenv.cc.cc is fairly common for electron apps.
At least ones that use dpkg on prebuilt debian .deb files (my `bitwarden` derivation requires it, too) that use gappsWrapperArgs

Thanks @ryantm / r-ryantm and @worldofpeace :)

Reference: https://github.com/NixOS/nixpkgs/pull/76421#pullrequestreview-336359695
Diffstat (limited to 'pkgs/applications/misc/simplenote')
-rw-r--r--pkgs/applications/misc/simplenote/default.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/pkgs/applications/misc/simplenote/default.nix b/pkgs/applications/misc/simplenote/default.nix
index 6e4a32b1ef11..b3ad833e3f2a 100644
--- a/pkgs/applications/misc/simplenote/default.nix
+++ b/pkgs/applications/misc/simplenote/default.nix
@@ -87,6 +87,7 @@ let
 
     postFixup = ''
       makeWrapper $out/opt/Simplenote/simplenote $out/bin/simplenote \
+        --prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [ stdenv.cc.cc ] }" \
         "''${gappsWrapperArgs[@]}"
     '';
   };