2023-05-24 13:37:59 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, autoreconfHook
|
|
|
|
, pkg-config
|
|
|
|
, libosmocore
|
|
|
|
, lksctp-tools
|
|
|
|
, libosmo-netif
|
|
|
|
, libosmo-sccp
|
|
|
|
, libasn1c
|
|
|
|
, python3
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
inherit (stdenv) isLinux;
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "osmo-iuh";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "1.5.0";
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "osmocom";
|
|
|
|
repo = "osmo-iuh";
|
2023-07-15 17:15:38 +00:00
|
|
|
rev = version;
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-rAU2+NxD+j2jntZ7dHvakv2aTsfzAg0+SFDHtSJNpn8=";
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
prePatch = ''
|
|
|
|
substituteInPlace src/../asn1/utils/asn1tostruct.py \
|
|
|
|
--replace '#!/usr/bin/env python3' '#!${python3}/bin/python3'
|
|
|
|
'';
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
echo "${version}" > .tarball-version
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
pkg-config
|
|
|
|
python3
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libosmocore
|
|
|
|
lksctp-tools
|
|
|
|
libosmo-netif
|
|
|
|
libosmo-sccp
|
|
|
|
libasn1c
|
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Osmocom IuH library";
|
|
|
|
homepage = "https://osmocom.org/projects/osmohnbgw/wiki";
|
|
|
|
license = lib.licenses.agpl3Plus;
|
|
|
|
maintainers = with lib.maintainers; [ janik ];
|
|
|
|
platforms = lib.platforms.linux;
|
|
|
|
};
|
|
|
|
}
|