aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/flake.lock43
-rw-r--r--contrib/flake.nix27
2 files changed, 61 insertions, 9 deletions
diff --git a/contrib/flake.lock b/contrib/flake.lock
new file mode 100644
index 0000000000..521b7629d9
--- /dev/null
+++ b/contrib/flake.lock
@@ -0,0 +1,43 @@
+{
+ "nodes": {
+ "flake-utils": {
+ "locked": {
+ "lastModified": 1610051610,
+ "narHash": "sha256-U9rPz/usA1/Aohhk7Cmc2gBrEEKRzcW4nwPWMPwja4Y=",
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "rev": "3982c9903e93927c2164caa727cd3f6a0e6d14cc",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "type": "github"
+ }
+ },
+ "nixpkgs": {
+ "locked": {
+ "lastModified": 1613226215,
+ "narHash": "sha256-3rA5cGIrBHD6yeKhNhsF7/t461ww25oJY8KyBb0IhjU=",
+ "owner": "nixos",
+ "repo": "nixpkgs",
+ "rev": "ff96a0fa5635770390b184ae74debea75c3fd534",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nixos",
+ "ref": "nixos-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "root": {
+ "inputs": {
+ "flake-utils": "flake-utils",
+ "nixpkgs": "nixpkgs"
+ }
+ }
+ },
+ "root": "root",
+ "version": 7
+}
diff --git a/contrib/flake.nix b/contrib/flake.nix
index d18534215c..c86bba6809 100644
--- a/contrib/flake.nix
+++ b/contrib/flake.nix
@@ -27,22 +27,31 @@
});
# a development binary to help debug issues
- neovim-debug = (neovim.override {
- stdenv = if pkgs.stdenv.isLinux then pkgs.llvmPackages_latest.stdenv else pkgs.stdenv;
+ neovim-debug = let
+ stdenv = pkgs.stdenvAdapters.keepDebugInfo (if pkgs.stdenv.isLinux then pkgs.llvmPackages_latest.stdenv else pkgs.stdenv);
+ in
+ pkgs.enableDebugging ((neovim.override {
lua = pkgs.enableDebugging pkgs.luajit;
+ inherit stdenv;
}).overrideAttrs (oa: {
cmakeBuildType = "Debug";
cmakeFlags = oa.cmakeFlags ++ [
"-DMIN_LOG_LEVEL=0"
];
- });
- # for neovim developers, very slow
+ disallowedReferences = [];
+ }));
+
+ # for neovim developers, builds a slow binary
+ # huge closure size but aims at covering all scripts
# brings development tools as well
neovim-developer =
let
lib = nixpkgs.lib;
- pythonEnv = pkgs.python3;
+ pythonEnv = pkgs.python3.withPackages(ps: [
+ ps.msgpack
+ ps.flake8 # for 'make pylint'
+ ]);
luacheck = pkgs.luaPackages.luacheck;
in
(neovim-debug.override ({ doCheck = pkgs.stdenv.isLinux; })).overrideAttrs (oa: {
@@ -51,7 +60,7 @@
"-DMIN_LOG_LEVEL=0"
"-DENABLE_LTO=OFF"
"-DUSE_BUNDLED=OFF"
- ] ++ pkgs.stdenv.lib.optionals pkgs.stdenv.isLinux [
+ ] ++ pkgs.lib.optionals pkgs.stdenv.isLinux [
# https://github.com/google/sanitizers/wiki/AddressSanitizerFlags
# https://clang.llvm.org/docs/AddressSanitizer.html#symbolizing-the-reports
"-DCLANG_ASAN_UBSAN=ON"
@@ -61,7 +70,8 @@
pythonEnv
include-what-you-use # for scripts/check-includes.py
jq # jq for scripts/vim-patch.sh -r
- doxygen
+ shellcheck # for `make shlint`
+ doxygen # for script/gen_vimdoc.py
]);
shellHook = oa.shellHook + ''
@@ -97,6 +107,5 @@
defaultApp = apps.nvim;
devShell = pkgs.neovim-developer;
- }
- );
+ });
}