mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-25 04:12:44 +03:00
flake.nix: Handle missing rev attribute
Dirty trees no longer set 'rev', so we need to handle this.
This commit is contained in:
parent
2a0cf385d2
commit
60330b6065
@ -23,8 +23,8 @@
|
|||||||
import ./nixos/lib/eval-config.nix (args // {
|
import ./nixos/lib/eval-config.nix (args // {
|
||||||
modules = modules ++
|
modules = modules ++
|
||||||
[ { system.nixos.versionSuffix =
|
[ { system.nixos.versionSuffix =
|
||||||
".${lib.substring 0 8 self.lastModified}.${self.shortRev}";
|
".${lib.substring 0 8 self.lastModified}.${self.shortRev or "dirty"}";
|
||||||
system.nixos.revision = self.rev;
|
system.nixos.revision = lib.mkIf (self ? rev) self.rev;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user