From 1c94f1b5c2e1d470c097b722d309059409305c1c Mon Sep 17 00:00:00 2001 From: Marc Jakobi Date: Sat, 8 Jun 2024 14:45:48 +0200 Subject: [PATCH 1/3] build: make rocks.nvim input follow nixpkgs --- flake.lock | 540 +++++++++++++++++++++++++++++++++-------------------- flake.nix | 9 +- 2 files changed, 347 insertions(+), 202 deletions(-) diff --git a/flake.lock b/flake.lock index 1ac3b8a..9d55ca0 100644 --- a/flake.lock +++ b/flake.lock @@ -96,6 +96,38 @@ "type": "github" } }, + "flake-compat_7": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_8": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": "nixpkgs-lib" @@ -137,11 +169,11 @@ "nixpkgs-lib": "nixpkgs-lib_3" }, "locked": { - "lastModified": 1706830856, - "narHash": "sha256-a0NYyp+h9hlb7ddVz4LUn1vT/PLwqfrWYcHMvFB1xYg=", + "lastModified": 1717285511, + "narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "b253292d9c0a5ead9bc98c4e9a26c6312e27d69f", + "rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8", "type": "github" }, "original": { @@ -150,81 +182,91 @@ "type": "github" } }, - "flake-utils": { + "flake-parts_4": { "inputs": { - "systems": "systems" + "nixpkgs-lib": "nixpkgs-lib_4" }, "locked": { - "lastModified": 1705309234, - "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "lastModified": 1715865404, + "narHash": "sha256-/GJvTdTpuDjNn84j82cU6bXztE0MSkdnTWClUCRub78=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "8dc45382d5206bd292f9c2768b8058a8fd8311d9", "type": "github" }, "original": { - "owner": "numtide", - "repo": "flake-utils", + "owner": "hercules-ci", + "repo": "flake-parts", "type": "github" } }, - "flake-utils_2": { + "flake-parts_5": { "inputs": { - "systems": "systems_2" + "nixpkgs-lib": "nixpkgs-lib_5" }, "locked": { - "lastModified": 1701680307, - "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "lastModified": 1717285511, + "narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8", "type": "github" }, "original": { - "owner": "numtide", - "repo": "flake-utils", + "owner": "hercules-ci", + "repo": "flake-parts", "type": "github" } }, - "flake-utils_3": { + "flake-parts_6": { "inputs": { - "systems": "systems_3" + "nixpkgs-lib": [ + "rocks-nvim-flake", + "neorocks", + "neovim-nightly", + "nixpkgs" + ] }, "locked": { - "lastModified": 1701680307, - "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "lastModified": 1717285511, + "narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8", "type": "github" }, "original": { - "owner": "numtide", - "repo": "flake-utils", + "owner": "hercules-ci", + "repo": "flake-parts", "type": "github" } }, - "flake-utils_4": { + "flake-parts_7": { "inputs": { - "systems": "systems_4" + "nixpkgs-lib": [ + "rocks-nvim-flake", + "neorocks", + "neovim-nightly", + "hercules-ci-effects", + "nixpkgs" + ] }, "locked": { - "lastModified": 1701680307, - "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "lastModified": 1712014858, + "narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "9126214d0a59633752a136528f5f3b9aa8565b7d", "type": "github" }, "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" + "id": "flake-parts", + "type": "indirect" } }, - "flake-utils_5": { + "flake-utils": { "inputs": { - "systems": "systems_5" + "systems": "systems" }, "locked": { "lastModified": 1705309234, @@ -240,9 +282,9 @@ "type": "github" } }, - "flake-utils_6": { + "flake-utils_2": { "inputs": { - "systems": "systems_6" + "systems": "systems_2" }, "locked": { "lastModified": 1701680307, @@ -258,9 +300,9 @@ "type": "github" } }, - "flake-utils_7": { + "flake-utils_3": { "inputs": { - "systems": "systems_7" + "systems": "systems_3" }, "locked": { "lastModified": 1701680307, @@ -276,9 +318,9 @@ "type": "github" } }, - "flake-utils_8": { + "flake-utils_4": { "inputs": { - "systems": "systems_8" + "systems": "systems_4" }, "locked": { "lastModified": 1701680307, @@ -313,6 +355,77 @@ "type": "github" } }, + "gen-luarc_2": { + "inputs": { + "flake-parts": "flake-parts_4", + "nixpkgs": "nixpkgs_4" + }, + "locked": { + "lastModified": 1717108591, + "narHash": "sha256-Sn6jrh9Nqp5UKJzNT0rg/DQCJCpFs/d+RM2/iENPpBo=", + "owner": "mrcjkb", + "repo": "nix-gen-luarc-json", + "rev": "39704e58b5227a82a14a00f5912e4bfccfa2b687", + "type": "github" + }, + "original": { + "owner": "mrcjkb", + "repo": "nix-gen-luarc-json", + "type": "github" + } + }, + "git-hooks": { + "inputs": { + "flake-compat": "flake-compat_5", + "gitignore": "gitignore_3", + "nixpkgs": "nixpkgs_5", + "nixpkgs-stable": "nixpkgs-stable_3" + }, + "locked": { + "lastModified": 1716213921, + "narHash": "sha256-xrsYFST8ij4QWaV6HEokCUNIZLjjLP1bYC60K8XiBVA=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "0e8fcc54b842ad8428c9e705cb5994eaf05c26a0", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, + "git-hooks_2": { + "inputs": { + "flake-compat": "flake-compat_7", + "gitignore": "gitignore_4", + "nixpkgs": [ + "rocks-nvim-flake", + "neorocks", + "neovim-nightly", + "nixpkgs" + ], + "nixpkgs-stable": [ + "rocks-nvim-flake", + "neorocks", + "neovim-nightly", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1716213921, + "narHash": "sha256-xrsYFST8ij4QWaV6HEokCUNIZLjjLP1bYC60K8XiBVA=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "0e8fcc54b842ad8428c9e705cb5994eaf05c26a0", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, "gitignore": { "inputs": { "nixpkgs": [ @@ -359,18 +472,18 @@ "gitignore_3": { "inputs": { "nixpkgs": [ - "rocks-nvim-input", + "rocks-nvim-flake", "neorocks", - "pre-commit-hooks", + "git-hooks", "nixpkgs" ] }, "locked": { - "lastModified": 1703887061, - "narHash": "sha256-gGPa9qWNc6eCXT/+Z5/zMkyYOuRZqeFZBDbopNZQkuY=", + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", "owner": "hercules-ci", "repo": "gitignore.nix", - "rev": "43e1aa1308018f37118e34d3a9cb4f5e75dc11d5", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", "type": "github" }, "original": { @@ -382,17 +495,41 @@ "gitignore_4": { "inputs": { "nixpkgs": [ - "rocks-nvim-input", + "rocks-nvim-flake", + "neorocks", + "neovim-nightly", + "git-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "gitignore_5": { + "inputs": { + "nixpkgs": [ + "rocks-nvim-flake", "pre-commit-hooks", "nixpkgs" ] }, "locked": { - "lastModified": 1703887061, - "narHash": "sha256-gGPa9qWNc6eCXT/+Z5/zMkyYOuRZqeFZBDbopNZQkuY=", + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", "owner": "hercules-ci", "repo": "gitignore.nix", - "rev": "43e1aa1308018f37118e34d3a9cb4f5e75dc11d5", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", "type": "github" }, "original": { @@ -401,6 +538,30 @@ "type": "github" } }, + "hercules-ci-effects": { + "inputs": { + "flake-parts": "flake-parts_7", + "nixpkgs": [ + "rocks-nvim-flake", + "neorocks", + "neovim-nightly", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1713898448, + "narHash": "sha256-6q6ojsp/Z9P2goqnxyfCSzFOD92T3Uobmj8oVAicUOs=", + "owner": "hercules-ci", + "repo": "hercules-ci-effects", + "rev": "c0302ec12d569532a6b6bd218f698bc402e93adc", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "hercules-ci-effects", + "type": "github" + } + }, "neorocks": { "inputs": { "flake-compat": "flake-compat", @@ -426,17 +587,17 @@ "neorocks_2": { "inputs": { "flake-compat": "flake-compat_4", - "flake-utils": "flake-utils_5", + "flake-parts": "flake-parts_5", + "git-hooks": "git-hooks", "neovim-nightly": "neovim-nightly_2", - "nixpkgs": "nixpkgs_4", - "pre-commit-hooks": "pre-commit-hooks_3" + "nixpkgs": "nixpkgs_7" }, "locked": { - "lastModified": 1708147252, - "narHash": "sha256-+WK7viTZzmKkljZYz2Ef2bKujOtT0f1PpLDFVak8GlQ=", + "lastModified": 1717392362, + "narHash": "sha256-sgCg3MHIAdVxQMGe4aCcueu2nj2tOoLvkyphOe57PNc=", "owner": "nvim-neorocks", "repo": "neorocks", - "rev": "fc029565ca5ba3a2a2fb1cd2a47c82a153ffce61", + "rev": "7754bc30ab9efdb9255a88a3646ac0edc622a4df", "type": "github" }, "original": { @@ -471,24 +632,38 @@ }, "neovim-nightly_2": { "inputs": { - "flake-utils": "flake-utils_6", - "nixpkgs": [ - "rocks-nvim-input", - "neorocks", - "nixpkgs" - ] + "flake-compat": "flake-compat_6", + "flake-parts": "flake-parts_6", + "git-hooks": "git-hooks_2", + "hercules-ci-effects": "hercules-ci-effects", + "neovim-src": "neovim-src", + "nixpkgs": "nixpkgs_6" }, "locked": { - "dir": "contrib", - "lastModified": 1708130735, - "narHash": "sha256-8i9CMKCXOZlTuMK6oWUeLFn8IkaEYwsuTVJ703+e6wA=", + "lastModified": 1717311741, + "narHash": "sha256-iZbUT3oz+4sG+StUW+oApwK4eADQQOdkU/AWY5T/r0E=", + "owner": "nix-community", + "repo": "neovim-nightly-overlay", + "rev": "67e84c020323a28f33ad4498f022a7b2c67719ad", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "neovim-nightly-overlay", + "type": "github" + } + }, + "neovim-src": { + "flake": false, + "locked": { + "lastModified": 1717280958, + "narHash": "sha256-1k0brOQVt5idsf7WHPbig/ASgSl6pzFb2lyPYfFeo1U=", "owner": "neovim", "repo": "neovim", - "rev": "848fc8ede84b9cfc4e651e0e3b449060a8a8d70c", + "rev": "05435a915a8446a8c2d824551fbea2dc1d7b5e98", "type": "github" }, "original": { - "dir": "contrib", "owner": "neovim", "repo": "neovim", "type": "github" @@ -548,20 +723,38 @@ }, "nixpkgs-lib_3": { "locked": { - "dir": "lib", - "lastModified": 1706550542, - "narHash": "sha256-UcsnCG6wx++23yeER4Hg18CXWbgNpqNXcHIo5/1Y+hc=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "97b17f32362e475016f942bbdfda4a4a72a8a652", - "type": "github" + "lastModified": 1717284937, + "narHash": "sha256-lIbdfCsf8LMFloheeE6N31+BMIeixqyQWbSr2vk79EQ=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz" }, "original": { - "dir": "lib", - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz" + } + }, + "nixpkgs-lib_4": { + "locked": { + "lastModified": 1714640452, + "narHash": "sha256-QBx10+k6JWz6u7VsohfSw8g8hjdBZEf8CFzXH1/1Z94=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/50eb7ecf4cd0a5756d7275c8ba36790e5bd53e33.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/50eb7ecf4cd0a5756d7275c8ba36790e5bd53e33.tar.gz" + } + }, + "nixpkgs-lib_5": { + "locked": { + "lastModified": 1717284937, + "narHash": "sha256-lIbdfCsf8LMFloheeE6N31+BMIeixqyQWbSr2vk79EQ=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz" } }, "nixpkgs-stable": { @@ -598,11 +791,11 @@ }, "nixpkgs-stable_3": { "locked": { - "lastModified": 1704874635, - "narHash": "sha256-YWuCrtsty5vVZvu+7BchAxmcYzTMfolSPP5io8+WYCg=", + "lastModified": 1710695816, + "narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3dc440faeee9e889fe2d1b4d25ad0f430d449356", + "rev": "614b4613980a522ba49f0d194531beddbb7220d3", "type": "github" }, "original": { @@ -614,11 +807,11 @@ }, "nixpkgs-stable_4": { "locked": { - "lastModified": 1704874635, - "narHash": "sha256-YWuCrtsty5vVZvu+7BchAxmcYzTMfolSPP5io8+WYCg=", + "lastModified": 1710695816, + "narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3dc440faeee9e889fe2d1b4d25ad0f430d449356", + "rev": "614b4613980a522ba49f0d194531beddbb7220d3", "type": "github" }, "original": { @@ -661,31 +854,64 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1708093448, - "narHash": "sha256-gohEm3/NVyu7WINFhRf83yJH8UM2ie/KY9Iw3VN6fiE=", + "lastModified": 1716948383, + "narHash": "sha256-SzDKxseEcHR5KzPXLwsemyTR/kaM9whxeiJohbL04rs=", "owner": "nixos", "repo": "nixpkgs", - "rev": "c7763249f02b7786b4ca36e13a4d7365cfba162f", + "rev": "ad57eef4ef0659193044870c731987a6df5cf56b", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixpkgs-unstable", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } }, "nixpkgs_5": { "locked": { - "lastModified": 1708217174, - "narHash": "sha256-dYYyPLj1aDEXmfqECOuavHH2CWo/UrU8U590LvWyHX0=", + "lastModified": 1710765496, + "narHash": "sha256-p7ryWEeQfMwTB6E0wIUd5V2cFTgq+DRRBz2hYGnJZyA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e367f7a1fb93137af22a3908f00b9a35e2d286a7", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_6": { + "locked": { + "lastModified": 1717112898, + "narHash": "sha256-7R2ZvOnvd9h8fDd65p0JnB7wXfUvreox3xFdYWd1BnY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "6132b0f6e344ce2fe34fc051b72fb46e34f668e0", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_7": { + "locked": { + "lastModified": 1717112898, + "narHash": "sha256-7R2ZvOnvd9h8fDd65p0JnB7wXfUvreox3xFdYWd1BnY=", "owner": "nixos", "repo": "nixpkgs", - "rev": "347a8ce65b6747babcd4e037314f6c6565912c2a", + "rev": "6132b0f6e344ce2fe34fc051b72fb46e34f668e0", "type": "github" }, "original": { "owner": "nixos", + "ref": "nixpkgs-unstable", "repo": "nixpkgs", "type": "github" } @@ -741,47 +967,20 @@ }, "pre-commit-hooks_3": { "inputs": { - "flake-compat": "flake-compat_5", - "flake-utils": "flake-utils_7", - "gitignore": "gitignore_3", - "nixpkgs": [ - "rocks-nvim-input", - "neorocks", - "nixpkgs" - ], - "nixpkgs-stable": "nixpkgs-stable_3" - }, - "locked": { - "lastModified": 1708018599, - "narHash": "sha256-M+Ng6+SePmA8g06CmUZWi1AjG2tFBX9WCXElBHEKnyM=", - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "rev": "5df5a70ad7575f6601d91f0efec95dd9bc619431", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "type": "github" - } - }, - "pre-commit-hooks_4": { - "inputs": { - "flake-compat": "flake-compat_6", - "flake-utils": "flake-utils_8", - "gitignore": "gitignore_4", + "flake-compat": "flake-compat_8", + "gitignore": "gitignore_5", "nixpkgs": [ - "rocks-nvim-input", + "rocks-nvim-flake", "nixpkgs" ], "nixpkgs-stable": "nixpkgs-stable_4" }, "locked": { - "lastModified": 1708018599, - "narHash": "sha256-M+Ng6+SePmA8g06CmUZWi1AjG2tFBX9WCXElBHEKnyM=", + "lastModified": 1716213921, + "narHash": "sha256-xrsYFST8ij4QWaV6HEokCUNIZLjjLP1bYC60K8XiBVA=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "5df5a70ad7575f6601d91f0efec95dd9bc619431", + "rev": "0e8fcc54b842ad8428c9e705cb5994eaf05c26a0", "type": "github" }, "original": { @@ -790,19 +989,22 @@ "type": "github" } }, - "rocks-nvim-input": { + "rocks-nvim-flake": { "inputs": { "flake-parts": "flake-parts_3", + "gen-luarc": "gen-luarc_2", "neorocks": "neorocks_2", - "nixpkgs": "nixpkgs_5", - "pre-commit-hooks": "pre-commit-hooks_4" + "nixpkgs": [ + "nixpkgs" + ], + "pre-commit-hooks": "pre-commit-hooks_3" }, "locked": { - "lastModified": 1708693435, - "narHash": "sha256-dnj9z0L8nJ4fdx6igH7YUjjGKX1JN9QyiUn0f8la7VA=", + "lastModified": 1717782981, + "narHash": "sha256-iqZmhTuyFU+GVzrlfGPX/ifiCI8mU2kXbtCylHUMNDg=", "owner": "nvim-neorocks", "repo": "rocks.nvim", - "rev": "9e521d9a45efe45c94e23c8201346c2246f349c3", + "rev": "e0634dfd5e2f06e8be27e04c4e42602c3555a290", "type": "github" }, "original": { @@ -818,7 +1020,7 @@ "neorocks": "neorocks", "nixpkgs": "nixpkgs_3", "pre-commit-hooks": "pre-commit-hooks_2", - "rocks-nvim-input": "rocks-nvim-input" + "rocks-nvim-flake": "rocks-nvim-flake" } }, "systems": { @@ -880,66 +1082,6 @@ "repo": "default", "type": "github" } - }, - "systems_5": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_6": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_7": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_8": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 0dcbf63..4daff0f 100644 --- a/flake.nix +++ b/flake.nix @@ -9,7 +9,10 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs"; - rocks-nvim-input.url = "github:nvim-neorocks/rocks.nvim"; + rocks-nvim-flake = { + url = "github:nvim-neorocks/rocks.nvim"; + inputs.nixpkgs.follows = "nixpkgs"; + }; neorocks.url = "github:nvim-neorocks/neorocks"; @@ -26,7 +29,7 @@ outputs = inputs @ { self, nixpkgs, - rocks-nvim-input, + rocks-nvim-flake, neorocks, gen-luarc, flake-parts, @@ -51,7 +54,7 @@ overlays = [ neorocks.overlays.default gen-luarc.overlays.default - rocks-nvim-input.overlays.default + rocks-nvim-flake.overlays.default ]; }; From ddc336f330feb95f54899f3dd17a495d70bb0f1a Mon Sep 17 00:00:00 2001 From: Marc Jakobi Date: Sat, 8 Jun 2024 14:57:50 +0200 Subject: [PATCH 2/3] build: update flake + add neovim-with-rocks derivation for testing --- flake.lock | 58 ++++-------------- flake.nix | 29 +++++---- nix/overlay.nix | 108 ++++++++++++++++++++++++++++++++++ rocks-dev.nvim-scm-1.rockspec | 20 +++++++ 4 files changed, 158 insertions(+), 57 deletions(-) create mode 100644 nix/overlay.nix create mode 100644 rocks-dev.nvim-scm-1.rockspec diff --git a/flake.lock b/flake.lock index 9d55ca0..ba8459a 100644 --- a/flake.lock +++ b/flake.lock @@ -318,24 +318,6 @@ "type": "github" } }, - "flake-utils_4": { - "inputs": { - "systems": "systems_4" - }, - "locked": { - "lastModified": 1701680307, - "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "gen-luarc": { "inputs": { "flake-parts": "flake-parts_2", @@ -456,11 +438,11 @@ ] }, "locked": { - "lastModified": 1703887061, - "narHash": "sha256-gGPa9qWNc6eCXT/+Z5/zMkyYOuRZqeFZBDbopNZQkuY=", + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", "owner": "hercules-ci", "repo": "gitignore.nix", - "rev": "43e1aa1308018f37118e34d3a9cb4f5e75dc11d5", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", "type": "github" }, "original": { @@ -775,11 +757,11 @@ }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1704874635, - "narHash": "sha256-YWuCrtsty5vVZvu+7BchAxmcYzTMfolSPP5io8+WYCg=", + "lastModified": 1710695816, + "narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3dc440faeee9e889fe2d1b4d25ad0f430d449356", + "rev": "614b4613980a522ba49f0d194531beddbb7220d3", "type": "github" }, "original": { @@ -944,7 +926,6 @@ "pre-commit-hooks_2": { "inputs": { "flake-compat": "flake-compat_3", - "flake-utils": "flake-utils_4", "gitignore": "gitignore_2", "nixpkgs": [ "nixpkgs" @@ -952,11 +933,11 @@ "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { - "lastModified": 1708018599, - "narHash": "sha256-M+Ng6+SePmA8g06CmUZWi1AjG2tFBX9WCXElBHEKnyM=", + "lastModified": 1717664902, + "narHash": "sha256-7XfBuLULizXjXfBYy/VV+SpYMHreNRHk9nKMsm1bgb4=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "5df5a70ad7575f6601d91f0efec95dd9bc619431", + "rev": "cc4d466cb1254af050ff7bdf47f6d404a7c646d1", "type": "github" }, "original": { @@ -1000,11 +981,11 @@ "pre-commit-hooks": "pre-commit-hooks_3" }, "locked": { - "lastModified": 1717782981, - "narHash": "sha256-iqZmhTuyFU+GVzrlfGPX/ifiCI8mU2kXbtCylHUMNDg=", + "lastModified": 1717851868, + "narHash": "sha256-ogc78VF7YghxsXFDLNozlI4+FqQUfWIvBSSkd7DIrCQ=", "owner": "nvim-neorocks", "repo": "rocks.nvim", - "rev": "e0634dfd5e2f06e8be27e04c4e42602c3555a290", + "rev": "26f75b2cf0ef0ba55e6b99936f4eac19e60c63b5", "type": "github" }, "original": { @@ -1067,21 +1048,6 @@ "repo": "default", "type": "github" } - }, - "systems_4": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 4daff0f..f745e1d 100644 --- a/flake.nix +++ b/flake.nix @@ -55,6 +55,7 @@ neorocks.overlays.default gen-luarc.overlays.default rocks-nvim-flake.overlays.default + self.overlays.default ]; }; @@ -74,10 +75,10 @@ type-check-nightly = pre-commit-hooks.lib.${system}.run { src = self; hooks = { - lua-ls.enable = true; - }; - settings = { - lua-ls.config = luarc; + lua-ls = { + enable = true; + settings.configuration = luarc; + }; }; }; @@ -97,13 +98,11 @@ ${pre-commit-check.shellHook} ln -fs ${pkgs.luarc-to-json luarc} .luarc.json ''; - buildInputs = with pre-commit-hooks.packages.${system}; [ - alejandra - lua-language-server - stylua - luacheck - editorconfig-checker - ]; + buildInputs = + self.checks.${system}.pre-commit-check.enabledPackages + ++ (with pkgs; [ + lua-language-server + ]); }; in { devShells = { @@ -111,6 +110,11 @@ inherit devShell; }; + packages = rec { + inherit (pkgs) rocks-dev-nvim neovim-with-rocks; + default = rocks-dev-nvim; + }; + checks = { inherit pre-commit-check @@ -118,5 +122,8 @@ ; }; }; + flake = { + overlays.default = import ./nix/overlay.nix {inherit self rocks-nvim-flake;}; + }; }; } diff --git a/nix/overlay.nix b/nix/overlay.nix new file mode 100644 index 0000000..be76382 --- /dev/null +++ b/nix/overlay.nix @@ -0,0 +1,108 @@ +{ + self, + rocks-nvim-flake, +}: final: prev: let + name = "rocks-dev.nvim"; + + luaPackage-override = luaself: luaprev: let + rocks-nvim = rocks-nvim-flake.packages.${final.system}.rocks-nvim; + in { + inherit rocks-nvim; + luarocks-rock = rocks-nvim-flake.packages.${final.system}.luarocks-rock; + rocks-dev-nvim = luaself.callPackage ({ + luaOlder, + buildLuarocksPackage, + lua, + }: + buildLuarocksPackage { + pname = name; + version = "scm-1"; + knownRockspec = "${self}/rocks-dev.nvim-scm-1.rockspec"; + src = self; + disabled = luaOlder "5.1"; + propagatedBuildInputs = [ + rocks-nvim + ]; + }) {}; + }; + lua5_1 = prev.lua5_1.override { + packageOverrides = luaPackage-override; + }; + lua51Packages = prev.lua51Packages // final.lua5_1.pkgs; + luajit = prev.luajit.override { + packageOverrides = luaPackage-override; + }; + luajitPackages = prev.luajitPackages // final.luajit.pkgs; + + neovim-with-rocks = let + rocks = rocks-nvim-flake.packages.${final.system}.rocks-nvim; + rocks-dev = final.luajitPackages.rocks-dev-nvim; + neovimConfig = final.neovimUtils.makeNeovimConfig { + withPython3 = true; + viAlias = false; + vimAlias = false; + # plugins = [ final.vimPlugins.rocks-nvim ]; + extraLuaPackages = ps: [ps.rocks-nvim]; + }; + in + final.wrapNeovimUnstable final.neovim-nightly (neovimConfig + // { + luaRcContent = + /* + lua + */ + '' + -- Copied from installer.lua + local rocks_config = { + rocks_path = vim.fn.stdpath("data") .. "/rocks", + luarocks_binary = "${final.lua51Packages.luarocks-rock}/bin/luarocks", + } + + vim.g.rocks_nvim = rocks_config + + local luarocks_path = { + vim.fs.joinpath("${rocks}", "share", "lua", "5.1", "?.lua"), + vim.fs.joinpath("${rocks}", "share", "lua", "5.1", "?", "init.lua"), + vim.fs.joinpath("${rocks-dev}", "share", "lua", "5.1", "?.lua"), + vim.fs.joinpath("${rocks-dev}", "share", "lua", "5.1", "?", "init.lua"), + vim.fs.joinpath(rocks_config.rocks_path, "share", "lua", "5.1", "?.lua"), + vim.fs.joinpath(rocks_config.rocks_path, "share", "lua", "5.1", "?", "init.lua"), + } + package.path = package.path .. ";" .. table.concat(luarocks_path, ";") + + local luarocks_cpath = { + vim.fs.joinpath(rocks_config.rocks_path, "lib", "lua", "5.1", "?.so"), + vim.fs.joinpath(rocks_config.rocks_path, "lib64", "lua", "5.1", "?.so"), + } + package.cpath = package.cpath .. ";" .. table.concat(luarocks_cpath, ";") + + vim.opt.runtimepath:append(vim.fs.joinpath("${rocks}", "rocks.nvim-scm-1-rocks", "rocks.nvim", "*")) + vim.opt.runtimepath:append(vim.fs.joinpath("${rocks-dev}", "rocks-dev.nvim-scm-1-rocks", "rocks-dev.nvim", "*")) + ''; + wrapRc = true; + wrapperArgs = + final.lib.escapeShellArgs neovimConfig.wrapperArgs + + " " + + ''--set NVIM_APPNAME "nvimrocks"''; + }); +in { + inherit + lua5_1 + lua51Packages + luajit + luajitPackages + neovim-with-rocks + ; + + vimPlugins = + prev.vimPlugins + // { + rocks-dev-nvim = final.neovimUtils.buildNeovimPlugin { + pname = name; + version = "dev"; + src = self; + }; + }; + + rocks-dev-nvim = lua51Packages.rocks-dev-nvim; +} diff --git a/rocks-dev.nvim-scm-1.rockspec b/rocks-dev.nvim-scm-1.rockspec new file mode 100644 index 0000000..b0ff606 --- /dev/null +++ b/rocks-dev.nvim-scm-1.rockspec @@ -0,0 +1,20 @@ +local _MODREV, _SPECREV = "scm", "-1" +rockspec_format = "3.0" +package = "rocks-dev.nvim" +version = _MODREV .. _SPECREV + +dependencies = { + "lua >= 5.1", + "rocks.nvim >= 2.15.0", +} + +source = { + url = "git://github.com/nvim-neorocks/" .. package, +} + +build = { + type = "builtin", + copy_directories = { + "plugin", + }, +} From d7f4d7643b4fbb9c7554e08dfd8733f2544ef9a2 Mon Sep 17 00:00:00 2001 From: Marc Jakobi Date: Sat, 8 Jun 2024 15:12:57 +0200 Subject: [PATCH 3/3] ci: use detsys nix installer --- .github/workflows/nix-build.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nix-build.yaml b/.github/workflows/nix-build.yaml index 1785afd..4dfbf5e 100644 --- a/.github/workflows/nix-build.yaml +++ b/.github/workflows/nix-build.yaml @@ -9,7 +9,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v22 + - uses: DeterminateSystems/nix-installer-action@v10 + - uses: cachix/cachix-action@v12 with: name: neorocks authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' @@ -18,7 +19,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v22 + - uses: DeterminateSystems/nix-installer-action@v10 - uses: cachix/cachix-action@v12 with: name: neorocks