feat: add pre-commit to shellHook
Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2701>
This commit is contained in:
parent
ccef0197c6
commit
97aa045b0b
13
flake.nix
13
flake.nix
|
@ -19,7 +19,7 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
lib = nixpkgs.lib;
|
lib = nixpkgs.lib;
|
||||||
|
|
||||||
commonLibraries = with pkgs;[
|
commonLibraries = with pkgs;[
|
||||||
# Tauri dependencies
|
# Tauri dependencies
|
||||||
webkitgtk_4_1
|
webkitgtk_4_1
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
gst_all_1.gst-plugins-good
|
gst_all_1.gst-plugins-good
|
||||||
gst_all_1.gst-plugins-base
|
gst_all_1.gst-plugins-base
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
# More tauri dependencies
|
# More tauri dependencies
|
||||||
|
@ -56,14 +56,19 @@
|
||||||
nodejs
|
nodejs
|
||||||
corepack
|
corepack
|
||||||
|
|
||||||
# API dependencies / Frontend scripts
|
# API dependencies / Frontend scripts
|
||||||
python3
|
python3
|
||||||
|
pre-commit
|
||||||
];
|
];
|
||||||
|
|
||||||
in {
|
in {
|
||||||
devShell = pkgs.mkShell {
|
devShell = pkgs.mkShell {
|
||||||
buildInputs = commonLibraries ++ packages;
|
buildInputs = commonLibraries ++ packages;
|
||||||
|
|
||||||
|
shellHook = ''
|
||||||
|
pre-commit install
|
||||||
|
'';
|
||||||
|
|
||||||
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath commonLibraries;
|
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath commonLibraries;
|
||||||
|
|
||||||
XDG_DATA_DIRS = let
|
XDG_DATA_DIRS = let
|
||||||
|
@ -81,7 +86,7 @@
|
||||||
in "${base}:${gsettings-schema}:$XDG_DATA_DIRS";
|
in "${base}:${gsettings-schema}:$XDG_DATA_DIRS";
|
||||||
|
|
||||||
GIO_MODULE_DIR = "${pkgs.glib-networking}/lib/gio/modules/";
|
GIO_MODULE_DIR = "${pkgs.glib-networking}/lib/gio/modules/";
|
||||||
|
|
||||||
|
|
||||||
# Avoid white screen running with Nix
|
# Avoid white screen running with Nix
|
||||||
# https://github.com/tauri-apps/tauri/issues/4315#issuecomment-1207755694
|
# https://github.com/tauri-apps/tauri/issues/4315#issuecomment-1207755694
|
||||||
|
|
Loading…
Reference in New Issue