-
Notifications
You must be signed in to change notification settings - Fork 279
/
Copy pathflake.nix
77 lines (72 loc) · 2.13 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# nix-ld should be enabled in configuration.nix:
# programs.nix-ld.enable = true;
# programs.nix-ld.libraries = with pkgs; [
# gtk3
# # Add any missing dynamic libraries for unpackaged programs
# # here, NOT in environment.systemPackages
# ];
{
description = "";
inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.0.tar.gz";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {
inherit system;
config = { allowUnfree = true; };
};
deps = [
pkgs.appimage-run
# commit hook
pkgs.husky
# build deps
pkgs.libxcrypt
pkgs.libsecret
pkgs.pkg-config
pkgs.jq
pkgs.nodejs_22
# keytar build fails on npm install because python312 has distutils removed
pkgs.python311
# electron binary launch deps.
# see also https://nix.dev/guides/faq#how-to-run-non-nix-executables
pkgs.glib
pkgs.nss
pkgs.nspr
pkgs.dbus
pkgs.atk
pkgs.cups
pkgs.libdrm
pkgs.gtk3
pkgs.adwaita-icon-theme
pkgs.pango
pkgs.cairo
pkgs.xorg.libX11
pkgs.xorg.libX11
pkgs.xorg.libXcomposite
pkgs.xorg.libXdamage
pkgs.xorg.libXext
pkgs.xorg.libXfixes
pkgs.xorg.libXrandr
pkgs.mesa
pkgs.expat
pkgs.libxkbcommon
pkgs.xorg.libxcb
pkgs.alsa-lib
pkgs.libGL
pkgs.gdk-pixbuf
];
XDG_ICONS_PATH = "${pkgs.hicolor-icon-theme}/share:${pkgs.adwaita-icon-theme}/share";
in {
devShell = pkgs.mkShell {
name = "anytype-ts-dev";
SERVER_PORT = 9090;
ANY_SYNC_NETWORK = "/home/zarkone/anytype/local-network-config.yml";
LD_LIBRARY_PATH = "${pkgs.lib.strings.makeLibraryPath deps}";
nativeBuildInputs = deps;
shellHook = ''
# fixes "No GSettings schemas" error
export XDG_DATA_DIRS=$GSETTINGS_SCHEMAS_PATH:$XDG_ICONS_PATH:$XDG_DATA_DIRS
'';
};
});
}