enpass: Updater fix. (#508183)
This commit is contained in:
@@ -131,17 +131,18 @@ let
|
||||
updater = {
|
||||
update = stdenv.mkDerivation {
|
||||
name = "enpass-update-script";
|
||||
SCRIPT = ./update_script.py;
|
||||
SCRIPT = toString ./update_script.py;
|
||||
|
||||
buildInputs = with python3Packages; [
|
||||
python
|
||||
requests
|
||||
packaging
|
||||
pathlib2
|
||||
six
|
||||
attrs
|
||||
];
|
||||
shellHook = ''
|
||||
exec python $SCRIPT --target pkgs/tools/security/enpass/data.json --repo ${baseUrl}
|
||||
exec python $SCRIPT --target pkgs/by-name/en/enpass/data.json --repo ${baseUrl}
|
||||
'';
|
||||
|
||||
};
|
||||
|
||||
@@ -33,7 +33,8 @@ def find_latest_version(arch):
|
||||
for package in packages.split("\n\n"):
|
||||
matches = version_selector.search(package)
|
||||
matched_version = matches.group('version') if matches and matches.group('version') else "0"
|
||||
parsed_version = version.parse(matched_version)
|
||||
try: parsed_version = version.parse(matched_version)
|
||||
except version.InvalidVersion: continue
|
||||
if parsed_version > last_version:
|
||||
path = path_selector.search(package).group('path')
|
||||
sha256 = hash_selector.search(package).group('sha256')
|
||||
|
||||
Reference in New Issue
Block a user