mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-21 04:49:01 +02:00
libbladeRF: 2.0.2 -> 2.2.0
Add submodule from analogdevicesinc
This commit is contained in:
parent
e6aa4d76ed
commit
123b37297f
|
@ -1,15 +1,25 @@
|
||||||
{ stdenv, lib, fetchFromGitHub, fetchpatch, pkgconfig, cmake, git, doxygen, help2man, ncurses, tecla
|
{ stdenv, lib, fetchFromGitHub, fetchpatch, pkgconfig, cmake, git, doxygen, help2man, ncurses, tecla
|
||||||
, libusb1, udev }:
|
, libusb1, udev }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
let
|
||||||
version = "2.0.2";
|
# fetch submodule
|
||||||
|
noos = fetchFromGitHub {
|
||||||
|
owner = "analogdevicesinc";
|
||||||
|
repo = "no-OS";
|
||||||
|
rev = "0bba46e6f6f75785a65d425ece37d0a04daf6157";
|
||||||
|
sha256 = "0is79dhsyp9xmlnfdr1i5s1c22ipjafk9d35jpn5dynpvj86m99c";
|
||||||
|
};
|
||||||
|
|
||||||
|
version = "2.2.0";
|
||||||
|
|
||||||
|
in stdenv.mkDerivation {
|
||||||
name = "libbladeRF-${version}";
|
name = "libbladeRF-${version}";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "Nuand";
|
owner = "Nuand";
|
||||||
repo = "bladeRF";
|
repo = "bladeRF";
|
||||||
rev = "libbladeRF_v${version}";
|
rev = "libbladeRF_v${version}";
|
||||||
sha256 = "18qwljjdnf4lds04kc1zvslr5hh9cjnnjkcy07lbkrq7pj0pfnc6";
|
sha256 = "0mdj5dkqg69gp0xw6gkhp86nxnm9g7az5rplnncxkp4p1kr35rnl";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
|
@ -18,18 +28,14 @@ stdenv.mkDerivation rec {
|
||||||
++ lib.optionals stdenv.isLinux [ udev ]
|
++ lib.optionals stdenv.isLinux [ udev ]
|
||||||
++ lib.optionals stdenv.isDarwin [ ncurses ];
|
++ lib.optionals stdenv.isDarwin [ ncurses ];
|
||||||
|
|
||||||
|
|
||||||
|
postUnpack = ''
|
||||||
|
cp -r ${noos}/* source/thirdparty/analogdevicesinc/no-OS/
|
||||||
|
'';
|
||||||
|
|
||||||
# Fixup shebang
|
# Fixup shebang
|
||||||
prePatch = "patchShebangs host/utilities/bladeRF-cli/src/cmd/doc/generate.bash";
|
prePatch = "patchShebangs host/utilities/bladeRF-cli/src/cmd/doc/generate.bash";
|
||||||
|
|
||||||
# Fixes macos and freebsd compilation issue.
|
|
||||||
# https://github.com/Nuand/bladeRF/commit/0cb4ea888543b2dc75b876f7024e180854fbe9c3
|
|
||||||
patches = [ (fetchpatch {
|
|
||||||
name = "fix-OSX-and-FreeBSD-build.patch";
|
|
||||||
url = "https://github.com/Nuand/bladeRF/commit/0cb4ea88.diff";
|
|
||||||
sha256 = "1ccpa69vz2nlpdnxprh4rd1pgphk82z5lfmbrfdkn7srw6nxl469";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
# Let us avoid nettools as a dependency.
|
# Let us avoid nettools as a dependency.
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
sed -i 's/$(hostname)/hostname/' host/utilities/bladeRF-cli/src/cmd/doc/generate.bash
|
sed -i 's/$(hostname)/hostname/' host/utilities/bladeRF-cli/src/cmd/doc/generate.bash
|
||||||
|
|
Loading…
Reference in a new issue