diff options
author | Jan Tojnar <jtojnar@gmail.com> | 2021-04-24 02:50:53 +0200 |
---|---|---|
committer | Jan Tojnar <jtojnar@gmail.com> | 2021-04-24 02:50:53 +0200 |
commit | d788c091b6348dd897c438a1ec2ad40822170e3c (patch) | |
tree | 30cfa5550bdef22bf6dff67d0747fe0df3bd650c | |
parent | d9a0f79acf17d9259aabf2cb148bc83f76c54841 (diff) |
common-updater-scripts: remove lib dependency
So that the script can be used outside of nixpkgs.
-rwxr-xr-x | pkgs/common-updater/scripts/update-source-version | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/pkgs/common-updater/scripts/update-source-version b/pkgs/common-updater/scripts/update-source-version index 90543a9cfc6a0..831f65e4d90da 100755 --- a/pkgs/common-updater/scripts/update-source-version +++ b/pkgs/common-updater/scripts/update-source-version @@ -99,11 +99,10 @@ if [[ -z "$oldUrl" ]]; then die "Couldn't evaluate source url from '$attr.src'!" fi -drvName=$(nix-instantiate $systemArg --eval -E "with import ./. {}; lib.getName $attr" | tr -d '"') -oldVersion=$(nix-instantiate $systemArg --eval -E "with import ./. {}; $attr.${versionKey} or (lib.getVersion $attr)" | tr -d '"') +oldVersion=$(nix-instantiate $systemArg --eval -E "with import ./. {}; $attr.${versionKey} or (builtins.parseDrvName $attr.name).version" | tr -d '"') -if [[ -z "$drvName" || -z "$oldVersion" ]]; then - die "Couldn't evaluate name and version from '$attr.name'!" +if [[ -z "$oldVersion" ]]; then + die "Couldn't find out the old version of '$attr'!" fi if [[ "$oldVersion" = "$newVersion" ]]; then |