commit
39e6cffbfd
|
@ -1,4 +1,5 @@
|
|||
{ lib, stdenv
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchurl
|
||||
, pkg-config
|
||||
, meson
|
||||
|
@ -9,42 +10,23 @@
|
|||
, vala
|
||||
, gobject-introspection
|
||||
, fetchpatch
|
||||
, glibcLocales
|
||||
, umockdev
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "libgudev";
|
||||
version = "237";
|
||||
version = "238";
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
||||
sha256 = "1al6nr492nzbm8ql02xhzwci2kwb1advnkaky3j9636jf08v41hd";
|
||||
url = "mirror://gnome/sources/libgudev/${lib.versions.majorMinor finalAttrs.version}/libgudev-${finalAttrs.version}.tar.xz";
|
||||
hash = "sha256-YSZqsa/J1z28YKiyr3PpnS/f9H2ZVE0IV2Dk+mZ7XdE=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# https://gitlab.gnome.org/GNOME/libgudev/-/merge_requests/27
|
||||
(fetchpatch {
|
||||
name = "gir-dep";
|
||||
url = "https://gitlab.gnome.org/GNOME/libgudev/-/commit/6bdde16a0cfde462502fce1d9a7eb6ec33f388bb.diff";
|
||||
sha256 = "sha256-bDtLUxOLEgyJURshqEQC4YCBTUVzQQP4qoWL786b3Z8=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "vapi-dep";
|
||||
url = "https://gitlab.gnome.org/GNOME/libgudev/-/commit/d1f6457910842ba869c9871e7a2131fbe0d6b6be.diff";
|
||||
sha256 = "sha256-/PY8ziZST/vQvksJm69a3O6/YesknIxCDvj0z40piik=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "gtk-doc-dep";
|
||||
url = "https://gitlab.gnome.org/GNOME/libgudev/-/commit/34336cbadbcaac8b9b029f730eed0bdf4c633617.diff";
|
||||
sha256 = "sha256-Bk05xe69LGqWH1uhLMZhwbVMSsCTyBrrOvqWic2TTd4=";
|
||||
})
|
||||
];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
depsBuildBuild = [ pkg-config ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
meson
|
||||
|
@ -59,14 +41,16 @@ stdenv.mkDerivation rec {
|
|||
glib
|
||||
];
|
||||
|
||||
mesonFlags = [
|
||||
# There's a dependency cycle with umockdev and the tests fail to LD_PRELOAD anyway
|
||||
"-Dtests=disabled"
|
||||
checkInputs = [
|
||||
glibcLocales
|
||||
umockdev
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
passthru = {
|
||||
updateScript = gnome.updateScript {
|
||||
packageName = pname;
|
||||
packageName = "libgudev";
|
||||
versionPolicy = "none";
|
||||
};
|
||||
};
|
||||
|
@ -78,4 +62,4 @@ stdenv.mkDerivation rec {
|
|||
platforms = platforms.linux;
|
||||
license = licenses.lgpl2Plus;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
|
|
@ -18,14 +18,14 @@
|
|||
, which
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "umockdev";
|
||||
version = "0.17.17";
|
||||
|
||||
outputs = [ "bin" "out" "dev" "devdoc" ];
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/martinpitt/umockdev/releases/download/${version}/${pname}-${version}.tar.xz";
|
||||
url = "https://github.com/martinpitt/umockdev/releases/download/${finalAttrs.version}/umockdev-${finalAttrs.version}.tar.xz";
|
||||
sha256 = "sha256-IOYhseRYsyADz+qZc5tngkuGZShUqLzjPiYSTjR/32w=";
|
||||
};
|
||||
|
||||
|
@ -50,10 +50,13 @@ stdenv.mkDerivation rec {
|
|||
buildInputs = [
|
||||
glib
|
||||
systemd
|
||||
libgudev
|
||||
libpcap
|
||||
];
|
||||
|
||||
checkInputs = lib.optionals finalAttrs.passthru.withGudev [
|
||||
libgudev
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
python3
|
||||
which
|
||||
|
@ -81,12 +84,25 @@ stdenv.mkDerivation rec {
|
|||
ln -s "$PWD/libumockdev-preload.so.0" "$out/lib/libumockdev-preload.so.0"
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
# libgudev is needed for an optional test but it itself relies on umockdev for testing.
|
||||
withGudev = false;
|
||||
|
||||
tests = {
|
||||
withGudev = finalAttrs.finalPackage.overrideAttrs (attrs: {
|
||||
passthru = attrs.passthru // {
|
||||
withGudev = true;
|
||||
};
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/martinpitt/umockdev";
|
||||
changelog = "https://github.com/martinpitt/umockdev/releases/tag/${version}";
|
||||
changelog = "https://github.com/martinpitt/umockdev/releases/tag/${finalAttrs.version}";
|
||||
description = "Mock hardware devices for creating unit tests";
|
||||
license = licenses.lgpl21Plus;
|
||||
maintainers = with maintainers; [ flokli ];
|
||||
platforms = with platforms; linux;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue