Unverified Commit 39fa58b4 authored by Matt Sturgeon's avatar Matt Sturgeon
Browse files

keymap-drawer: switch to fixpoint-args

buildPythonPackage recently added fixpoint-args support (finalAttrs).
parent c6f2ee49
Loading
Loading
Loading
Loading
+5 −14
Original line number Diff line number Diff line
@@ -6,7 +6,6 @@
  fetchFromGitHub,
  pythonOlder,

  keymap-drawer,
  nix-update-script,
  pcpp,
  platformdirs,
@@ -19,11 +18,8 @@
  tree-sitter-grammars,
  versionCheckHook,
}:
let
buildPythonPackage (finalAttrs: {
  version = "0.22.1";
in
buildPythonPackage {
  inherit version;
  pname = "keymap-drawer";
  pyproject = true;
  disabled = pythonOlder "3.12";
@@ -31,7 +27,7 @@ buildPythonPackage {
  src = fetchFromGitHub {
    owner = "caksoylar";
    repo = "keymap-drawer";
    tag = "v${version}";
    tag = "v${finalAttrs.version}";
    hash = "sha256-X3O5yspEdey03YQ6JsYN/DE9NUiq148u1W6LQpUQ3ns=";
  };

@@ -58,20 +54,15 @@ buildPythonPackage {

  pythonImportsCheck = [ "keymap_drawer" ];

  versionCheckProgram = "${placeholder "out"}/bin/keymap";

  passthru.tests = callPackages ./tests {
    # Explicitly pass the correctly scoped package.
    # The top-level package will still resolve to itself, because the way
    # `toPythonApplication` interacts with scopes is weird.
    inherit keymap-drawer;
    keymap-drawer = finalAttrs.finalPackage;
  };
  passthru.updateScript = nix-update-script { };

  meta = {
    description = "Module and CLI tool to help parse and draw keyboard layouts";
    homepage = "https://github.com/caksoylar/keymap-drawer";
    changelog = "https://github.com/caksoylar/keymap-drawer/releases/tag/v${version}";
    changelog = "https://github.com/caksoylar/keymap-drawer/releases/tag/${finalAttrs.src.tag}";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [
      MattSturgeon
@@ -83,4 +74,4 @@ buildPythonPackage {
    # incompatibility, thanks to a Python override
    broken = lib.versionAtLeast tree-sitter.version "0.25.0";
  };
}
})