python312Packages.samarium: init at 0.5.3

This commit is contained in:
Sigmanificient
2024-05-30 22:43:29 +02:00
parent 4f4846ed59
commit 1d974646ea
3 changed files with 56 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
--- a/src/samarium/tokenizer.py 2024-06-07 13:07:38.731314161 +0200
+++ b/src/samarium/tokenizer.py 2024-06-07 13:08:11.674488226 +0200
@@ -26,12 +26,12 @@
Token,
ignore_whitespace=True,
rules=[
- Rule(r"==<.*>==", converter=False, flags=re.M | re.S),
- Rule(r"==[^\n]*", converter=False, flags=re.M | re.S),
+ Rule(r"==<.*>==", flags=re.M | re.S, ignore=True),
+ Rule(r"==[^\n]*", flags=re.M | re.S, ignore=True),
Rule(
common.DOUBLE_QUOTED_STRING.pattern,
lambda x: x.replace("\n", r"\n"),
- re.S,
+ flags=re.S,
),
Rule(rf"{SM_BIT}+`?{SM_BIT}*|`{SM_BIT}*", to_number),
Rule(r"\w+"),

View File

@@ -0,0 +1,36 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
poetry-core,
crossandra,
dahlia,
pythonRelaxDepsHook
}:
buildPythonPackage rec {
pname = "samarium";
version = "0.5.3";
pyproject = true;
src = fetchFromGitHub {
owner = "samarium-lang";
repo = "samarium";
rev = "refs/tags/${version}";
hash = "sha256-4WVkTLE6OboNJE/f+6zS3xT1jEHUwV4HSLjl/PBP0FU=";
};
build-system = [ poetry-core pythonRelaxDepsHook ];
dependencies = [ crossandra dahlia ];
patches = [ ./crossandra-2-fix.patch ];
pythonRelaxDeps = [ "crossandra" ];
meta = with lib; {
changelog = "https://github.com/samarium-lang/samarium/blob/${src.rev}/CHANGELOG.md";
description = "The Samarium Programming Language";
license = licenses.mit;
homepage = "https://samarium-lang.github.io/Samarium";
maintainers = with maintainers; [ sigmanificient ];
};
}

View File

@@ -13590,6 +13590,8 @@ self: super: with self; {
saneyaml = callPackage ../development/python-modules/saneyaml { };
samarium = callPackage ../development/python-modules/samarium { };
sampledata = callPackage ../development/python-modules/sampledata { };
samplerate = callPackage ../development/python-modules/samplerate {