summary refs log tree commit diff
path: root/pkgs/os-specific/linux/ell
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2019-03-24 21:41:04 +0100
committerJan Tojnar <jtojnar@gmail.com>2019-08-13 15:37:15 +0200
commit4f7f9701aec8bead63680da52ae6f4ffb83066d8 (patch)
tree43aca80bb964dc95accb74f3f62e9ae9abedcea9 /pkgs/os-specific/linux/ell
parent4557b9f1f50aa813ae673fe6fcd30ca872968947 (diff)
downloadnixpkgs-4f7f9701aec8bead63680da52ae6f4ffb83066d8.tar
nixpkgs-4f7f9701aec8bead63680da52ae6f4ffb83066d8.tar.gz
nixpkgs-4f7f9701aec8bead63680da52ae6f4ffb83066d8.tar.bz2
nixpkgs-4f7f9701aec8bead63680da52ae6f4ffb83066d8.tar.lz
nixpkgs-4f7f9701aec8bead63680da52ae6f4ffb83066d8.tar.xz
nixpkgs-4f7f9701aec8bead63680da52ae6f4ffb83066d8.tar.zst
nixpkgs-4f7f9701aec8bead63680da52ae6f4ffb83066d8.zip
ell: run tests
Also add multiple outputs and some other details
Diffstat (limited to 'pkgs/os-specific/linux/ell')
-rw-r--r--pkgs/os-specific/linux/ell/default.nix35
-rw-r--r--pkgs/os-specific/linux/ell/fix-dbus-tests.patch65
2 files changed, 95 insertions, 5 deletions
diff --git a/pkgs/os-specific/linux/ell/default.nix b/pkgs/os-specific/linux/ell/default.nix
index 887c09691eb..5800fd15e54 100644
--- a/pkgs/os-specific/linux/ell/default.nix
+++ b/pkgs/os-specific/linux/ell/default.nix
@@ -1,21 +1,46 @@
-{ stdenv, fetchgit, autoreconfHook, pkgconfig }:
+{ stdenv
+, fetchgit
+, autoreconfHook
+, pkgconfig
+, dbus
+}:
 
 stdenv.mkDerivation rec {
   pname = "ell";
   version = "0.20";
 
+  outputs = [ "out" "dev" ];
+
   src = fetchgit {
-     url = https://git.kernel.org/pub/scm/libs/ell/ell.git;
+     url = "https://git.kernel.org/pub/scm/libs/${pname}/${pname}.git";
      rev = version;
      sha256 = "1g143dbc7cfks63k9yi2m8hpgfp9jj5b56s3hyxjzxm9dac3yn6c";
   };
 
-  nativeBuildInputs = [ autoreconfHook pkgconfig ];
+  patches = [
+    ./fix-dbus-tests.patch
+  ];
+
+  nativeBuildInputs = [
+    pkgconfig
+    autoreconfHook
+  ];
+
+  checkInputs = [
+    dbus
+  ];
+
+  enableParallelBuilding = true;
+
+  doCheck = true;
 
   meta = with stdenv.lib; {
-    homepage = https://git.kernel.org/pub/scm/libs/ell/ell.git;
+    homepage = https://01.org/ell;
     description = "Embedded Linux Library";
-    license = licenses.lgpl21;
+    longDescription = ''
+      The Embedded Linux* Library (ELL) provides core, low-level functionality for system daemons. It typically has no dependencies other than the Linux kernel, C standard library, and libdl (for dynamic linking). While ELL is designed to be efficient and compact enough for use on embedded Linux platforms, it is not limited to resource-constrained systems.
+    '';
+    license = licenses.lgpl21Plus;
     platforms = platforms.linux;
     maintainers = with maintainers; [ mic92 dtzWill ];
   };
diff --git a/pkgs/os-specific/linux/ell/fix-dbus-tests.patch b/pkgs/os-specific/linux/ell/fix-dbus-tests.patch
new file mode 100644
index 00000000000..b494ba8b43c
--- /dev/null
+++ b/pkgs/os-specific/linux/ell/fix-dbus-tests.patch
@@ -0,0 +1,65 @@
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -140,6 +140,7 @@
+ ell_libell_private_la_SOURCES = $(ell_libell_la_SOURCES)
+ 
+ AM_CFLAGS = -fvisibility=hidden -DUNITDIR=\""$(top_srcdir)/unit/"\" \
++				-DDBUS_DAEMON=\""$(DBUS_DAEMONDIR)/dbus-daemon"\" \
+ 				-DCERTDIR=\""$(top_builddir)/unit/"\"
+ 
+ pkgconfigdir = $(libdir)/pkgconfig
+--- a/configure.ac
++++ b/configure.ac
+@@ -14,6 +14,8 @@
+ 
+ AC_PREFIX_DEFAULT(/usr/local)
+ 
++PKG_PROG_PKG_CONFIG
++
+ COMPILER_FLAGS
+ 
+ AC_LANG_C
+@@ -131,6 +133,10 @@
+ 	AC_CHECK_PROG(have_xxd, [xxd], [yes], [no])
+ fi
+ 
++PKG_CHECK_MODULES(DBUS, dbus-1, dummy=yes,
++			AC_MSG_ERROR(D-Bus is required for running tests))
++PKG_CHECK_VAR(DBUS_DAEMONDIR, dbus-1, daemondir)
++
+ AM_CONDITIONAL(DBUS_TESTS, test "${little_endian}" = "yes")
+ AM_CONDITIONAL(CERT_TESTS, test "${have_openssl}" = "yes")
+ 
+--- a/unit/test-dbus-message-fds.c
++++ b/unit/test-dbus-message-fds.c
+@@ -51,7 +51,7 @@
+ 	char *prg_envp[1];
+ 	pid_t pid;
+ 
+-	prg_argv[0] = "/usr/bin/dbus-daemon";
++	prg_argv[0] = DBUS_DAEMON;
+ 	prg_argv[1] = "--nopidfile";
+ 	prg_argv[2] = "--nofork";
+ 	prg_argv[3] = "--config-file=" UNITDIR "dbus.conf";
+--- a/unit/test-dbus-properties.c
++++ b/unit/test-dbus-properties.c
+@@ -48,7 +48,7 @@
+ 	char *prg_envp[1];
+ 	pid_t pid;
+ 
+-	prg_argv[0] = "/usr/bin/dbus-daemon";
++	prg_argv[0] = DBUS_DAEMON;
+ 	prg_argv[1] = "--nopidfile";
+ 	prg_argv[2] = "--nofork";
+ 	prg_argv[3] = "--config-file=" UNITDIR "dbus.conf";
+--- a/unit/test-dbus.c
++++ b/unit/test-dbus.c
+@@ -45,7 +45,7 @@
+ 	char *prg_envp[1];
+ 	pid_t pid;
+ 
+-	prg_argv[0] = "/usr/bin/dbus-daemon";
++	prg_argv[0] = DBUS_DAEMON;
+ 	prg_argv[1] = "--nopidfile";
+ 	prg_argv[2] = "--nofork";
+ 	prg_argv[3] = "--config-file=" UNITDIR "dbus.conf";