Merge branch 'linux-pam-cross' into HEAD
This commit is contained in:
commit
d7160f39bd
10 changed files with 83 additions and 107 deletions
|
@ -75,25 +75,16 @@ stdenv.mkDerivation ({
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
||||||
(if !headersOnly && buildTarget != null
|
stdenv.lib.optionalAttrs (!headersOnly && buildTarget != null) {
|
||||||
then assert installTarget != null; {
|
# Use the default `buildPhase' and `installPhase' so that the usual hooks
|
||||||
# Use the default `buildPhase' and `installPhase' so that the usual hooks
|
# can still be used.
|
||||||
# can still be used.
|
buildFlags = buildTarget;
|
||||||
buildFlags = buildTarget;
|
installTargets = assert installTarget != null; installTarget;
|
||||||
installTargets = installTarget;
|
}
|
||||||
}
|
|
||||||
else {})
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
||||||
(if headersOnly
|
stdenv.lib.optionalAttrs headersOnly {
|
||||||
then { dontBuild = true; installPhase = "make install-headers"; }
|
dontBuild = true;
|
||||||
else (if (cross != null)
|
installPhase = "make install-headers";
|
||||||
then {
|
})
|
||||||
crossConfig = cross.config;
|
|
||||||
|
|
||||||
# The `configure' script wants to build executables so tell it where
|
|
||||||
# to find `crt1.o' et al.
|
|
||||||
LDFLAGS = "-B${glibcCross}/lib";
|
|
||||||
}
|
|
||||||
else { })))
|
|
||||||
|
|
|
@ -55,8 +55,6 @@ stdenv.mkDerivation ({
|
||||||
|
|
||||||
(if cross != null
|
(if cross != null
|
||||||
then {
|
then {
|
||||||
crossConfig = cross.config;
|
|
||||||
|
|
||||||
# Tell gcc where to find `crt1.o' et al. This is specified in two
|
# Tell gcc where to find `crt1.o' et al. This is specified in two
|
||||||
# different ways: one for gcc as run from `configure', and one for linking
|
# different ways: one for gcc as run from `configure', and one for linking
|
||||||
# libpthread.so (by default `libtool --mode=link' swallows `-B', hence
|
# libpthread.so (by default `libtool --mode=link' swallows `-B', hence
|
||||||
|
|
|
@ -33,21 +33,6 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
crossAttrs = {
|
|
||||||
propagatedBuildInputs = [ flex.crossDrv cracklib.crossDrv ];
|
|
||||||
preConfigure = preConfigure + ''
|
|
||||||
$crossConfig-ar x ${flex.crossDrv}/lib/libfl.a
|
|
||||||
mv libyywrap.o libyywrap-target.o
|
|
||||||
ar x ${flex}/lib/libfl.a
|
|
||||||
mv libyywrap.o libyywrap-host.o
|
|
||||||
export LDFLAGS="$LDFLAGS $PWD/libyywrap-target.o"
|
|
||||||
sed -e 's/@CC@/gcc/' -i doc/specs/Makefile.in
|
|
||||||
'';
|
|
||||||
postConfigure = ''
|
|
||||||
sed -e "s@ $PWD/libyywrap-target.o@ $PWD/libyywrap-host.o@" -i doc/specs/Makefile
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mv -v $out/sbin/unix_chkpwd{,.orig}
|
mv -v $out/sbin/unix_chkpwd{,.orig}
|
||||||
ln -sv /run/wrappers/bin/unix_chkpwd $out/sbin/unix_chkpwd
|
ln -sv /run/wrappers/bin/unix_chkpwd $out/sbin/unix_chkpwd
|
||||||
|
|
12
pkgs/os-specific/windows/mingwrt/common.nix
Normal file
12
pkgs/os-specific/windows/mingwrt/common.nix
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{ lib, fetchurl }:
|
||||||
|
|
||||||
|
rec {
|
||||||
|
name = "mingwrt-3.20";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "mirror://sourceforge/mingw/MinGW/Base/mingw-rt/${name}-mingw32-src.tar.gz";
|
||||||
|
sha256 = "02pydg1m8y35nxb4k34nlb5c341y2waq76z42mgdzlcf661r91pi";
|
||||||
|
};
|
||||||
|
|
||||||
|
meta.platforms = [ lib.systems.inspect.isMinGW ];
|
||||||
|
}
|
|
@ -1,29 +1,7 @@
|
||||||
{stdenv, fetchurl, binutils ? null, gccCross ? null, onlyHeaders ? false}:
|
{ stdenv, callPackage }:
|
||||||
|
|
||||||
let
|
|
||||||
name = "mingwrt-3.20";
|
|
||||||
in
|
|
||||||
stdenv.mkDerivation (rec {
|
|
||||||
inherit name;
|
|
||||||
|
|
||||||
src = fetchurl {
|
|
||||||
url = "mirror://sourceforge/mingw/MinGW/Base/mingw-rt/${name}-mingw32-src.tar.gz";
|
|
||||||
sha256 = "02pydg1m8y35nxb4k34nlb5c341y2waq76z42mgdzlcf661r91pi";
|
|
||||||
};
|
|
||||||
|
|
||||||
} //
|
|
||||||
(if onlyHeaders then {
|
|
||||||
name = name + "-headers";
|
|
||||||
phases = [ "unpackPhase" "installPhase" ];
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out
|
|
||||||
cp -R include $out
|
|
||||||
'';
|
|
||||||
} else {
|
|
||||||
buildInputs = [ gccCross binutils ];
|
|
||||||
|
|
||||||
crossConfig = gccCross.crossConfig;
|
|
||||||
|
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
inherit (callPackage ./common.nix {}) name src meta;
|
||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
})
|
hardeningDisable = [ "stackprotector" "fortify" ];
|
||||||
)
|
}
|
||||||
|
|
17
pkgs/os-specific/windows/mingwrt/headers.nix
Normal file
17
pkgs/os-specific/windows/mingwrt/headers.nix
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{ stdenvNoCC, callPackage }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (callPackage ./common.nix {}) name src meta;
|
||||||
|
|
||||||
|
in stdenvNoCC.mkDerivation {
|
||||||
|
name = name + "-headers";
|
||||||
|
|
||||||
|
inherit src meta;
|
||||||
|
|
||||||
|
phases = [ "unpackPhase" "installPhase" ];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out
|
||||||
|
cp -R include $out
|
||||||
|
'';
|
||||||
|
}
|
14
pkgs/os-specific/windows/w32api/common.nix
Normal file
14
pkgs/os-specific/windows/w32api/common.nix
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{ fetchurl, xz }:
|
||||||
|
|
||||||
|
rec {
|
||||||
|
name = "w32api-3.17-2";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "mirror://sourceforge/mingw/MinGW/Base/w32api/w32api-3.17/${name}-mingw32-src.tar.lzma";
|
||||||
|
sha256 = "09rhnl6zikmdyb960im55jck0rdy5z9nlg3akx68ixn7khf3j8wb";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ xz ];
|
||||||
|
|
||||||
|
meta.platforms = [ lib.systems.inspect.isMinGW ];
|
||||||
|
}
|
|
@ -1,32 +1,6 @@
|
||||||
{ stdenv, fetchurl, xz, binutils ? null
|
{ stdenv, callPackage }:
|
||||||
, gccCross ? null, onlyHeaders ? false }:
|
|
||||||
|
|
||||||
let
|
|
||||||
name = "w32api-3.17-2";
|
|
||||||
in
|
|
||||||
stdenv.mkDerivation ({
|
|
||||||
inherit name;
|
|
||||||
|
|
||||||
src = fetchurl {
|
|
||||||
url = "mirror://sourceforge/mingw/MinGW/Base/w32api/w32api-3.17/${name}-mingw32-src.tar.lzma";
|
|
||||||
sha256 = "09rhnl6zikmdyb960im55jck0rdy5z9nlg3akx68ixn7khf3j8wb";
|
|
||||||
};
|
|
||||||
|
|
||||||
nativeBuildInputs = [ xz ];
|
|
||||||
|
|
||||||
} //
|
|
||||||
(if onlyHeaders then {
|
|
||||||
name = name + "-headers";
|
|
||||||
phases = [ "unpackPhase" "installPhase" ];
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out
|
|
||||||
cp -R include $out
|
|
||||||
'';
|
|
||||||
} else {
|
|
||||||
buildInputs = [ gccCross binutils ];
|
|
||||||
|
|
||||||
crossConfig = gccCross.crossConfig;
|
|
||||||
|
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
inherit (callPackage ./common.nix {}) name src nativeBuildInputs meta;
|
||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
})
|
}
|
||||||
)
|
|
||||||
|
|
17
pkgs/os-specific/windows/w32api/headers.nix
Normal file
17
pkgs/os-specific/windows/w32api/headers.nix
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{ stdenvNoCC, callPackage }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (callPackage ./common.nix {}) name src meta;
|
||||||
|
|
||||||
|
in stdenvNoCC.mkDerivation {
|
||||||
|
name = name + "-headers";
|
||||||
|
|
||||||
|
inherit src nativeBuildInputs meta;
|
||||||
|
|
||||||
|
phases = [ "unpackPhase" "installPhase" ];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out
|
||||||
|
cp -R include $out
|
||||||
|
'';
|
||||||
|
}
|
|
@ -13868,23 +13868,13 @@ with pkgs;
|
||||||
|
|
||||||
jom = callPackage ../os-specific/windows/jom { };
|
jom = callPackage ../os-specific/windows/jom { };
|
||||||
|
|
||||||
w32api = callPackage ../os-specific/windows/w32api {
|
w32api = callPackage ../os-specific/windows/w32api { };
|
||||||
gccCross = gccCrossStageStatic;
|
|
||||||
binutils = binutils;
|
|
||||||
};
|
|
||||||
|
|
||||||
w32api_headers = w32api.override {
|
w32api_headers = callPackage ../os-specific/windows/w32api/headers { };
|
||||||
onlyHeaders = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
mingw_runtime = callPackage ../os-specific/windows/mingwrt {
|
mingw_runtime = callPackage ../os-specific/windows/mingwrt { };
|
||||||
gccCross = gccCrossMingw2;
|
|
||||||
binutils = binutils;
|
|
||||||
};
|
|
||||||
|
|
||||||
mingw_runtime_headers = mingw_runtime.override {
|
mingw_runtime_headers = callPackage ../os-specific/windows/mingwrt/headers.nix { };
|
||||||
onlyHeaders = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
mingw_headers1 = buildEnv {
|
mingw_headers1 = buildEnv {
|
||||||
name = "mingw-headers-1";
|
name = "mingw-headers-1";
|
||||||
|
|
Loading…
Reference in a new issue