lib.systems.elaborate: add libDir attribute
This commit is contained in:
parent
ab59f0dacc
commit
94a3c17582
@ -89,6 +89,13 @@ rec {
|
|||||||
# is why we use the more obscure "bfd" and not "binutils" for this
|
# is why we use the more obscure "bfd" and not "binutils" for this
|
||||||
# choice.
|
# choice.
|
||||||
else "bfd";
|
else "bfd";
|
||||||
|
# The standard lib directory name that non-nixpkgs binaries distributed
|
||||||
|
# for this platform normally assume.
|
||||||
|
libDir = if final.isLinux then
|
||||||
|
if final.isx86_64 || final.isMips64 || final.isPower64
|
||||||
|
then "lib64"
|
||||||
|
else "lib"
|
||||||
|
else null;
|
||||||
extensions = lib.optionalAttrs final.hasSharedLibraries {
|
extensions = lib.optionalAttrs final.hasSharedLibraries {
|
||||||
sharedLibrary =
|
sharedLibrary =
|
||||||
if final.isDarwin then ".dylib"
|
if final.isDarwin then ".dylib"
|
||||||
|
@ -5,11 +5,7 @@
|
|||||||
, ninja
|
, ninja
|
||||||
, nixosTests
|
, nixosTests
|
||||||
}:
|
}:
|
||||||
let
|
|
||||||
libDir = if builtins.elem stdenv.system [ "x86_64-linux" "mips64-linux" "powerpc64le-linux" ]
|
|
||||||
then "/lib64"
|
|
||||||
else "/lib";
|
|
||||||
in
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "nix-ld";
|
pname = "nix-ld";
|
||||||
version = "1.2.2";
|
version = "1.2.2";
|
||||||
@ -36,7 +32,7 @@ stdenv.mkDerivation rec {
|
|||||||
postInstall = ''
|
postInstall = ''
|
||||||
mkdir -p $out/nix-support
|
mkdir -p $out/nix-support
|
||||||
|
|
||||||
ldpath=${libDir}/$(basename $(< ${stdenv.cc}/nix-support/dynamic-linker))
|
ldpath=/${stdenv.hostPlatform.libDir}/$(basename $(< ${stdenv.cc}/nix-support/dynamic-linker))
|
||||||
echo "$ldpath" > $out/nix-support/ldpath
|
echo "$ldpath" > $out/nix-support/ldpath
|
||||||
mkdir -p $out/lib/tmpfiles.d/
|
mkdir -p $out/lib/tmpfiles.d/
|
||||||
cat > $out/lib/tmpfiles.d/nix-ld.conf <<EOF
|
cat > $out/lib/tmpfiles.d/nix-ld.conf <<EOF
|
||||||
|
Loading…
Reference in New Issue
Block a user