···
type=click.Choice(["frameworks", "gear", "plasma"]),
···
-
def main(set: str, version: str, nixpkgs: pathlib.Path, sources_url: str | None):
root_dir = nixpkgs / "pkgs/kde"
-
set_dir = root_dir / set
generated_dir = root_dir / "generated"
metadata = utils.KDERepoMetadata.from_json(generated_dir)
···
"frameworks": f"frameworks/{version}/",
"gear": f"release-service/{version}/src/",
"plasma": f"plasma/{version}/",
sources_url = f"https://download.kde.org/stable/{set_url}"
···
bs = bs4.BeautifulSoup(sources.text, features="html.parser")
for item in bs.select("tr")[3:]:
link = item.select_one("td:nth-child(2) a")
···
if project_name not in metadata.projects_by_name:
print(f"Warning: unknown tarball: {project_name}")
if version_and_ext.endswith(".sig"):
···
pkg_dir = set_dir / project_name
pkg_file = pkg_dir / "default.nix"
-
if project_name in PROJECTS_WITH_RUST:
-
print(f"Updating cargoDeps hash for {set}/{project_name}...")
-
f"kdePackages.{project_name}",
if not pkg_file.exists():
-
print(f"Generated new package: {set}/{project_name}")
pkg_dir.mkdir(parents=True, exist_ok=True)
with pkg_file.open("w") as fd:
fd.write(LEAF_TEMPLATE.render(pname=project_name) + "\n")
···
sources_dir = generated_dir / "sources"
sources_dir.mkdir(parents=True, exist_ok=True)
-
with (sources_dir / f"{set}.json").open("w") as fd:
json.dump(results, fd, indent=2)
if __name__ == "__main__":
···
type=click.Choice(["frameworks", "gear", "plasma"]),
···
+
def main(pkgset: str, version: str, nixpkgs: pathlib.Path, sources_url: str | None):
root_dir = nixpkgs / "pkgs/kde"
+
set_dir = root_dir / pkgset
generated_dir = root_dir / "generated"
metadata = utils.KDERepoMetadata.from_json(generated_dir)
···
"frameworks": f"frameworks/{version}/",
"gear": f"release-service/{version}/src/",
"plasma": f"plasma/{version}/",
sources_url = f"https://download.kde.org/stable/{set_url}"
···
bs = bs4.BeautifulSoup(sources.text, features="html.parser")
+
projects_to_update_rust = set()
for item in bs.select("tr")[3:]:
link = item.select_one("td:nth-child(2) a")
···
if project_name not in metadata.projects_by_name:
print(f"Warning: unknown tarball: {project_name}")
+
if project_name in PROJECTS_WITH_RUST:
+
projects_to_update_rust.add(project_name)
if version_and_ext.endswith(".sig"):
···
pkg_dir = set_dir / project_name
pkg_file = pkg_dir / "default.nix"
if not pkg_file.exists():
+
print(f"Generated new package: {pkgset}/{project_name}")
pkg_dir.mkdir(parents=True, exist_ok=True)
with pkg_file.open("w") as fd:
fd.write(LEAF_TEMPLATE.render(pname=project_name) + "\n")
···
sources_dir = generated_dir / "sources"
sources_dir.mkdir(parents=True, exist_ok=True)
+
with (sources_dir / f"{pkgset}.json").open("w") as fd:
json.dump(results, fd, indent=2)
+
for project_name in projects_to_update_rust:
+
print(f"Updating cargoDeps hash for {pkgset}/{project_name}...")
+
f"kdePackages.{project_name}",
if __name__ == "__main__":