fix segfault when launching anytype
This commit is contained in:
parent
5eeac5d0d3
commit
af4fe533d2
2 changed files with 47 additions and 1 deletions
|
@ -18,7 +18,7 @@
|
|||
name = "nixpkgs-patched";
|
||||
src = inputs.nixpkgs;
|
||||
patches = [
|
||||
|
||||
./patches/385029.patch
|
||||
];
|
||||
};
|
||||
nixosSystem = import (nixpkgs + "/nixos/lib/eval-config.nix");
|
||||
|
|
46
patches/385029.patch
Normal file
46
patches/385029.patch
Normal file
|
@ -0,0 +1,46 @@
|
|||
From 65872bc4686cabbfe1675976da5f562627ebeabf Mon Sep 17 00:00:00 2001
|
||||
From: TomaSajt <62384384+TomaSajt@users.noreply.github.com>
|
||||
Date: Tue, 25 Feb 2025 15:22:23 +0100
|
||||
Subject: [PATCH] anytype: build against electron ABI
|
||||
|
||||
---
|
||||
pkgs/by-name/an/anytype/package.nix | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/pkgs/by-name/an/anytype/package.nix b/pkgs/by-name/an/anytype/package.nix
|
||||
index d9bfc7fa42a6a..6d903771582bd 100644
|
||||
--- a/pkgs/by-name/an/anytype/package.nix
|
||||
+++ b/pkgs/by-name/an/anytype/package.nix
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
lib,
|
||||
callPackage,
|
||||
+ runCommand,
|
||||
fetchFromGitHub,
|
||||
buildNpmPackage,
|
||||
pkg-config,
|
||||
@@ -31,6 +32,12 @@ let
|
||||
rev = "822f8ea833a94fb48cd8e304ef8dc557b67a9f7b";
|
||||
hash = "sha256-fum8zLRXb8xW8TwNyelIZVZR6XXsdPHSt1WDo+TX4CU=";
|
||||
};
|
||||
+
|
||||
+ electron-headers = runCommand "electron-headers" { } ''
|
||||
+ mkdir -p $out
|
||||
+ tar -C $out --strip-components=1 -xvf ${electron.headers}
|
||||
+ '';
|
||||
+
|
||||
in
|
||||
buildNpmPackage {
|
||||
inherit pname version src;
|
||||
@@ -47,6 +54,11 @@ buildNpmPackage {
|
||||
];
|
||||
buildInputs = [ libsecret ];
|
||||
|
||||
+ npmFlags = [
|
||||
+ # keytar needs to be built against electron's ABI
|
||||
+ "--nodedir=${electron-headers}"
|
||||
+ ];
|
||||
+
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue