about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/osmocom/osmo-iuh/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/servers/osmocom/osmo-iuh/default.nix')
-rw-r--r--nixpkgs/pkgs/servers/osmocom/osmo-iuh/default.nix62
1 files changed, 62 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/servers/osmocom/osmo-iuh/default.nix b/nixpkgs/pkgs/servers/osmocom/osmo-iuh/default.nix
new file mode 100644
index 000000000000..56a94efbb02c
--- /dev/null
+++ b/nixpkgs/pkgs/servers/osmocom/osmo-iuh/default.nix
@@ -0,0 +1,62 @@
+{ 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";
+  version = "1.5.1";
+
+  src = fetchFromGitHub {
+    owner = "osmocom";
+    repo = "osmo-iuh";
+    rev = version;
+    hash = "sha256-1G5N74N3BH+XP4hr+w0a1wc2DaE/GXpSu3JiPo8UBhI=";
+  };
+
+  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;
+  };
+}