nixops_unstable: Fall back to "dirty" when rev missing

Doesn't occur with generated code, but makes it easy to temporarily
set the source to a path in the `poetry-git-overlay.nix` file.
This commit is contained in:
Robert Hensing 2022-03-03 14:04:36 +01:00
parent d2c3410efd
commit 5b4c63172c

View file

@ -18,7 +18,7 @@ let
nixops = super.nixops.overridePythonAttrs (
old: {
version = "${old.version}-pre-${lib.substring 0 7 super.nixops.src.rev}";
version = "${old.version}-pre-${lib.substring 0 7 super.nixops.src.rev or "dirty"}";
postPatch = ''
substituteInPlace nixops/args.py --subst-var version