mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-29 14:57:28 +03:00
a17216af4c
Make either 'bin' or 'out' the first output.
23 lines
624 B
Nix
23 lines
624 B
Nix
{ stdenv, systemd }:
|
|
|
|
stdenv.mkDerivation {
|
|
name = "libudev-${systemd.version}";
|
|
|
|
unpackPhase = ":";
|
|
outputs = [ "out" "dev" ];
|
|
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
|
|
'';
|
|
|
|
meta = {
|
|
platforms = stdenv.lib.platforms.linux;
|
|
};
|
|
}
|