mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
update-scripts: move out of flake
See the explanation in the new update-scripts/README.md file.
This commit is contained in:
parent
96d0a2e390
commit
d3cb750e6a
10 changed files with 146 additions and 88 deletions
29
update-scripts/default.nix
Normal file
29
update-scripts/default.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
# By default, import nixpkgs from flake.lock
|
||||
pkgs ?
|
||||
let
|
||||
lock = (builtins.fromJSON (builtins.readFile ../flake.lock)).nodes.nixpkgs.locked;
|
||||
nixpkgs = fetchTarball {
|
||||
url =
|
||||
assert lock.type == "github";
|
||||
"https://github.com/${lock.owner}/${lock.repo}/archive/${lock.rev}.tar.gz";
|
||||
sha256 = lock.narHash;
|
||||
};
|
||||
in
|
||||
import nixpkgs { },
|
||||
lib ? pkgs.lib,
|
||||
...
|
||||
}:
|
||||
lib.fix (self: {
|
||||
# The main script
|
||||
default = self.generate;
|
||||
generate = lib.callPackageWith (pkgs // self) ./generate.nix { };
|
||||
|
||||
# A shell that has the generate script
|
||||
shell = pkgs.mkShell { nativeBuildInputs = [ self.generate ]; };
|
||||
|
||||
# Derivations that build the generated files
|
||||
efmls-configs-sources = pkgs.callPackage ./efmls-configs.nix { };
|
||||
none-ls-builtins = pkgs.callPackage ./none-ls.nix { };
|
||||
rust-analyzer-options = pkgs.callPackage ./rust-analyzer.nix { };
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue