Skip to content

Commit 1ff0690

Browse files
Allow arbitrary overrides of the form --override ... github:... (#84)
1 parent 2fc3fbb commit 1ff0690

3 files changed

Lines changed: 19 additions & 2 deletions

File tree

CHANGELOG

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# 0.2.1
2+
3+
* Allow arbitrary overrides of the form `kup install ... --override ... github:...`
4+
5+
6+
# 0.2.0
7+
8+
* Removed `kup update` as it was functionally equivalent to `kup install`
9+
* Renamed `kup remove` to `kup uninstall` so as to make it clear its associated with the `kup install` operation and not the `kup add`
10+
* Added `kup publish` which allows uploading a package to a cachix cache and pinning it to it's uri
11+
* Added the ability to query the `k-framework-binary.cachix.org` cache to download pre-built binaries of a package if they exist in the pinned cache

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
66
name = "kup"
7-
version = "0.2.0"
7+
version = "0.2.1"
88
description = "kup is a tool for managing installations of the K framework along with the different available semantics"
99
authors = [
1010
"Runtime Verification, Inc. <contact@runtimeverification.com>",

src/kup/__main__.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ def mk_override_args(package: GithubPackage, overrides: List[List[str]]) -> List
382382
)
383383
input_path = possible_input.follows
384384
possible_input = walk_package_metadata(inputs, input_path)
385-
if possible_input is None:
385+
if possible_input is None and not version_or_path.startswith('github:'):
386386
rich.print(
387387
f"❗ [red]'[green]{input}[/]' is not a valid input of the package '[green]{package.package_name.base}[/]'.\n"
388388
f"[/]To see the valid inputs, run '[blue]kup list {package.package_name.base} --inputs[/]'"
@@ -399,6 +399,12 @@ def mk_override_args(package: GithubPackage, overrides: List[List[str]]) -> List
399399
nix_overrides.append(git_path)
400400
nix_overrides.append('--update-input')
401401
nix_overrides.append('/'.join(input_path))
402+
elif version_or_path.startswith('github:'):
403+
nix_overrides.append('--override-input')
404+
nix_overrides.append(input)
405+
nix_overrides.append(version_or_path)
406+
nix_overrides.append('--update-input')
407+
nix_overrides.append(input)
402408
else:
403409
rich.print(
404410
f"❗ [red]Internal error when accessing package metadata. Expected '[green]{input}[/]' to be a direct input.[/]"

0 commit comments

Comments
 (0)