mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-31 17:23:34 +00:00
libfakeXinerama: refactor build/installPhase, fix cross compilation
This commit is contained in:
parent
e47684628d
commit
255fd98d68
@ -12,15 +12,22 @@ stdenv.mkDerivation rec {
|
||||
buildInputs = [ libX11 libXinerama ];
|
||||
|
||||
buildPhase = ''
|
||||
gcc -O2 -Wall fakeXinerama.c -fPIC -o libfakeXinerama.so.1.0 -shared
|
||||
runHook preBuild
|
||||
|
||||
$CC -O2 -Wall fakeXinerama.c -fPIC -o libfakeXinerama.so.1.0 -shared
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib
|
||||
cp libfakeXinerama.so.1.0 $out/lib
|
||||
ln -s libfakeXinerama.so.1.0 $out/lib/libXinerama.so.1.0
|
||||
ln -s libXinerama.so.1.0 $out/lib/libXinerama.so.1
|
||||
ln -s libXinerama.so.1 $out/lib/libXinerama.so
|
||||
runHook preInstall
|
||||
|
||||
install -Dm555 libfakeXinerama.so.1.0 -t "$out/lib"
|
||||
ln -s libfakeXinerama.so.1.0 "$out/lib/libXinerama.so.1.0"
|
||||
ln -s libXinerama.so.1.0 "$out/lib/libXinerama.so.1"
|
||||
ln -s libXinerama.so.1 "$out/lib/libXinerama.so"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
Loading…
Reference in New Issue
Block a user