forked from mirrors/nixpkgs
flake.nix: use lib.extend
This preserves the nixosSystem function if another flake uses lib.extend itself.
This commit is contained in:
parent
2d6ab6e2f1
commit
74430a81ff
|
@ -18,17 +18,17 @@
|
|||
|
||||
in
|
||||
{
|
||||
lib = lib // {
|
||||
lib = lib.extend (final: prev: {
|
||||
nixosSystem = { modules, ... } @ args:
|
||||
import ./nixos/lib/eval-config.nix (args // {
|
||||
modules = modules ++
|
||||
[ { system.nixos.versionSuffix =
|
||||
".${lib.substring 0 8 (self.lastModifiedDate or self.lastModified)}.${self.shortRev or "dirty"}";
|
||||
system.nixos.revision = lib.mkIf (self ? rev) self.rev;
|
||||
".${final.substring 0 8 (self.lastModifiedDate or self.lastModified)}.${self.shortRev or "dirty"}";
|
||||
system.nixos.revision = final.mkIf (self ? rev) self.rev;
|
||||
}
|
||||
];
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
checks.x86_64-linux.tarball = jobs.tarball;
|
||||
|
||||
|
|
Loading…
Reference in a new issue