Created
September 26, 2024 13:59
-
-
Save zarkone/27a4d9478c699e1675d5343ce08e9073 to your computer and use it in GitHub Desktop.
anytype-ts flake.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# also, add nix-ld to configuration.nix: | |
# programs.nix-ld.enable = true; | |
# programs.nix-ld.libraries = with pkgs; [ | |
# gtk3 | |
# ]; | |
{ | |
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.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 | |
]; | |
in { | |
devShell = pkgs.mkShell { | |
name = "anytype-ts-dev"; | |
SERVER_PORT = 9090; | |
LD_LIBRARY_PATH = "${pkgs.lib.strings.makeLibraryPath deps}"; | |
nativeBuildInputs = deps; | |
}; | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment