Merge pull request #248897 from flokli/pysim

pysim: init at unstable-2023-08-11
This commit is contained in:
Florian Klink 2023-08-21 14:25:07 +02:00 committed by GitHub
commit c5d067d0f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 187 additions and 0 deletions

View file

@ -0,0 +1,36 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, pytestCheckHook
}:
buildPythonPackage {
pname = "gsm0338";
version = "1.1.0";
format = "pyproject";
src = fetchFromGitHub {
owner = "dsch";
repo = "gsm0338";
rev = "1c036bd3b656b5075fdc221cbc578c4a47b42b1f";
hash = "sha256-EkUVd4d4Te8brHerygDc6KQSpiX11NrHYkcZSDRi05w=";
};
nativeBuildInputs = [
poetry-core
];
nativeCheckInputs = [
pytestCheckHook
];
pythonImportsCheck = [ "gsm0338" ];
meta = with lib; {
description = "Python codec for GSM 03.38";
homepage = "https://github.com/dsch/gsm0338";
license = licenses.mit;
maintainers = with maintainers; [ flokli janik ];
};
}

View file

@ -0,0 +1,72 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, setuptools
, pytestCheckHook
, pytest-asyncio
, colorlog
, smpp_pdu
, pyscard
, packaging
, gsm0338
, bidict
, jsonpath-ng
, termcolor
, pyyaml
, pycryptodomex
, construct
, pyserial
, pytlv
, cmd2
}:
buildPythonPackage {
pname = "pysim";
version = "unstable-2023-08-13";
format = "pyproject";
src = fetchFromGitHub {
owner = "osmocom";
repo = "pysim";
rev = "09ff0e2b433b7143d5b40b4494744569b805e554";
hash = "sha256-7IwIovGR0GcS1bidSqoytmombK6NkLSVAfKB2teW2JU=";
};
postPatch = ''
substituteInPlace setup.py --replace 'smpp.pdu @ git+https://github.com/hologram-io/smpp.pdu' 'smpp.pdu'
'';
nativeBuildInputs = [
setuptools
];
propagatedBuildInputs = [
bidict
cmd2
colorlog
construct
gsm0338
jsonpath-ng
packaging
pycryptodomex
pyscard
pyserial
pytlv
pyyaml
smpp_pdu
termcolor
];
nativeCheckInputs = [
pytestCheckHook
];
pythonImportsCheck = [ "pySim" ];
meta = with lib; {
description = "A python tool to program SIMs / USIMs / ISIMs.";
homepage = "https://github.com/osmocom/pysim";
license = licenses.gpl2;
maintainers = with maintainers; [ flokli janik ];
};
}

View file

@ -0,0 +1,30 @@
{ lib
, buildPythonPackage
, fetchPypi
, poetry-core
, setuptools
}:
buildPythonPackage rec {
pname = "pytlv";
version = "0.71";
format = "pyproject";
src = fetchPypi {
inherit pname version;
hash = "sha256-btxZ0oQzn1ZpwXihHlg6CduLh8nkerLV7SoFyXzJjVY=";
};
nativeBuildInputs = [
setuptools
];
pythonImportsCheck = [ "pytlv" ];
meta = with lib; {
description = "TLV (tag length lavue) data parser, especially useful for EMV tags parsing";
homepage = "https://github.com/timgabets/pytlv";
license = licenses.lgpl2;
maintainers = with maintainers; [ flokli janik ];
};
}

View file

@ -0,0 +1,41 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, pydantic
, requests
, pytestCheckHook
, pytest-asyncio
, setuptools
}:
buildPythonPackage {
pname = "smpp.pdu";
version = "unstable-2022-09-02";
format = "pyproject";
# Upstream was once mozes/smpp.pdu, but it's dead and Python 2 only.
src = fetchFromGitHub {
owner = "hologram-io";
repo = "smpp.pdu";
rev = "20acc840ded958898eeb35ae9a18df9b29bdaaac";
hash = "sha256-/icVexc2S8sbJqn4ioeIhYxyDFIENuCfsFhl0uAHa9g=";
};
nativeBuildInputs = [
setuptools
];
nativeCheckInputs = [
pytestCheckHook
];
pythonImportsCheck = [ "smpp.pdu" ];
meta = with lib; {
description = "Library for parsing Protocol Data Units (PDUs) in SMPP protocol";
homepage = "https://github.com/hologram-io/smpp.pdu";
license = licenses.asl20;
maintainers = with maintainers; [ flokli janik ];
};
}

View file

@ -4594,6 +4594,8 @@ self: super: with self; {
gsd = callPackage ../development/python-modules/gsd { };
gsm0338 = callPackage ../development/python-modules/gsm0338 { };
gspread = callPackage ../development/python-modules/gspread { };
gssapi = callPackage ../development/python-modules/gssapi {
@ -8192,6 +8194,8 @@ self: super: with self; {
pytest-pudb = callPackage ../development/python-modules/pytest-pudb { };
pytlv = callPackage ../development/python-modules/pytlv { };
python-codon-tables = callPackage ../development/python-modules/python-codon-tables { };
python-creole = callPackage ../development/python-modules/python-creole { };
@ -9823,6 +9827,8 @@ self: super: with self; {
pysigset = callPackage ../development/python-modules/pysigset { };
pysim = callPackage ../development/python-modules/pysim { };
pysimplegui = callPackage ../development/python-modules/pysimplegui { };
pysingleton = callPackage ../development/python-modules/pysingleton { };
@ -11806,6 +11812,8 @@ self: super: with self; {
smpplib = callPackage ../development/python-modules/smpplib { };
smpp_pdu = callPackage ../development/python-modules/smpp.pdu { };
snack = toPythonModule (pkgs.newt.override {
inherit (self) python;
});