2020-12-27 14:24:52 +00:00
|
|
|
{ stdenv
|
|
|
|
, docbook_xsl
|
|
|
|
, fetchurl
|
|
|
|
, glib
|
|
|
|
, gobject-introspection
|
|
|
|
, gtk-doc
|
|
|
|
, libgudev
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, python3
|
|
|
|
, systemd
|
|
|
|
, usbutils
|
|
|
|
, vala
|
|
|
|
, which
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "umockdev";
|
2020-12-27 14:24:52 +00:00
|
|
|
version = "0.15.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
outputs = [ "bin" "out" "dev" "doc" ];
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/martinpitt/umockdev/releases/download/${version}/${pname}-${version}.tar.xz";
|
2020-12-27 14:24:52 +00:00
|
|
|
sha256 = "19f21qb9ckwvlm7yzpnc0vcp092qbkms2yrafc26b9a63v4imj52";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-12-27 14:24:52 +00:00
|
|
|
mesonFlags = [
|
|
|
|
"-Dgtk_doc=true"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
patchShebangs tests/test-static-code
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ glib systemd libgudev ];
|
|
|
|
|
2020-12-27 14:24:52 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
docbook_xsl
|
|
|
|
gobject-introspection
|
|
|
|
gtk-doc
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
vala
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
checkInputs = [ python3 which usbutils ];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2020-12-25 13:55:36 +00:00
|
|
|
# Test fail with libusb 1.0.24
|
2020-12-27 14:24:52 +00:00
|
|
|
# https://github.com/NixOS/nixpkgs/issues/107420
|
|
|
|
# https://github.com/martinpitt/umockdev/issues/115
|
2020-12-25 13:55:36 +00:00
|
|
|
doCheck = false;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-12-27 14:24:52 +00:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $doc/share/doc/umockdev/
|
|
|
|
mv docs/reference $doc/share/doc/umockdev/
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Mock hardware devices for creating unit tests";
|
|
|
|
license = licenses.lgpl2;
|
2020-12-27 14:24:52 +00:00
|
|
|
maintainers = with maintainers; [ flokli ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = with platforms; linux;
|
|
|
|
};
|
|
|
|
}
|