python3Packages.sipsimple: rename and modernize
- Follow upstream and rename from `sipsimple` to `python3-sipsimple` - Use `finalAttrs` fixpoint pattern
This commit is contained in:
@@ -55,7 +55,7 @@ python3Packages.buildPythonApplication rec {
|
||||
python3-application
|
||||
python3-eventlib
|
||||
python3-gnutls
|
||||
sipsimple
|
||||
python3-sipsimple
|
||||
sqlobject
|
||||
standard-imghdr
|
||||
xcaplib
|
||||
|
||||
@@ -37,7 +37,7 @@ python3Packages.buildPythonApplication rec {
|
||||
msrplib
|
||||
python3-eventlib
|
||||
python3-gnutls
|
||||
sipsimple
|
||||
python3-sipsimple
|
||||
wokkel
|
||||
xcaplib
|
||||
];
|
||||
|
||||
+42
-45
@@ -20,44 +20,7 @@
|
||||
x264,
|
||||
python3-application,
|
||||
}:
|
||||
|
||||
let
|
||||
extDeps = {
|
||||
pjsip = rec {
|
||||
# Hardcoded in get_dependencies.sh, checked at buildtime
|
||||
# need tarball specifically for buildscript to detect it
|
||||
version = "2.10";
|
||||
src = fetchurl {
|
||||
url = "https://github.com/pjsip/pjproject/archive/${version}.tar.gz";
|
||||
hash = "sha256-k2pMW5hgG1IyVGOjl93xGrQQbGp7BPjcfN03fvu1l94=";
|
||||
};
|
||||
patches = [
|
||||
# Backported https://github.com/pjsip/pjproject/commit/4a8d180529d6ffb0760838b1f8cadc4cb5f7ac03
|
||||
./pjsip-0001-NEON.patch
|
||||
|
||||
# Backported https://github.com/pjsip/pjproject/commit/f56fd48e23982c47f38574a3fd93ebf248ef3762
|
||||
./pjsip-0002-RISC-V.patch
|
||||
|
||||
# Backported https://github.com/pjsip/pjproject/commit/f94b18ef6e0c0b5d34eb274f85ac0a3b2cf9107a
|
||||
./pjsip-0003-LoongArch64.patch
|
||||
];
|
||||
};
|
||||
zrtpcpp = rec {
|
||||
# Hardcoded in get_dependencies.sh, NOT checked at buildtime
|
||||
rev = "6b3cd8e6783642292bad0c21e3e5e5ce45ff3e03";
|
||||
src = fetchFromGitHub {
|
||||
owner = "wernerd";
|
||||
repo = "ZRTPCPP";
|
||||
inherit rev;
|
||||
hash = "sha256-pGng1Y9N51nGBpiZbn2NTx4t2NGg4qkmbghTscJVhIA=";
|
||||
postFetch = ''
|
||||
# fix build with gcc15
|
||||
sed -e '9i #include <cstdint>' -i $out/zrtp/EmojiBase32.cpp
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
applyPatchesWhenAvailable =
|
||||
extDep: dir:
|
||||
lib.optionalString (extDep ? patches) (
|
||||
@@ -67,7 +30,7 @@ let
|
||||
'') extDep.patches
|
||||
);
|
||||
in
|
||||
buildPythonPackage rec {
|
||||
buildPythonPackage (finalAttrs: {
|
||||
pname = "python3-sipsimple";
|
||||
version = "5.3.3.2";
|
||||
pyproject = true;
|
||||
@@ -75,7 +38,7 @@ buildPythonPackage rec {
|
||||
src = fetchFromGitHub {
|
||||
owner = "AGProjects";
|
||||
repo = "python3-sipsimple";
|
||||
tag = "${version}-mac";
|
||||
tag = "${finalAttrs.version}-mac";
|
||||
hash = "sha256-kDXVzLmgfXxm8phKrV7DvPuZ9O2iNFo1s6Lc0jcc/dM=";
|
||||
};
|
||||
|
||||
@@ -122,13 +85,13 @@ buildPythonPackage rec {
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
ln -s ${passthru.extDeps.pjsip.src} deps/${passthru.extDeps.pjsip.version}.tar.gz
|
||||
cp -r --no-preserve=all ${passthru.extDeps.zrtpcpp.src} deps/ZRTPCPP
|
||||
ln -s ${finalAttrs.passthru.extDeps.pjsip.src} deps/${finalAttrs.passthru.extDeps.pjsip.version}.tar.gz
|
||||
cp -r --no-preserve=all ${finalAttrs.passthru.extDeps.zrtpcpp.src} deps/ZRTPCPP
|
||||
|
||||
bash ./get_dependencies.sh
|
||||
''
|
||||
+ applyPatchesWhenAvailable extDeps.pjsip "deps/pjsip"
|
||||
+ applyPatchesWhenAvailable extDeps.zrtpcpp "deps/ZRTPCPP"
|
||||
+ applyPatchesWhenAvailable finalAttrs.passthru.extDeps.pjsip "deps/pjsip"
|
||||
+ applyPatchesWhenAvailable finalAttrs.passthru.extDeps.zrtpcpp "deps/ZRTPCPP"
|
||||
+ ''
|
||||
# Fails to link some static libs due to missing -lc DSO. Just use the compiler frontend instead of raw ld.
|
||||
substituteInPlace deps/pjsip/build/rules.mak \
|
||||
@@ -145,13 +108,47 @@ buildPythonPackage rec {
|
||||
pythonImportsCheck = [ "sipsimple" ];
|
||||
|
||||
passthru = {
|
||||
inherit extDeps;
|
||||
updateScript = nix-update-script {
|
||||
extraArgs = [
|
||||
"--version-regex"
|
||||
"^(.*)-mac$"
|
||||
];
|
||||
};
|
||||
extDeps = {
|
||||
pjsip = rec {
|
||||
# Hardcoded in get_dependencies.sh, checked at buildtime
|
||||
# need tarball specifically for buildscript to detect it
|
||||
version = "2.10";
|
||||
src = fetchurl {
|
||||
url = "https://github.com/pjsip/pjproject/archive/${version}.tar.gz";
|
||||
hash = "sha256-k2pMW5hgG1IyVGOjl93xGrQQbGp7BPjcfN03fvu1l94=";
|
||||
};
|
||||
patches = [
|
||||
# Backported https://github.com/pjsip/pjproject/commit/4a8d180529d6ffb0760838b1f8cadc4cb5f7ac03
|
||||
./pjsip-0001-NEON.patch
|
||||
|
||||
# Backported https://github.com/pjsip/pjproject/commit/f56fd48e23982c47f38574a3fd93ebf248ef3762
|
||||
./pjsip-0002-RISC-V.patch
|
||||
|
||||
# Backported https://github.com/pjsip/pjproject/commit/f94b18ef6e0c0b5d34eb274f85ac0a3b2cf9107a
|
||||
./pjsip-0003-LoongArch64.patch
|
||||
];
|
||||
};
|
||||
zrtpcpp = rec {
|
||||
# Hardcoded in get_dependencies.sh, NOT checked at buildtime
|
||||
rev = "6b3cd8e6783642292bad0c21e3e5e5ce45ff3e03";
|
||||
src = fetchFromGitHub {
|
||||
owner = "wernerd";
|
||||
repo = "ZRTPCPP";
|
||||
inherit rev;
|
||||
hash = "sha256-pGng1Y9N51nGBpiZbn2NTx4t2NGg4qkmbghTscJVhIA=";
|
||||
postFetch = ''
|
||||
# fix build with gcc15
|
||||
sed -e '9i #include <cstdint>' -i $out/zrtp/EmojiBase32.cpp
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
meta = {
|
||||
@@ -162,4 +159,4 @@ buildPythonPackage rec {
|
||||
teams = [ lib.teams.ngi ];
|
||||
maintainers = [ lib.maintainers.ethancedwards8 ];
|
||||
};
|
||||
}
|
||||
})
|
||||
@@ -451,6 +451,7 @@ mapAliases {
|
||||
sharkiqpy = throw "'sharkiqpy' has been renamed to/replaced by 'sharkiq'"; # Converted to throw 2025-10-29
|
||||
shippai = throw "shippai has been removed because the upstream repository was archived in 2023"; # added 2025-07-09
|
||||
sip_4 = throw "'sip_4' has been renamed to/replaced by 'sip4'"; # Converted to throw 2025-10-29
|
||||
sipsimple = lib.warnOnInstantiate "'sipsimple' has been renamed to 'python3-sipsimple' to fit upstream naming" python3-sipsimple; # added 2026-01-05
|
||||
slackclient = throw "'slackclient' has been renamed to/replaced by 'slack-sdk'"; # Converted to throw 2025-10-29
|
||||
smart_open = throw "'smart_open' has been renamed to/replaced by 'smart-open'"; # Converted to throw 2025-10-29
|
||||
smpp_pdu = throw "'smpp_pdu' has been renamed to/replaced by 'smpp-pdu'"; # Converted to throw 2025-10-29
|
||||
|
||||
@@ -15654,6 +15654,8 @@ self: super: with self; {
|
||||
|
||||
python3-saml = callPackage ../development/python-modules/python3-saml { };
|
||||
|
||||
python3-sipsimple = callPackage ../development/python-modules/python3-sipsimple { };
|
||||
|
||||
pythondialog = callPackage ../development/python-modules/pythondialog { };
|
||||
|
||||
pythonefl = callPackage ../development/python-modules/python-efl { };
|
||||
@@ -17324,8 +17326,6 @@ self: super: with self; {
|
||||
|
||||
siphashc = callPackage ../development/python-modules/siphashc { };
|
||||
|
||||
sipsimple = callPackage ../development/python-modules/sipsimple { };
|
||||
|
||||
sipyco = callPackage ../development/python-modules/sipyco { };
|
||||
|
||||
sirius = toPythonModule (
|
||||
|
||||
Reference in New Issue
Block a user