forked from mirrors/nixpkgs
b44d846990
- systemd puts all into one output now (except for man), because I wasn't able to fix all systemd/udev refernces for NixOS to work well - libudev is now by default *copied* into another path, which is what most packages will use as build input :-) - pkgs.udev = [ libudev.out libudev.dev ]; because there are too many references that just put `udev` into build inputs (to rewrite them all), also this made "${udev}/foo" fail at *evaluation* time so it's easier to catch and change to something more specific
20 lines
564 B
Nix
20 lines
564 B
Nix
{ stdenv, systemd }:
|
|
|
|
stdenv.mkDerivation {
|
|
name = "libudev-${systemd.version}";
|
|
|
|
unpackPhase = ":";
|
|
outputs = [ "dev" "out" ];
|
|
installPhase = ''
|
|
mkdir -p "$out/lib" "$dev/lib/pkgconfig" "$dev/include"
|
|
cp -P "${systemd}"/lib/libudev.* "$out/lib/"
|
|
cp -P "${systemd}"/lib/pkgconfig/libudev.pc "$dev/lib/pkgconfig/"
|
|
cp -P "${systemd}"/include/libudev.h "$dev/include/"
|
|
|
|
substituteInPlace "$dev"/lib/pkgconfig/*.pc \
|
|
--replace "${systemd}" "$out"
|
|
sed "/^includedir=/cincludedir=$dev/include" -i "$dev"/lib/pkgconfig/*.pc
|
|
'';
|
|
}
|
|
|