Merge pull request #45820 from obsidiansystems/dont-use-obsolete-platform-aliases
treewide: Dont use obsolete platform aliases
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
|
||||
with stdenv.lib;
|
||||
let
|
||||
audio = optionalString (hasSuffix "linux" stdenv.system) "alsa,"
|
||||
audio = optionalString (hasSuffix "linux" stdenv.hostPlatform.system) "alsa,"
|
||||
+ optionalString pulseSupport "pa,"
|
||||
+ optionalString sdlSupport "sdl,";
|
||||
|
||||
|
||||
@@ -44,23 +44,23 @@ stdenv.mkDerivation {
|
||||
'';
|
||||
|
||||
buildCommand = with xorg; ''
|
||||
${if stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux" then ''
|
||||
${if stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux" then ''
|
||||
isoinfo -J -i $src -x /VBoxLinuxAdditions.run > ./VBoxLinuxAdditions.run
|
||||
chmod 755 ./VBoxLinuxAdditions.run
|
||||
./VBoxLinuxAdditions.run --noexec --keep
|
||||
''
|
||||
else throw ("Architecture: "+stdenv.system+" not supported for VirtualBox guest additions")
|
||||
else throw ("Architecture: "+stdenv.hostPlatform.system+" not supported for VirtualBox guest additions")
|
||||
}
|
||||
|
||||
# Unpack files
|
||||
cd install
|
||||
${if stdenv.system == "i686-linux" then ''
|
||||
${if stdenv.hostPlatform.system == "i686-linux" then ''
|
||||
tar xfvj VBoxGuestAdditions-x86.tar.bz2
|
||||
''
|
||||
else if stdenv.system == "x86_64-linux" then ''
|
||||
else if stdenv.hostPlatform.system == "x86_64-linux" then ''
|
||||
tar xfvj VBoxGuestAdditions-amd64.tar.bz2
|
||||
''
|
||||
else throw ("Architecture: "+stdenv.system+" not supported for VirtualBox guest additions")
|
||||
else throw ("Architecture: "+stdenv.hostPlatform.system+" not supported for VirtualBox guest additions")
|
||||
}
|
||||
|
||||
cd ../
|
||||
@@ -81,13 +81,13 @@ stdenv.mkDerivation {
|
||||
# Change the interpreter for various binaries
|
||||
for i in sbin/VBoxService bin/{VBoxClient,VBoxControl} other/mount.vboxsf
|
||||
do
|
||||
${if stdenv.system == "i686-linux" then ''
|
||||
${if stdenv.hostPlatform.system == "i686-linux" then ''
|
||||
patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 $i
|
||||
''
|
||||
else if stdenv.system == "x86_64-linux" then ''
|
||||
else if stdenv.hostPlatform.system == "x86_64-linux" then ''
|
||||
patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux-x86-64.so.2 $i
|
||||
''
|
||||
else throw ("Architecture: "+stdenv.system+" not supported for VirtualBox guest additions")
|
||||
else throw ("Architecture: "+stdenv.hostPlatform.system+" not supported for VirtualBox guest additions")
|
||||
}
|
||||
patchelf --set-rpath ${lib.makeLibraryPath [ stdenv.cc.cc dbus libX11 libXt libXext libXmu libXfixes libXrandr libXcursor ]} $i
|
||||
done
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, glibc, buildPlatform }:
|
||||
{ stdenv, fetchurl, glibc }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "${pname}-${version}";
|
||||
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
buildPhase = ''(
|
||||
cd src
|
||||
./mk.sh ${buildPlatform.platform.kernelArch}
|
||||
./mk.sh ${stdenv.buildPlatform.platform.kernelArch}
|
||||
)'';
|
||||
|
||||
installPhase = ''
|
||||
|
||||
Reference in New Issue
Block a user