soapysdr: add as python module
Use "toPythonModule" function to make python interface available.
This commit is contained in:
parent
8b60bfd5d9
commit
4097ffcc29
@ -1,7 +1,8 @@
|
|||||||
{ stdenv, lib, lndir, makeWrapper
|
{ stdenv, lib, lndir, makeWrapper
|
||||||
, fetchFromGitHub, cmake
|
, fetchFromGitHub, cmake
|
||||||
, libusb, pkgconfig
|
, libusb, pkgconfig
|
||||||
, python, swig2, numpy, ncurses
|
, usePython ? false
|
||||||
|
, python, ncurses, swig2
|
||||||
, extraPackages ? []
|
, extraPackages ? []
|
||||||
} :
|
} :
|
||||||
|
|
||||||
@ -24,12 +25,14 @@ in stdenv.mkDerivation {
|
|||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake makeWrapper pkgconfig ];
|
nativeBuildInputs = [ cmake makeWrapper pkgconfig ];
|
||||||
buildInputs = [ libusb ncurses numpy python swig2 ];
|
buildInputs = [ libusb ncurses ]
|
||||||
|
++ lib.optionals usePython [ python swig2 ];
|
||||||
|
|
||||||
|
propagatedBuildInputs = lib.optional usePython python.pkgs.numpy;
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
"-DCMAKE_BUILD_TYPE=Release"
|
"-DCMAKE_BUILD_TYPE=Release"
|
||||||
"-DUSE_PYTHON_CONFIG=ON"
|
] ++ lib.optional usePython "-DUSE_PYTHON_CONFIG=ON";
|
||||||
];
|
|
||||||
|
|
||||||
postFixup = lib.optionalString (lib.length extraPackages != 0) ''
|
postFixup = lib.optionalString (lib.length extraPackages != 0) ''
|
||||||
# Join all plugins via symlinking
|
# Join all plugins via symlinking
|
||||||
|
@ -14097,12 +14097,11 @@ in
|
|||||||
|
|
||||||
soapyhackrf = callPackage ../applications/radio/soapyhackrf { };
|
soapyhackrf = callPackage ../applications/radio/soapyhackrf { };
|
||||||
|
|
||||||
soapysdr = callPackage ../applications/radio/soapysdr { inherit (python3Packages) python numpy; };
|
soapysdr = callPackage ../applications/radio/soapysdr { };
|
||||||
|
|
||||||
soapyremote = callPackage ../applications/radio/soapyremote { };
|
soapyremote = callPackage ../applications/radio/soapyremote { };
|
||||||
|
|
||||||
soapysdr-with-plugins = callPackage ../applications/radio/soapysdr {
|
soapysdr-with-plugins = callPackage ../applications/radio/soapysdr {
|
||||||
inherit (python3Packages) python numpy;
|
|
||||||
extraPackages = [
|
extraPackages = [
|
||||||
limesuite
|
limesuite
|
||||||
soapyairspy
|
soapyairspy
|
||||||
|
@ -1325,6 +1325,16 @@ in {
|
|||||||
|
|
||||||
snapcast = callPackage ../development/python-modules/snapcast { };
|
snapcast = callPackage ../development/python-modules/snapcast { };
|
||||||
|
|
||||||
|
soapysdr = toPythonModule (pkgs.soapysdr.override {
|
||||||
|
python = self.python;
|
||||||
|
usePython = true;
|
||||||
|
});
|
||||||
|
|
||||||
|
soapysdr-with-plugins = toPythonModule (pkgs.soapysdr-with-plugins.override {
|
||||||
|
python = self.python;
|
||||||
|
usePython = true;
|
||||||
|
});
|
||||||
|
|
||||||
sparse = callPackage ../development/python-modules/sparse { };
|
sparse = callPackage ../development/python-modules/sparse { };
|
||||||
|
|
||||||
spglib = callPackage ../development/python-modules/spglib { };
|
spglib = callPackage ../development/python-modules/spglib { };
|
||||||
@ -1953,7 +1963,7 @@ in {
|
|||||||
certifi = callPackage ../development/python-modules/certifi { };
|
certifi = callPackage ../development/python-modules/certifi { };
|
||||||
|
|
||||||
certipy = callPackage ../development/python-modules/certipy {};
|
certipy = callPackage ../development/python-modules/certipy {};
|
||||||
|
|
||||||
characteristic = callPackage ../development/python-modules/characteristic { };
|
characteristic = callPackage ../development/python-modules/characteristic { };
|
||||||
|
|
||||||
chart-studio = callPackage ../development/python-modules/chart-studio { };
|
chart-studio = callPackage ../development/python-modules/chart-studio { };
|
||||||
|
Loading…
Reference in New Issue
Block a user