fix(lock): remove flakes command from error

The suggested copy paste attribute path is often wrong as it depends on the individual repository setup that dream2nix doesn't control.

Instead now simply hint to `nix run` the .lock attribute
This commit is contained in:
DavHau 2023-09-14 11:37:36 +02:00
parent a68165d109
commit 8d1dbd0e1f

View File

@ -133,44 +133,33 @@
json.dump(checksum, f, indent=2) json.dump(checksum, f, indent=2)
''; '';
updateHint = ''
To create or update the lock file, run:
bash -c $(nix-build ${config.lock.refresh.drvPath} --no-link)/bin/refresh
Alternatively `nix run` the .lock attribute of your package.
'';
errorMissingFile = '' errorMissingFile = ''
The lock file ${config.paths.package}/${config.paths.lockFile} The lock file ${config.paths.package}/${config.paths.lockFile}
for drv-parts module '${config.name}' is missing. for drv-parts module '${config.name}' is missing.
To update it without flakes: ${updateHint}
bash -c $(nix-build ${config.lock.refresh.drvPath} --no-link)/bin/refresh
To update it using flakes:
nix run -L .#${config.name}.config.lock.refresh
''; '';
errorOutdated = '' errorOutdated = ''
The lock file ${config.paths.package}/${config.paths.lockFile} The lock file ${config.paths.package}/${config.paths.lockFile}
for drv-parts module '${config.name}' is outdated. for drv-parts module '${config.name}' is outdated.
To update it without flakes: ${updateHint}
bash -c $(nix-build ${config.lock.refresh.drvPath} --no-link)/bin/refresh
To update it using flakes:
nix run -L .#${config.name}.config.lock.refresh
''; '';
errorOutdatedField = field: '' errorOutdatedField = field: ''
The lock file ${config.paths.package}/${config.paths.lockFile} The lock file ${config.paths.package}/${config.paths.lockFile}
for drv-parts module '${config.name}' does not contain field `${field}`. for drv-parts module '${config.name}' does not contain field `${field}`.
To update it without flakes: ${updateHint}
bash -c $(nix-build ${config.lock.refresh.drvPath} --no-link)/bin/refresh
To update it using flakes:
nix run -L .#${config.name}.config.lock.refresh
''; '';
fileContent = fileContent =