6 , gobject-introspection
21 stdenv.mkDerivation rec {
25 outputs = [ "bin" "out" "dev" "devdoc" ];
28 url = "https://github.com/martinpitt/umockdev/releases/download/${version}/${pname}-${version}.tar.xz";
29 sha256 = "sha256-bG6/bmIJtqSXRuDZGkSNAntUJxurgu1woTLs8pTKE88=";
33 # Hardcode absolute paths to libraries so that consumers
34 # do not need to set LD_LIBRARY_PATH themselves.
35 ./hardcode-paths.patch
46 ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
71 # Substitute the path to this derivation in the patch we apply.
72 substituteInPlace src/umockdev-wrapper \
73 --subst-var-by 'LIBDIR' "''${!outputLib}/lib"
77 # Our patch makes the path to the `LD_PRELOAD`ed library absolute.
78 # When running tests, the library is not yet installed, though,
79 # so we need to replace the absolute path with a local one during build.
80 # We are using a symlink that will be overridden during installation.
82 ln -s "$PWD/libumockdev-preload.so.0" "$out/lib/libumockdev-preload.so.0"
86 description = "Mock hardware devices for creating unit tests";
87 license = licenses.lgpl21Plus;
88 maintainers = with maintainers; [ flokli ];
89 platforms = with platforms; linux;