minimal-x86-64/nixos-minimal-25.05.813814.ac62194c3917-x86_64-linux/nix-store.squashfs.d/crs1ks6b3513ymkmxn8g4iivxz95gvkf-nixos-25.05.813814.ac62194c3917/nixos/pkgs/development/julia-modules/python
Parses JSON data with PythonPython toml.load file parser
SHA-256ce89e5e6cfed6116d703c4c61630fe762704bbf8654f2fa456604464bc9f8a03
MaleculeH₂(Db₂F)
Evidence
⋯9 lines
10
11
12registry_path = Path(sys.argv[1])
13package_overrides = json.loads(sys.argv[2])
14desired_packages_path = Path(sys.argv[3])
15out_path = Path(sys.argv[4])
16
17with open(desired_packages_path, "r") as f:
18 desired_packages = yaml.safe_load(f) or []
19
20registry = toml.load(registry_path / "Registry.toml")
21
22def ensure_version_valid(version):
23 """
24 Ensure a version string is a valid Julia-parsable …
25:17… lly matter what it looks like as it's just used for overrides.
26 """
27 return re.sub('[^0-9\.]','', version)
28
29with open(out_path, "w") as f:
30 f.write("{fetchgit}:\n")
31 f.write("{\n")
⋯5 lines
51:24… all_versions[pkg["version"]]
52
53 if not "nix-sha256" in version_to_use:
54 raise KeyError(f"""Couldn't find nix-sha256 hash for {pkg["name"]} {pkg["version"]} in {versions_toml}. This might indicate that we failed to prefetch the hash when computing the augmented registry. Was there a relevant failure in {registry_path / "f …