mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-17 22:28:55 +00:00
kalamine: modernize (#540637)
This commit is contained in:
@@ -1,26 +1,30 @@
|
||||
{
|
||||
lib,
|
||||
python3,
|
||||
python3Packages,
|
||||
fetchFromGitHub,
|
||||
versionCheckHook,
|
||||
writableTmpDirAsHomeHook,
|
||||
}:
|
||||
|
||||
python3.pkgs.buildPythonApplication (finalAttrs: {
|
||||
python3Packages.buildPythonApplication (finalAttrs: {
|
||||
pname = "kalamine";
|
||||
version = "0.40";
|
||||
pyproject = true;
|
||||
|
||||
__structuredAttrs = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "OneDeadKey";
|
||||
repo = "kalamine";
|
||||
rev = "v${finalAttrs.version}";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-9R8N5p+VNuiqTl3a0SSmJEVg3Ol76nROf43GsdOdJL8=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
python3.pkgs.hatchling
|
||||
build-system = [
|
||||
python3Packages.hatchling
|
||||
];
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
dependencies = with python3Packages; [
|
||||
click
|
||||
livereload
|
||||
lxml
|
||||
@@ -31,6 +35,19 @@ python3.pkgs.buildPythonApplication (finalAttrs: {
|
||||
|
||||
pythonImportsCheck = [ "kalamine" ];
|
||||
|
||||
# https://github.com/OneDeadKey/kalamine/blob/a9724bf6e93a34c740f9349b8811b2e51cc62c41/Makefile#L39
|
||||
preCheck = ''
|
||||
python -m kalamine.cli build layouts/*.toml
|
||||
'';
|
||||
|
||||
nativeCheckInputs = [
|
||||
python3Packages.pytestCheckHook
|
||||
versionCheckHook
|
||||
writableTmpDirAsHomeHook
|
||||
];
|
||||
versionCheckProgramArg = "version";
|
||||
versionCheckKeepEnvironment = [ "HOME" ];
|
||||
|
||||
meta = {
|
||||
description = "Keyboard Layout Maker";
|
||||
homepage = "https://github.com/OneDeadKey/kalamine/";
|
||||
|
||||
Reference in New Issue
Block a user