mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
This changes how we think about this directory; it does not need to be exclusively for scripts related to updates, but should be a place for any scripts intended to be run by CI workflows. This mindset should make it easier to develop and test the business logic of workflows, without always needing to test "in production" on the nixvim repo or a fork.
27 lines
606 B
Nix
27 lines
606 B
Nix
{
|
|
lib,
|
|
writers,
|
|
}:
|
|
let
|
|
inherit (builtins)
|
|
all
|
|
match
|
|
attrNames
|
|
;
|
|
inherit (lib)
|
|
importJSON
|
|
;
|
|
|
|
lockFile = importJSON ../../flake.lock;
|
|
nixpkgsLock =
|
|
# Assert there is only one nixpkgs node
|
|
assert all (node: match "nixpkgs_[0-9]+" node == null) (attrNames lockFile.nodes);
|
|
lockFile.nodes.nixpkgs.original;
|
|
|
|
info = {
|
|
inherit (lib.trivial) release;
|
|
nixpkgs_rev = lib.trivial.revisionWithDefault (throw "nixpkgs revision not available");
|
|
unstable = lib.strings.hasSuffix "-unstable" nixpkgsLock.ref;
|
|
};
|
|
in
|
|
writers.writeTOML "version-info.toml" info
|