diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index dcc8cc3ee524..003e8d430402 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -9988,6 +9988,12 @@ githubId = 44377258; name = "Heitor Augusto"; }; + hekazu = { + name = "Henri Peurasaari"; + email = "henri.peurasaari@helsinki.fi"; + github = "hekazu"; + githubId = 16819092; + }; helium = { email = "helium.dev@tuta.io"; github = "helium18"; diff --git a/pkgs/by-name/tm/tmc-cli/package.nix b/pkgs/by-name/tm/tmc-cli/package.nix new file mode 100644 index 000000000000..03ec3a00e500 --- /dev/null +++ b/pkgs/by-name/tm/tmc-cli/package.nix @@ -0,0 +1,41 @@ +{ + lib, + fetchFromGitHub, + rustPlatform, + writableTmpDirAsHomeHook, + versionCheckHook, +}: + +rustPlatform.buildRustPackage (finalAttrs: { + pname = "tmc-cli"; + version = "1.1.2"; + + src = fetchFromGitHub { + owner = "rage"; + repo = "tmc-cli-rust"; + tag = "v${finalAttrs.version}"; + hash = "sha256-C7X+XTOqquqf/W29+A4wUUl6aDZYLlc5XokkIOrCbp0="; + }; + + cargoHash = "sha256-2KoHKTN1Jvyvk9ravi0a9D+RIFYa1KmHLJQzKT2iP9A="; + + nativeCheckInputs = [ + writableTmpDirAsHomeHook + ]; + + nativeInstallCheckInputs = [ + versionCheckHook + ]; + doInstallCheck = true; + versionCheckProgram = "${placeholder "out"}/bin/${finalAttrs.meta.mainProgram}"; + versionCheckProgramArg = "--version"; + + meta = { + description = "CLI for using the TestMyCode programming assignment evaluator"; + homepage = "https://github.com/rage/tmc-cli-rust"; + changelog = "https://github.com/rage/tmc-cli-rust/releases/tag/v${finalAttrs.version}"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ hekazu ]; + mainProgram = "tmc"; + }; +})