2020-12-22 22:18:50 +00:00
|
|
|
{ stdenv
|
|
|
|
, docbook_xsl
|
|
|
|
, fetchurl
|
|
|
|
, glib
|
|
|
|
, gobject-introspection
|
|
|
|
, gtk-doc
|
|
|
|
, libgudev
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, python3
|
|
|
|
, systemd
|
|
|
|
, usbutils
|
|
|
|
, vala
|
|
|
|
, which
|
|
|
|
}:
|
2017-03-16 23:02:53 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "umockdev";
|
2020-12-22 22:18:50 +00:00
|
|
|
version = "0.15.2";
|
2017-03-16 23:02:53 +00:00
|
|
|
|
2018-08-12 13:08:00 +01:00
|
|
|
outputs = [ "bin" "out" "dev" "doc" ];
|
|
|
|
|
2019-08-18 18:33:15 +01:00
|
|
|
src = fetchurl {
|
2019-08-24 07:19:05 +01:00
|
|
|
url = "https://github.com/martinpitt/umockdev/releases/download/${version}/${pname}-${version}.tar.xz";
|
2020-12-22 22:18:50 +00:00
|
|
|
sha256 = "19f21qb9ckwvlm7yzpnc0vcp092qbkms2yrafc26b9a63v4imj52";
|
2017-03-16 23:02:53 +00:00
|
|
|
};
|
|
|
|
|
2020-12-22 22:18:50 +00:00
|
|
|
mesonFlags = [
|
|
|
|
"-Dgtk_doc=true"
|
2019-08-18 18:33:15 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
patchShebangs tests/test-static-code
|
|
|
|
'';
|
|
|
|
|
2018-02-17 02:55:17 +00:00
|
|
|
buildInputs = [ glib systemd libgudev ];
|
2017-03-16 23:02:53 +00:00
|
|
|
|
2020-12-22 22:18:50 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
docbook_xsl
|
|
|
|
gobject-introspection
|
|
|
|
gtk-doc
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
vala
|
|
|
|
];
|
2019-08-18 18:33:15 +01:00
|
|
|
|
|
|
|
checkInputs = [ python3 which usbutils ];
|
2018-05-29 10:54:18 +01:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2017-03-16 23:02:53 +00:00
|
|
|
|
2020-12-23 01:18:33 +00:00
|
|
|
# Test fail with libusb 1.0.24
|
2020-12-22 22:18:50 +00:00
|
|
|
# https://github.com/NixOS/nixpkgs/issues/107420
|
|
|
|
# https://github.com/martinpitt/umockdev/issues/115
|
2020-12-23 01:18:33 +00:00
|
|
|
doCheck = false;
|
2019-08-18 18:33:15 +01:00
|
|
|
|
2020-12-22 22:18:50 +00:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $doc/share/doc/umockdev/
|
|
|
|
mv docs/reference $doc/share/doc/umockdev/
|
|
|
|
'';
|
|
|
|
|
2017-03-16 23:02:53 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Mock hardware devices for creating unit tests";
|
|
|
|
license = licenses.lgpl2;
|
2020-12-22 22:18:50 +00:00
|
|
|
maintainers = with maintainers; [ flokli ];
|
2018-03-09 23:48:33 +00:00
|
|
|
platforms = with platforms; linux;
|
2017-03-16 23:02:53 +00:00
|
|
|
};
|
|
|
|
}
|