uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
87
pkgs/development/libraries/umockdev/default.nix
Normal file
87
pkgs/development/libraries/umockdev/default.nix
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, docbook-xsl-nons
|
||||
, fetchurl
|
||||
, glib
|
||||
, gobject-introspection
|
||||
, gtk-doc
|
||||
, libgudev
|
||||
, libpcap
|
||||
, meson
|
||||
, ninja
|
||||
, pkg-config
|
||||
, python3
|
||||
, systemd
|
||||
, usbutils
|
||||
, vala
|
||||
, which
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "umockdev";
|
||||
version = "0.17.9";
|
||||
|
||||
outputs = [ "bin" "out" "dev" "devdoc" ];
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/martinpitt/umockdev/releases/download/${version}/${pname}-${version}.tar.xz";
|
||||
sha256 = "sha256-FEmWjJVmKKckC30zULGI/mZ3VNtirnweZq2gKh/Y5VE=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Hardcode absolute paths to libraries so that consumers
|
||||
# do not need to set LD_LIBRARY_PATH themselves.
|
||||
./hardcode-paths.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
docbook-xsl-nons
|
||||
gobject-introspection
|
||||
gtk-doc
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
vala
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
glib
|
||||
systemd
|
||||
libgudev
|
||||
libpcap
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
python3
|
||||
which
|
||||
usbutils
|
||||
];
|
||||
|
||||
mesonFlags = [
|
||||
"-Dgtk_doc=true"
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
postPatch = ''
|
||||
# Substitute the path to this derivation in the patch we apply.
|
||||
substituteInPlace src/umockdev-wrapper \
|
||||
--subst-var-by 'LIBDIR' "''${!outputLib}/lib"
|
||||
'';
|
||||
|
||||
preCheck = ''
|
||||
# Our patch makes the path to the `LD_PRELOAD`ed library absolute.
|
||||
# When running tests, the library is not yet installed, though,
|
||||
# so we need to replace the absolute path with a local one during build.
|
||||
# We are using a symlink that will be overridden during installation.
|
||||
mkdir -p "$out/lib"
|
||||
ln -s "$PWD/libumockdev-preload.so.0" "$out/lib/libumockdev-preload.so.0"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Mock hardware devices for creating unit tests";
|
||||
license = licenses.lgpl21Plus;
|
||||
maintainers = with maintainers; [ flokli ];
|
||||
platforms = with platforms; linux;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue