From 72388c9edd5d69e98d8efdd49cd69961368cd0d7 Mon Sep 17 00:00:00 2001 From: a-kenji Date: Thu, 7 Apr 2022 01:23:31 +0200 Subject: [PATCH] add: `rnix-lsp` overlays Add `rnix-lsp` `overlays` to the flake outputs, in order to be directly consumed by other flakes. Provides 2 overlays: - default: with package named `rnix-lsp`, so people can overwrite their existing configuration - nightly: with package named `rnix-lsp-nightly`, so people can opt in to this package on a case-by-case basis Also for now still uses the `overlay` attribute, for backwards compatibility, is that needed? fixes: #77 --- flake-compat.nix | 3 +-- flake.nix | 14 +++++++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/flake-compat.nix b/flake-compat.nix index b4fa7be..a538673 100644 --- a/flake-compat.nix +++ b/flake-compat.nix @@ -3,7 +3,6 @@ let url = "https://github.com/edolstra/flake-compat/archive/12c64ca55c1014cdc1b16ed5a804aa8576601ff2.tar.gz"; sha256 = "0jm6nzb83wa6ai17ly9fzpqc40wg1viib8klq8lby54agpl213w5"; }; -in -(import flake-compat { +in (import flake-compat { src = ./.; }) diff --git a/flake.nix b/flake.nix index aa20a6d..7b29232 100644 --- a/flake.nix +++ b/flake.nix @@ -35,5 +35,17 @@ drv = packages.rnix-lsp; }; defaultApp = apps.rnix-lsp; - }); + }) + // + rec { + overlays = { + default = final: prev: rec { + rnix-lsp = self.packages.${prev.system}.rnix-lsp; + }; + nightly = final: prev: rec { + rnix-lsp-nightly = self.packages.${prev.system}.rnix-lsp; + }; + }; + overlay = overlays.default; + }; }