mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
update-scripts: get nixpkgs using flak-compat
This ensures we get an actual nixpkgs flake, which will have source info
like `rev`.
It also means we have access to `nixvim` if we need it.
(cherry picked from commit bfee503e0f
)
This commit is contained in:
parent
d14de7a243
commit
b04aa8fb49
1 changed files with 4 additions and 14 deletions
|
@ -1,18 +1,8 @@
|
||||||
{
|
{
|
||||||
# By default, import nixpkgs from flake.lock
|
# By default, load nixvim using flake-compat
|
||||||
pkgs ?
|
nixvim ? import ../.,
|
||||||
let
|
pkgs ? nixvim.inputs.nixpkgs.legacyPackages.${builtins.currentSystem},
|
||||||
lock = (builtins.fromJSON (builtins.readFile ../flake.lock)).nodes.nixpkgs.locked;
|
lib ? nixvim.inputs.nixpkgs.lib,
|
||||||
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: {
|
lib.fix (self: {
|
||||||
# The main script
|
# The main script
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue