lua: support non-Linux non-Darwin operating systems
This commit is contained in:
parent
57832e625c
commit
936b27b5d4
@ -11,6 +11,15 @@
|
|||||||
let
|
let
|
||||||
luaPackages = callPackage ../../lua-modules {lua=self; overrides=packageOverrides;};
|
luaPackages = callPackage ../../lua-modules {lua=self; overrides=packageOverrides;};
|
||||||
|
|
||||||
|
plat = if stdenv.isLinux then "linux"
|
||||||
|
else if stdenv.isDarwin then "macosx"
|
||||||
|
else if stdenv.hostPlatform.isMinGW then "mingw"
|
||||||
|
else if stdenv.isFreeBSD then "freebsd"
|
||||||
|
else if stdenv.isSunOS then "solaris"
|
||||||
|
else if stdenv.hostPlatform.isBSD then "bsd"
|
||||||
|
else if stdenv.hostPlatform.isUnix then "posix"
|
||||||
|
else "generic";
|
||||||
|
|
||||||
self = stdenv.mkDerivation rec {
|
self = stdenv.mkDerivation rec {
|
||||||
pname = "lua";
|
pname = "lua";
|
||||||
luaversion = with sourceVersion; "${major}.${minor}";
|
luaversion = with sourceVersion; "${major}.${minor}";
|
||||||
@ -36,11 +45,8 @@ self = stdenv.mkDerivation rec {
|
|||||||
"R=${version}"
|
"R=${version}"
|
||||||
"LDFLAGS=-fPIC"
|
"LDFLAGS=-fPIC"
|
||||||
"V=${luaversion}"
|
"V=${luaversion}"
|
||||||
] ++ (if stdenv.isDarwin then [
|
"PLAT=${plat}"
|
||||||
"PLAT=macosx"
|
] ++ (if stdenv.buildPlatform != stdenv.hostPlatform then [
|
||||||
] else [
|
|
||||||
"PLAT=linux"
|
|
||||||
]) ++ (if stdenv.buildPlatform != stdenv.hostPlatform then [
|
|
||||||
"CC=${stdenv.hostPlatform.config}-gcc"
|
"CC=${stdenv.hostPlatform.config}-gcc"
|
||||||
"RANLIB=${stdenv.hostPlatform.config}-ranlib"
|
"RANLIB=${stdenv.hostPlatform.config}-ranlib"
|
||||||
] else [])
|
] else [])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user