mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
feat(flake): support darwin
This commit is contained in:
parent
95641a3b6d
commit
26fcc4fb24
16
flake.nix
16
flake.nix
@ -27,23 +27,35 @@
|
|||||||
pnpm
|
pnpm
|
||||||
stdenv
|
stdenv
|
||||||
wrapGAppsHook3
|
wrapGAppsHook3
|
||||||
|
xcodebuild
|
||||||
|
darwin
|
||||||
;
|
;
|
||||||
desktop = stdenv.mkDerivation (finalAttrs: {
|
desktop = stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "triliumnext-desktop";
|
pname = "triliumnext-desktop";
|
||||||
version = packageJSON.version;
|
version = packageJSON.version;
|
||||||
src = lib.cleanSource ./.;
|
src = lib.cleanSource ./.;
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs =
|
||||||
|
[
|
||||||
pnpm.configHook
|
pnpm.configHook
|
||||||
nodejs
|
nodejs
|
||||||
nodejs.python
|
nodejs.python
|
||||||
copyDesktopItems
|
copyDesktopItems
|
||||||
makeBinaryWrapper
|
makeBinaryWrapper
|
||||||
wrapGAppsHook3
|
wrapGAppsHook3
|
||||||
|
]
|
||||||
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||||
|
xcodebuild
|
||||||
|
darwin.cctools
|
||||||
];
|
];
|
||||||
|
|
||||||
dontWrapGApps = true;
|
dontWrapGApps = true;
|
||||||
|
|
||||||
|
preBuild = lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||||
|
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
|
||||||
|
node_modules/.pnpm/sass-embedded-linux-x64@*/node_modules/sass-embedded-linux-x64/dart-sass/src/dart
|
||||||
|
'';
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
runHook preBuild
|
runHook preBuild
|
||||||
|
|
||||||
@ -51,8 +63,6 @@
|
|||||||
export NX_TUI=false
|
export NX_TUI=false
|
||||||
export NX_DAEMON=false
|
export NX_DAEMON=false
|
||||||
|
|
||||||
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
|
|
||||||
node_modules/.pnpm/sass-embedded-linux-x64@*/node_modules/sass-embedded-linux-x64/dart-sass/src/dart
|
|
||||||
pnpm nx run desktop:build --outputStyle stream --verbose
|
pnpm nx run desktop:build --outputStyle stream --verbose
|
||||||
|
|
||||||
# Rebuild dependencies
|
# Rebuild dependencies
|
||||||
|
Loading…
x
Reference in New Issue
Block a user