diff --git a/flake.lock b/flake.lock index d5cecc2d..f97b5c0d 100644 --- a/flake.lock +++ b/flake.lock @@ -92,29 +92,12 @@ "type": "github" } }, - "nixpkgs-for-deal": { - "locked": { - "lastModified": 1700490099, - "narHash": "sha256-IDZGtMvddtEdYr7BUtXsQNPhVXcLzWj6AC9s1wRkZlo=", - "owner": "Luis-Hebendanz", - "repo": "nixpkgs", - "rev": "32ea44ece77a5bad662685acf4652cc984e2df3f", - "type": "github" - }, - "original": { - "owner": "Luis-Hebendanz", - "ref": "fix_python_deal", - "repo": "nixpkgs", - "type": "github" - } - }, "root": { "inputs": { "disko": "disko", "flake-parts": "flake-parts", "nixos-generators": "nixos-generators", "nixpkgs": "nixpkgs", - "nixpkgs-for-deal": "nixpkgs-for-deal", "sops-nix": "sops-nix", "treefmt-nix": "treefmt-nix" } diff --git a/flake.nix b/flake.nix index cad84578..b2f71aac 100644 --- a/flake.nix +++ b/flake.nix @@ -6,9 +6,6 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small"; - #nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small"; - # https://github.com/NixOS/nixpkgs/pull/265872 - nixpkgs-for-deal.url = "github:Luis-Hebendanz/nixpkgs/fix_python_deal"; disko.url = "github:nix-community/disko"; disko.inputs.nixpkgs.follows = "nixpkgs"; diff --git a/pkgs/clan-cli/clan_cli/deal.py b/pkgs/clan-cli/clan_cli/deal.py deleted file mode 100644 index 0cf0ab22..00000000 --- a/pkgs/clan-cli/clan_cli/deal.py +++ /dev/null @@ -1,27 +0,0 @@ -from collections.abc import Callable -from types import ModuleType -from typing import Any, Protocol - - -class AnyCall(Protocol): - def __call__(self, *args: Any, **kwargs: Any) -> Any: - ... - - -class FakeDeal: - def __getattr__(self, name: str) -> AnyCall: - return self.mock_call - - def mock_call(self, *args: Any, **kwargs: Any) -> Callable[[AnyCall], AnyCall]: - def wrapper(func: AnyCall) -> AnyCall: - return func - - return wrapper - - -try: - import deal as real_deal - - deal: ModuleType | FakeDeal = real_deal -except ImportError: - deal = FakeDeal() diff --git a/pkgs/clan-cli/clan_cli/nix.py b/pkgs/clan-cli/clan_cli/nix.py index fb983772..34cc5a29 100644 --- a/pkgs/clan-cli/clan_cli/nix.py +++ b/pkgs/clan-cli/clan_cli/nix.py @@ -5,9 +5,7 @@ import tempfile from pathlib import Path from typing import Any -from .deal import deal from .dirs import nixpkgs_flake, nixpkgs_source -from .errors import ClanError def nix_command(flags: list[str]) -> list[str]: @@ -85,7 +83,6 @@ def nix_metadata(flake_url: str | Path) -> dict[str, Any]: return data -@deal.raises(ClanError) def nix_shell(packages: list[str], cmd: list[str]) -> list[str]: # we cannot use nix-shell inside the nix sandbox # in our tests we just make sure we have all the packages diff --git a/pkgs/clan-cli/clan_cli/vms/run.py b/pkgs/clan-cli/clan_cli/vms/run.py index 9fbdba79..338268d2 100644 --- a/pkgs/clan-cli/clan_cli/vms/run.py +++ b/pkgs/clan-cli/clan_cli/vms/run.py @@ -39,7 +39,7 @@ def graphics_options(vm: VmConfig) -> list[str]: # Check if the version is greater than 8.1.3 to enable virtio audio # if get_qemu_version() > [8, 1, 3]: - common = ["-audio", "driver=pa,model=virtio"] + # common = ["-audio", "driver=pa,model=virtio"] if vm.wayland: # fmt: off diff --git a/pkgs/clan-cli/default.nix b/pkgs/clan-cli/default.nix index d2d32c71..6bb6a649 100644 --- a/pkgs/clan-cli/default.nix +++ b/pkgs/clan-cli/default.nix @@ -29,7 +29,6 @@ , gnupg , e2fsprogs , mypy -, deal , rope , clan-core-path , writeShellScriptBin @@ -48,7 +47,6 @@ let pytest-subprocess pytest-xdist pytest-timeout - deal remote-pdb ipdb openssh diff --git a/pkgs/clan-cli/flake-module.nix b/pkgs/clan-cli/flake-module.nix index 09a76a55..cd1ae1bb 100644 --- a/pkgs/clan-cli/flake-module.nix +++ b/pkgs/clan-cli/flake-module.nix @@ -1,6 +1,6 @@ { inputs, self, lib, ... }: { - perSystem = { self', pkgs, system, ... }: + perSystem = { self', pkgs, ... }: let flakeLock = lib.importJSON (self + /flake.lock); flakeInputs = (builtins.removeAttrs inputs [ "self" ]); @@ -35,9 +35,6 @@ packages = { clan-cli = pkgs.python3.pkgs.callPackage ./default.nix { inherit (inputs) nixpkgs; - # inherit (inputs) democlan; - inherit (inputs.nixpkgs-for-deal.legacyPackages.${system}.python3Packages) deal; - #inherit (inputs.nixpkgs-for-deal.legacyPackages.${system}.python3Packages) schemathesis; clan-core-path = clanCoreWithVendoredDeps; }; default = self'.packages.clan-cli; diff --git a/pkgs/clan-cli/pyproject.toml b/pkgs/clan-cli/pyproject.toml index cd6fc12b..eb046085 100644 --- a/pkgs/clan-cli/pyproject.toml +++ b/pkgs/clan-cli/pyproject.toml @@ -24,7 +24,6 @@ norecursedirs = "tests/helpers" markers = ["impure", "with_core"] [tool.mypy] -plugins = ["deal.mypy"] python_version = "3.11" warn_redundant_casts = true disallow_untyped_calls = true diff --git a/pkgs/clan-cli/tests/test_with_deal.py b/pkgs/clan-cli/tests/test_with_deal.py deleted file mode 100644 index 6d83e851..00000000 --- a/pkgs/clan-cli/tests/test_with_deal.py +++ /dev/null @@ -1,8 +0,0 @@ -import deal - -from clan_cli import nix - - -@deal.cases(nix.nix_shell) -def test_nix_shell(case: deal.TestCase) -> None: - case()