Merge pull request #45884 from obsidiansystems/improve-isArm-msg

stdenv: Better message for deprecated `isArm`
This commit is contained in:
John Ericson 2018-08-31 16:21:46 -04:00 committed by GitHub
commit 4663cd2b3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -34,7 +34,7 @@ in stdenv.mkDerivation (rec {
postPatch = ''
sed '/BUILD_TIMESTAMP=/s/=.*/=1970-01-01T00:01+0000/' -i ./configure
'' + lib.optionalString (stdenv.hostPlatform.isArm && stdenv.buildPlatform != stdenv.hostPlatform ) ''
'' + lib.optionalString (stdenv.hostPlatform.isAarch32 && stdenv.buildPlatform != stdenv.hostPlatform) ''
ln -s lock-obj-pub.arm-unknown-linux-gnueabi.h src/syscfg/lock-obj-pub.linux-gnueabihf.h
'' + lib.optionalString stdenv.hostPlatform.isMusl ''
ln -s lock-obj-pub.x86_64-pc-linux-musl.h src/syscfg/lock-obj-pub.linux-musl.h

View file

@ -123,7 +123,9 @@ let
inherit (hostPlatform)
isDarwin isLinux isSunOS isCygwin isFreeBSD isOpenBSD
isi686 isx86_64 is64bit isAarch32 isAarch64 isMips isBigEndian;
isArm = builtins.trace "stdenv.isArm is deprecated after 18.03" hostPlatform.isArm;
isArm = builtins.trace
"`stdenv.isArm` is deprecated after 18.03. Please use `stdenv.isAarch32` instead"
hostPlatform.isAarch32;
# Whether we should run paxctl to pax-mark binaries.
needsPax = isLinux;