Commit de9a49c3 authored by Ilan Joselevich's avatar Ilan Joselevich Committed by Alyssa Ross
Browse files

buildRustCrate: extensions.sharedLibrary -> extensions.library

Switched to a common attribute for library file extensions:
https://github.com/NixOS/nixpkgs/commit/de70971c90f3e3161e94ace851b30474228a0861

This makes buildRustCrate evaluate successfully when using
pkgsCross/pkgsStatic.
parent 7aa02ac6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@
    # configure & source common build functions
    LIB_RUSTC_OPTS="${libRustcOpts}"
    BIN_RUSTC_OPTS="${binRustcOpts}"
    LIB_EXT="${stdenv.hostPlatform.extensions.sharedLibrary or ""}"
    LIB_EXT="${stdenv.hostPlatform.extensions.library}"
    LIB_PATH="${libPath}"
    LIB_NAME="${libName}"

+1 −1
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ let
          filename =
            if lib.any (x: x == "lib" || x == "rlib") dep.crateType
            then "${dep.metadata}.rlib"
            else "${dep.metadata}${stdenv.hostPlatform.extensions.sharedLibrary}";
            else "${dep.metadata}${stdenv.hostPlatform.extensions.library}";
        in
        " --extern ${opts}${name}=${dep.lib}/lib/lib${extern}-${filename}"
      )
+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ if !buildTests then ''
  fi
  if [ -e target/lib ]; then
    find target/lib/ -type f \! -name '*.rlib' \
      -a \! -name '*${stdenv.hostPlatform.extensions.sharedLibrary}' \
      -a \! -name '*${stdenv.hostPlatform.extensions.library}' \
      -a \! -name '*.d' \
      -executable \
      -print0 | xargs --no-run-if-empty --null install --target $out/tests;
+1 −1
Original line number Diff line number Diff line
@@ -479,7 +479,7 @@ let
            # `-undefined dynamic_lookup` as otherwise the compilation fails.
            $CC -shared \
              ${lib.optionalString stdenv.isDarwin "-undefined dynamic_lookup"} \
              -o $out/lib/${name}${stdenv.hostPlatform.extensions.sharedLibrary} ${src}
              -o $out/lib/${name}${stdenv.hostPlatform.extensions.library} ${src}
          '';
          b = compile "libb" ''
            #include <stdio.h>