2019-08-18 10:33:15 -07:00
|
|
|
{ stdenv, fetchurl, fetchpatch, pkgconfig
|
|
|
|
, gobject-introspection, glib, systemd, libgudev, vala
|
|
|
|
, usbutils, which, python3 }:
|
2017-03-16 16:02:53 -07:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 05:41:18 -07:00
|
|
|
pname = "umockdev";
|
2019-08-18 10:33:15 -07:00
|
|
|
version = "0.13.1";
|
2017-03-16 16:02:53 -07:00
|
|
|
|
2018-08-12 05:08:00 -07:00
|
|
|
outputs = [ "bin" "out" "dev" "doc" ];
|
|
|
|
|
2019-08-18 10:33:15 -07:00
|
|
|
src = fetchurl {
|
2019-08-23 23:19:05 -07:00
|
|
|
url = "https://github.com/martinpitt/umockdev/releases/download/${version}/${pname}-${version}.tar.xz";
|
2019-08-18 10:33:15 -07:00
|
|
|
sha256 = "197a169imiirgm73d9fn9234cx56agyw9d2f47h7f1d8s2d51lla";
|
2017-03-16 16:02:53 -07:00
|
|
|
};
|
|
|
|
|
2019-08-18 10:33:15 -07:00
|
|
|
patches = [
|
|
|
|
./fix-test-paths.patch
|
2019-08-19 06:57:04 -07:00
|
|
|
# https://github.com/NixOS/nixpkgs/commit/9960a2be9b32a6d868046c5bfa188b9a0dd66682#commitcomment-34734461
|
|
|
|
./disable-failed-test.patch
|
2019-08-18 10:33:15 -07:00
|
|
|
# https://github.com/martinpitt/umockdev/pull/93
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/abbradar/umockdev/commit/ce22f893bf50de0b32760238a3e2cfb194db89e9.patch";
|
|
|
|
sha256 = "01q3qhs30x8hl23iigimsa2ikbiw8y8y0bpmh02mh1my87shpwnx";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2018-05-29 02:54:18 -07:00
|
|
|
# autoreconfHook complains if we try to build the documentation
|
|
|
|
postPatch = ''
|
|
|
|
echo 'EXTRA_DIST =' > docs/gtk-doc.make
|
|
|
|
'';
|
|
|
|
|
2019-08-18 10:33:15 -07:00
|
|
|
preCheck = ''
|
|
|
|
patchShebangs tests/test-static-code
|
|
|
|
'';
|
|
|
|
|
2018-02-16 18:55:17 -08:00
|
|
|
buildInputs = [ glib systemd libgudev ];
|
2017-03-16 16:02:53 -07:00
|
|
|
|
2019-08-18 10:33:15 -07:00
|
|
|
nativeBuildInputs = [ pkgconfig vala gobject-introspection ];
|
|
|
|
|
|
|
|
checkInputs = [ python3 which usbutils ];
|
2018-05-29 02:54:18 -07:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2017-03-16 16:02:53 -07:00
|
|
|
|
2020-12-22 17:18:33 -08:00
|
|
|
# Test fail with libusb 1.0.24
|
|
|
|
doCheck = false;
|
2019-08-18 10:33:15 -07:00
|
|
|
|
2017-03-16 16:02:53 -07:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Mock hardware devices for creating unit tests";
|
|
|
|
license = licenses.lgpl2;
|
2019-12-26 13:28:10 -08:00
|
|
|
maintainers = with maintainers; [];
|
2018-03-09 15:48:33 -08:00
|
|
|
platforms = with platforms; linux;
|
2017-03-16 16:02:53 -07:00
|
|
|
};
|
|
|
|
}
|