about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/umockdev
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-01-15 10:30:44 +0000
committerAlyssa Ross <hi@alyssa.is>2021-01-15 10:30:44 +0000
commite0794be8a0d11e90461e5a9c85012a36b93ec976 (patch)
treeefd9cbc55ea3322867bf601c4d536758a3dd5fcc /nixpkgs/pkgs/development/libraries/umockdev
parent3538874082ded7647b1ccec0343c7c1e882cfef3 (diff)
parent1a57d96edd156958b12782e8c8b6a374142a7248 (diff)
downloadnixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.gz
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.bz2
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.lz
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.xz
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.zst
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.zip
Merge commit '1a57d96edd156958b12782e8c8b6a374142a7248'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/umockdev')
-rw-r--r--nixpkgs/pkgs/development/libraries/umockdev/default.nix60
-rw-r--r--nixpkgs/pkgs/development/libraries/umockdev/disable-failed-test.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/umockdev/fix-test-paths.patch12
3 files changed, 35 insertions, 50 deletions
diff --git a/nixpkgs/pkgs/development/libraries/umockdev/default.nix b/nixpkgs/pkgs/development/libraries/umockdev/default.nix
index 1c0b70f6896a..5050650635f4 100644
--- a/nixpkgs/pkgs/development/libraries/umockdev/default.nix
+++ b/nixpkgs/pkgs/development/libraries/umockdev/default.nix
@@ -1,41 +1,46 @@
-{ stdenv, fetchurl, fetchpatch, pkgconfig
-, gobject-introspection, glib, systemd, libgudev, vala
-, usbutils, which, python3 }:
+{ stdenv
+, docbook_xsl
+, fetchurl
+, glib
+, gobject-introspection
+, gtk-doc
+, libgudev
+, meson
+, ninja
+, pkg-config
+, python3
+, systemd
+, usbutils
+, vala
+, which
+}:
 
 stdenv.mkDerivation rec {
   pname = "umockdev";
-  version = "0.13.1";
+  version = "0.15.4";
 
   outputs = [ "bin" "out" "dev" "doc" ];
 
   src = fetchurl {
     url = "https://github.com/martinpitt/umockdev/releases/download/${version}/${pname}-${version}.tar.xz";
-    sha256 = "197a169imiirgm73d9fn9234cx56agyw9d2f47h7f1d8s2d51lla";
+    sha256 = "09k8jwvsphd97hcagf0zaf0hwzlzq2r8jfgbmvj55k7ylrg8hjxg";
   };
 
-  patches = [
-    ./fix-test-paths.patch
-    # https://github.com/NixOS/nixpkgs/commit/9960a2be9b32a6d868046c5bfa188b9a0dd66682#commitcomment-34734461
-    ./disable-failed-test.patch
-    # https://github.com/martinpitt/umockdev/pull/93
-    (fetchpatch {
-      url = "https://github.com/abbradar/umockdev/commit/ce22f893bf50de0b32760238a3e2cfb194db89e9.patch";
-      sha256 = "01q3qhs30x8hl23iigimsa2ikbiw8y8y0bpmh02mh1my87shpwnx";
-    })
+  mesonFlags = [
+    "-Dgtk_doc=true"
   ];
 
-  # autoreconfHook complains if we try to build the documentation
-  postPatch = ''
-    echo 'EXTRA_DIST =' > docs/gtk-doc.make
-  '';
-
-  preCheck = ''
-    patchShebangs tests/test-static-code
-  '';
-
   buildInputs = [ glib systemd libgudev ];
 
-  nativeBuildInputs = [ pkgconfig vala gobject-introspection ];
+  nativeBuildInputs = [
+    docbook_xsl
+    gobject-introspection
+    gtk-doc
+    meson
+    ninja
+    pkg-config
+    vala
+  ];
 
   checkInputs = [ python3 which usbutils ];
 
@@ -43,10 +48,15 @@ stdenv.mkDerivation rec {
 
   doCheck = true;
 
+  postInstall = ''
+    mkdir -p $doc/share/doc/umockdev/
+    mv docs/reference $doc/share/doc/umockdev/
+  '';
+
   meta = with stdenv.lib; {
     description = "Mock hardware devices for creating unit tests";
     license = licenses.lgpl2;
-    maintainers = with maintainers; [];
+    maintainers = with maintainers; [ flokli ];
     platforms = with platforms; linux;
   };
 }
diff --git a/nixpkgs/pkgs/development/libraries/umockdev/disable-failed-test.patch b/nixpkgs/pkgs/development/libraries/umockdev/disable-failed-test.patch
deleted file mode 100644
index 69e74dd38b8d..000000000000
--- a/nixpkgs/pkgs/development/libraries/umockdev/disable-failed-test.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/tests/test-umockdev-vala.vala b/tests/test-umockdev-vala.vala
-index 8b104b2..d9889b8 100644
---- a/tests/test-umockdev-vala.vala
-+++ b/tests/test-umockdev-vala.vala
-@@ -668,7 +668,7 @@ main (string[] args)
- 
-   /* tests for mocking ioctls */
-   Test.add_func ("/umockdev-testbed-vala/usbfs_ioctl_static", t_usbfs_ioctl_static);
--  Test.add_func ("/umockdev-testbed-vala/usbfs_ioctl_tree", t_usbfs_ioctl_tree);
-+  /* Test.add_func ("/umockdev-testbed-vala/usbfs_ioctl_tree", t_usbfs_ioctl_tree); */
-   Test.add_func ("/umockdev-testbed-vala/usbfs_ioctl_tree_with_default_device", t_usbfs_ioctl_tree_with_default_device);
-   Test.add_func ("/umockdev-testbed-vala/usbfs_ioctl_tree_override_default_device", t_usbfs_ioctl_tree_override_default_device);
-   Test.add_func ("/umockdev-testbed-vala/usbfs_ioctl_tree_xz", t_usbfs_ioctl_tree_xz);
diff --git a/nixpkgs/pkgs/development/libraries/umockdev/fix-test-paths.patch b/nixpkgs/pkgs/development/libraries/umockdev/fix-test-paths.patch
deleted file mode 100644
index 53015d662684..000000000000
--- a/nixpkgs/pkgs/development/libraries/umockdev/fix-test-paths.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ru3 umockdev-0.13.1/tests/test-umockdev.c umockdev-0.13.1-new/tests/test-umockdev.c
---- umockdev-0.13.1/tests/test-umockdev.c	2019-08-18 20:39:39.708262517 +0300
-+++ umockdev-0.13.1-new/tests/test-umockdev.c	2019-08-18 21:04:27.688761503 +0300
-@@ -1084,7 +1084,7 @@
- 
-     /* sys/ in other dir should not be trapped */
-     errno = 0;
--    dirfd = open("/run", O_RDONLY | O_DIRECTORY);
-+    dirfd = open("/tmp", O_RDONLY | O_DIRECTORY);
-     g_assert_cmpint(openat(dirfd, "sys", O_RDONLY), <, 0);
-     g_assert_cmpint(errno, ==, ENOENT);
-     g_assert_cmpint(openat64(dirfd, "sys", O_RDONLY), <, 0);