mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-19 02:44:17 +03:00
Merge branch 'staging'
Comparison looks OK; I'll try some fixes on master directly. http://hydra.nixos.org/eval/1372577?compare=1372497
This commit is contained in:
commit
5328aac7be
@ -1,8 +1,9 @@
|
||||
with import ./parse.nix;
|
||||
with import ../attrsets.nix;
|
||||
with import ../lists.nix;
|
||||
|
||||
rec {
|
||||
patterns = {
|
||||
patterns = rec {
|
||||
"32bit" = { cpu = { bits = 32; }; };
|
||||
"64bit" = { cpu = { bits = 64; }; };
|
||||
i686 = { cpu = cpuTypes.i686; };
|
||||
@ -13,8 +14,8 @@ rec {
|
||||
BigEndian = { cpu = { significantByte = significantBytes.bigEndian; }; };
|
||||
LittleEndian = { cpu = { significantByte = significantBytes.littleEndian; }; };
|
||||
|
||||
Unix = { kernel = { families = { inherit (kernelFamilies) unix; }; }; };
|
||||
BSD = { kernel = { families = { inherit (kernelFamilies) bsd; }; }; };
|
||||
Unix = [ BSD Darwin Linux SunOS Hurd Cygwin ];
|
||||
|
||||
Darwin = { kernel = kernels.darwin; };
|
||||
Linux = { kernel = kernels.linux; };
|
||||
@ -27,11 +28,15 @@ rec {
|
||||
Cygwin = { kernel = kernels.windows; abi = abis.cygnus; };
|
||||
MinGW = { kernel = kernels.windows; abi = abis.gnu; };
|
||||
|
||||
Arm32 = recursiveUpdate patterns.Arm patterns."32bit";
|
||||
Arm64 = recursiveUpdate patterns.Arm patterns."64bit";
|
||||
Arm32 = recursiveUpdate Arm patterns."32bit";
|
||||
Arm64 = recursiveUpdate Arm patterns."64bit";
|
||||
};
|
||||
|
||||
matchAnyAttrs = patterns:
|
||||
if builtins.isList patterns then attrs: any (pattern: matchAttrs pattern attrs) patterns
|
||||
else matchAttrs patterns;
|
||||
|
||||
predicates = mapAttrs'
|
||||
(name: value: nameValuePair ("is" + name) (matchAttrs value))
|
||||
(name: value: nameValuePair ("is" + name) (matchAnyAttrs value))
|
||||
patterns;
|
||||
}
|
||||
|
@ -68,21 +68,20 @@ rec {
|
||||
isKernelFamily = isType "kernel-family";
|
||||
kernelFamilies = setTypes "kernel-family" {
|
||||
bsd = {};
|
||||
unix = {};
|
||||
};
|
||||
|
||||
isKernel = x: isType "kernel" x;
|
||||
kernels = with execFormats; with kernelFamilies; setTypesAssert "kernel"
|
||||
(x: isExecFormat x.execFormat && all isKernelFamily (attrValues x.families))
|
||||
{
|
||||
darwin = { execFormat = macho; families = { inherit unix; }; };
|
||||
freebsd = { execFormat = elf; families = { inherit unix bsd; }; };
|
||||
hurd = { execFormat = elf; families = { inherit unix; }; };
|
||||
linux = { execFormat = elf; families = { inherit unix; }; };
|
||||
netbsd = { execFormat = elf; families = { inherit unix bsd; }; };
|
||||
none = { execFormat = unknown; families = { inherit unix; }; };
|
||||
openbsd = { execFormat = elf; families = { inherit unix bsd; }; };
|
||||
solaris = { execFormat = elf; families = { inherit unix; }; };
|
||||
darwin = { execFormat = macho; families = { }; };
|
||||
freebsd = { execFormat = elf; families = { inherit bsd; }; };
|
||||
hurd = { execFormat = elf; families = { }; };
|
||||
linux = { execFormat = elf; families = { }; };
|
||||
netbsd = { execFormat = elf; families = { inherit bsd; }; };
|
||||
none = { execFormat = unknown; families = { }; };
|
||||
openbsd = { execFormat = elf; families = { inherit bsd; }; };
|
||||
solaris = { execFormat = elf; families = { }; };
|
||||
windows = { execFormat = pe; families = { }; };
|
||||
} // { # aliases
|
||||
# TODO(@Ericson2314): Handle these Darwin version suffixes more generally.
|
||||
@ -164,7 +163,7 @@ rec {
|
||||
mkSystemFromString = s: mkSystemFromSkeleton (mkSkeletonFromList (lib.splitString "-" s));
|
||||
|
||||
doubleFromSystem = { cpu, vendor, kernel, abi, ... }:
|
||||
if vendor == kernels.windows && abi == abis.cygnus
|
||||
if abi == abis.cygnus
|
||||
then "${cpu.name}-cygwin"
|
||||
else "${cpu.name}-${kernel.name}";
|
||||
|
||||
|
@ -115,7 +115,6 @@ in
|
||||
"/share/mime"
|
||||
"/share/nano"
|
||||
"/share/org"
|
||||
"/share/terminfo"
|
||||
"/share/themes"
|
||||
"/share/vim-plugins"
|
||||
"/share/vulkan"
|
||||
|
33
nixos/modules/config/terminfo.nix
Normal file
33
nixos/modules/config/terminfo.nix
Normal file
@ -0,0 +1,33 @@
|
||||
# This module manages the terminfo database
|
||||
# and its integration in the system.
|
||||
{ config, ... }:
|
||||
{
|
||||
config = {
|
||||
|
||||
environment.pathsToLink = [
|
||||
"/share/terminfo"
|
||||
];
|
||||
|
||||
environment.etc."terminfo" = {
|
||||
source = "${config.system.path}/share/terminfo";
|
||||
};
|
||||
|
||||
environment.profileRelativeEnvVars = {
|
||||
TERMINFO_DIRS = [ "/share/terminfo" ];
|
||||
};
|
||||
|
||||
environment.extraInit = ''
|
||||
|
||||
# reset TERM with new TERMINFO available (if any)
|
||||
export TERM=$TERM
|
||||
'';
|
||||
|
||||
security.sudo.extraConfig = ''
|
||||
|
||||
# Keep terminfo database for root and %wheel.
|
||||
Defaults:root,%wheel env_keep+=TERMINFO_DIRS
|
||||
Defaults:root,%wheel env_keep+=TERMINFO
|
||||
'';
|
||||
|
||||
};
|
||||
}
|
@ -21,6 +21,7 @@
|
||||
./config/sysctl.nix
|
||||
./config/system-environment.nix
|
||||
./config/system-path.nix
|
||||
./config/terminfo.nix
|
||||
./config/timezone.nix
|
||||
./config/unix-odbc-drivers.nix
|
||||
./config/users-groups.nix
|
||||
|
@ -34,7 +34,6 @@ in
|
||||
{ PATH = [ "/bin" ];
|
||||
INFOPATH = [ "/info" "/share/info" ];
|
||||
PKG_CONFIG_PATH = [ "/lib/pkgconfig" ];
|
||||
TERMINFO_DIRS = [ "/share/terminfo" ];
|
||||
PERL5LIB = [ "/lib/perl5/site_perl" ];
|
||||
KDEDIRS = [ "" ];
|
||||
STRIGI_PLUGIN_PATH = [ "/lib/strigi/" ];
|
||||
@ -50,9 +49,6 @@ in
|
||||
|
||||
environment.extraInit =
|
||||
''
|
||||
# reset TERM with new TERMINFO available (if any)
|
||||
export TERM=$TERM
|
||||
|
||||
unset ASPELL_CONF
|
||||
for i in ${concatStringsSep " " (reverseList cfg.profiles)} ; do
|
||||
if [ -d "$i/lib/aspell" ]; then
|
||||
|
@ -66,10 +66,6 @@ in
|
||||
# Don't edit this file. Set the NixOS options ‘security.sudo.configFile’
|
||||
# or ‘security.sudo.extraConfig’ instead.
|
||||
|
||||
# Environment variables to keep for root and %wheel.
|
||||
Defaults:root,%wheel env_keep+=TERMINFO_DIRS
|
||||
Defaults:root,%wheel env_keep+=TERMINFO
|
||||
|
||||
# Keep SSH_AUTH_SOCK so that pam_ssh_agent_auth.so can do its magic.
|
||||
Defaults env_keep+=SSH_AUTH_SOCK
|
||||
|
||||
|
@ -135,7 +135,7 @@ let
|
||||
$out/bin/ash -c 'echo hello world' | grep "hello world"
|
||||
export LD_LIBRARY_PATH=$out/lib
|
||||
$out/bin/mount --help 2>&1 | grep -q "BusyBox"
|
||||
$out/bin/blkid --help 2>&1 | grep -q 'libblkid'
|
||||
$out/bin/blkid -V 2>&1 | grep -q 'libblkid'
|
||||
$out/bin/udevadm --version
|
||||
$out/bin/dmsetup --version 2>&1 | tee -a log | grep -q "version:"
|
||||
LVM_SYSTEM_DIR=$out $out/bin/lvm version 2>&1 | tee -a log | grep -q "LVM"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ stdenv
|
||||
, fetchurl, alsaLib
|
||||
, buildPlatform, hostPlatform
|
||||
, hostPlatform
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
buildInputs = stdenv.lib.optional (!stdenv.isDarwin) alsaLib;
|
||||
|
||||
${if buildPlatform != hostPlatform then "configureFlags" else null} =
|
||||
configureFlags =
|
||||
stdenv.lib.optional (hostPlatform ? mpg123) "--with-cpu=${hostPlatform.mpg123.cpu}";
|
||||
|
||||
meta = {
|
||||
|
@ -32,7 +32,13 @@ stdenv.mkDerivation rec {
|
||||
*/
|
||||
doCheck = !(hostPlatform.isDarwin || hostPlatform != buildPlatform);
|
||||
|
||||
configureFlags = if hostPlatform == buildPlatform then null else [
|
||||
# TODO(@Ericson2314): Use placeholder to make this a configure flag once Nix
|
||||
# 1.12 is released.
|
||||
preConfigure = ''
|
||||
export DESTDIR=$out
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"--exec-prefix=${stdenv.cc.prefix}"
|
||||
"CC=${stdenv.cc.prefix}cc"
|
||||
];
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -38,8 +38,7 @@ stdenv.mkDerivation rec {
|
||||
url = "https://aur.archlinux.org/cgit/aur.git/plain/https.patch?h=w3m-mouse&id=5b5f0fbb59f674575e87dd368fed834641c35f03";
|
||||
sha256 = "08skvaha1hjyapsh8zw5dgfy433mw2hk7qy9yy9avn8rjqj7kjxk";
|
||||
})
|
||||
] ++ optional (graphicsSupport && !x11Support) [ ./no-x11.patch ]
|
||||
++ optional stdenv.isCygwin ./cygwin.patch;
|
||||
] ++ optional (graphicsSupport && !x11Support) [ ./no-x11.patch ];
|
||||
|
||||
buildInputs = [ pkgconfig ncurses boehmgc gettext zlib ]
|
||||
++ optional sslSupport openssl
|
||||
|
@ -14,15 +14,15 @@ let
|
||||
# instead, we download localkube ourselves and shove it into the minikube binary. The versions URL that minikube uses is
|
||||
# currently https://storage.googleapis.com/minikube/k8s_releases.json
|
||||
|
||||
localkube-version = "1.6.0";
|
||||
localkube-version = "1.6.3";
|
||||
localkube-binary = fetchurl {
|
||||
url = "https://storage.googleapis.com/minikube/k8sReleases/v${localkube-version}/localkube-linux-amd64";
|
||||
sha256 = "0zx0c9fwairvga1g1112l5g5pspm2m9wxb42qgfxfgyidywvirha";
|
||||
sha256 = "1fmxxjv1bxrfngc4ykfgg76b79dh8pq0k1gsbzhiy3hhrppfqylm";
|
||||
};
|
||||
in buildGoPackage rec {
|
||||
pname = "minikube";
|
||||
name = "${pname}-${version}";
|
||||
version = "0.19.1";
|
||||
version = "0.20.0";
|
||||
|
||||
goPackagePath = "k8s.io/minikube";
|
||||
|
||||
@ -30,7 +30,7 @@ in buildGoPackage rec {
|
||||
owner = "kubernetes";
|
||||
repo = "minikube";
|
||||
rev = "v${version}";
|
||||
sha256 = "19kw2xhpcbyh32im0lnvajcjf1f8p357vhggk0jl342a23vr3rxl";
|
||||
sha256 = "0bly2phy67x4ckcg46g6r4kqfdpjfs1cb3588a900m8b4xyavvvb";
|
||||
};
|
||||
|
||||
# kubernetes is here only to shut up a loud warning when generating the completions below. minikube checks very eagerly
|
||||
|
@ -359,7 +359,13 @@ stdenv.mkDerivation {
|
||||
if [[ "$($ldPath/${prefix}ld -z relro 2>&1 || true)" =~ un(recognized|known)\ option ]]; then
|
||||
hardening_unsupported_flags+=" relro"
|
||||
fi
|
||||
''
|
||||
|
||||
+ optionalString hostPlatform.isCygwin ''
|
||||
hardening_unsupported_flags+=" pic"
|
||||
''
|
||||
|
||||
+ ''
|
||||
substituteAll ${preWrap ./add-flags.sh} $out/nix-support/add-flags.sh
|
||||
substituteAll ${preWrap ./add-hardening.sh} $out/nix-support/add-hardening.sh
|
||||
cp -p ${preWrap ./utils.sh} $out/nix-support/utils.sh
|
||||
|
@ -28,17 +28,16 @@ badPath() {
|
||||
# States: 0 - outside, 1/2 - unquoted arg/slash, 3/4 - 'arg'/slash, 5/6 - "arg"/slash.
|
||||
# State transitions:
|
||||
rspT=(01235 01235 11111 33413 33333 55651 55555)
|
||||
# Push char on transition:
|
||||
rspC[01]=1 rspC[11]=1 rspC[21]=1 rspC[33]=1 rspC[43]=1 rspC[55]=1 rspC[65]=1
|
||||
# Push (a) arg or (c) char on transition:
|
||||
rspP[10]=a rspP[01]=c rspP[11]=c rspP[21]=c rspP[33]=c rspP[43]=c rspP[55]=c rspP[65]=c
|
||||
|
||||
rspParse() {
|
||||
rsp=()
|
||||
local s="$1"
|
||||
local state=0
|
||||
local arg=''
|
||||
local c
|
||||
|
||||
for (( i=0; i<${#s}; i++ )); do
|
||||
local c="${s:$i:1}"
|
||||
while read -r -N1 c; do
|
||||
local cls=1
|
||||
case "$c" in
|
||||
' ' | $'\t' | $'\r' | $'\n') cls=0 ;;
|
||||
@ -48,12 +47,10 @@ rspParse() {
|
||||
esac
|
||||
local nextstates="${rspT[$state]}"
|
||||
local nextstate="${nextstates:$cls:1}"
|
||||
if [ "${rspC[$state$nextstate]}" ]; then
|
||||
arg+="$c"
|
||||
elif [ "$state$nextstate" = "10" ]; then
|
||||
rsp+=("$arg")
|
||||
arg=''
|
||||
fi
|
||||
case "${rspP[$state$nextstate]}" in
|
||||
'c') arg+="$c" ;;
|
||||
'a') rsp+=("$arg"); arg='' ;;
|
||||
esac
|
||||
state="$nextstate"
|
||||
done
|
||||
|
||||
@ -68,7 +65,7 @@ expandResponseParams() {
|
||||
local p="$1"
|
||||
shift
|
||||
if [ "${p:0:1}" = '@' -a -e "${p:1}" ]; then
|
||||
rspParse "$(<"${p:1}")"
|
||||
rspParse <"${p:1}"
|
||||
set -- "${rsp[@]}" "$@"
|
||||
else
|
||||
params+=("$p")
|
||||
|
@ -35,7 +35,7 @@ _linkDLLs() {
|
||||
local dllPath2
|
||||
for dllPath2 in "$dllPath" "$(dirname $(readlink "$dllPath" || echo "$dllPath"))"/*.dll; do
|
||||
if [ -e ./"$(basename "$dllPath2")" ]; then continue; fi
|
||||
ln -sr "$dllPath2" .
|
||||
CYGWIN+=\ winsymlinks:nativestrict ln -sr "$dllPath2" .
|
||||
linkCount=$(($linkCount+1))
|
||||
done
|
||||
done
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ stdenv, fetch, cmake, libxml2, libedit, llvm, version, release_version, clang-tools-extra_src, python
|
||||
, fixDarwinDylibNames
|
||||
, enableManpages ? true
|
||||
, enableManpages ? false
|
||||
}:
|
||||
|
||||
let
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ newScope, stdenv, cmake, libxml2, python2, isl, fetchurl, overrideCC, wrapCC, darwin, ccWrapperFun }:
|
||||
{ lowPrio, newScope, stdenv, cmake, libxml2, python2, isl, fetchurl, overrideCC, wrapCC, darwin, ccWrapperFun }:
|
||||
let
|
||||
callPackage = newScope (self // { inherit stdenv cmake libxml2 python2 isl release_version version fetch; });
|
||||
|
||||
@ -13,14 +13,25 @@ let
|
||||
compiler-rt_src = fetch "compiler-rt" "059ipqq27gd928ay06f1ck3vw6y5h5z4zd766x8k0k7jpqimpwnk";
|
||||
clang-tools-extra_src = fetch "clang-tools-extra" "16bwckgcxfn56mbqjlxi7fxja0zm9hjfa6s3ncm3dz98n5zd7ds1";
|
||||
|
||||
self = {
|
||||
llvm = callPackage ./llvm.nix {
|
||||
inherit compiler-rt_src stdenv;
|
||||
};
|
||||
# Add man output without introducing extra dependencies.
|
||||
overrideManOutput = drv:
|
||||
let drv-manpages = drv.override { enableManpages = true; }; in
|
||||
drv // { man = drv-manpages.man; outputs = drv.outputs ++ ["man"]; };
|
||||
|
||||
clang-unwrapped = callPackage ./clang {
|
||||
inherit clang-tools-extra_src stdenv;
|
||||
};
|
||||
llvm = callPackage ./llvm.nix {
|
||||
inherit compiler-rt_src stdenv;
|
||||
};
|
||||
|
||||
clang-unwrapped = callPackage ./clang {
|
||||
inherit clang-tools-extra_src stdenv;
|
||||
};
|
||||
|
||||
self = {
|
||||
llvm = overrideManOutput llvm;
|
||||
clang-unwrapped = overrideManOutput clang-unwrapped;
|
||||
|
||||
llvm-manpages = lowPrio self.llvm.man;
|
||||
clang-manpages = lowPrio self.clang-unwrapped.man;
|
||||
|
||||
clang = wrapCC self.clang-unwrapped;
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
, compiler-rt_src
|
||||
, libcxxabi
|
||||
, debugVersion ? false
|
||||
, enableManpages ? true
|
||||
, enableManpages ? false
|
||||
, enableSharedLibraries ? true
|
||||
, darwin
|
||||
}:
|
||||
|
@ -138,8 +138,7 @@ stdenv.mkDerivation {
|
||||
|
||||
inherit doCheck;
|
||||
|
||||
${if buildPlatform == hostPlatform then "dontSetConfigureCross" else null} = true;
|
||||
${if buildPlatform != hostPlatform then "configurePlatforms" else null} = [];
|
||||
configurePlatforms = [];
|
||||
|
||||
# https://github.com/NixOS/nixpkgs/pull/21742#issuecomment-272305764
|
||||
# https://github.com/rust-lang/rust/issues/30181
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl
|
||||
{ stdenv, hostPlatform, fetchurl
|
||||
, bzip2
|
||||
, gdbm
|
||||
, fetchpatch
|
||||
@ -69,7 +69,7 @@ let
|
||||
|
||||
./glibc-2.25-enosys.patch
|
||||
|
||||
] ++ optionals stdenv.isCygwin [
|
||||
] ++ optionals hostPlatform.isCygwin [
|
||||
./2.5.2-ctypes-util-find_library.patch
|
||||
./2.5.2-tkinter-x11.patch
|
||||
./2.6.2-ssl-threads.patch
|
||||
@ -110,7 +110,7 @@ let
|
||||
"--enable-shared"
|
||||
"--with-threads"
|
||||
"--enable-unicode=ucs4"
|
||||
] ++ optionals stdenv.isCygwin [
|
||||
] ++ optionals hostPlatform.isCygwin [
|
||||
"--with-system-ffi"
|
||||
"--with-system-expat"
|
||||
"ac_cv_func_bind_textdomain_codeset=yes"
|
||||
@ -118,14 +118,14 @@ let
|
||||
"--disable-toolbox-glue"
|
||||
];
|
||||
|
||||
postConfigure = if stdenv.isCygwin then ''
|
||||
postConfigure = if hostPlatform.isCygwin then ''
|
||||
sed -i Makefile -e 's,PYTHONPATH="$(srcdir),PYTHONPATH="$(abs_srcdir),'
|
||||
'' else null;
|
||||
|
||||
buildInputs =
|
||||
optional (stdenv ? cc && stdenv.cc.libc != null) stdenv.cc.libc ++
|
||||
[ bzip2 openssl zlib ]
|
||||
++ optionals stdenv.isCygwin [ expat libffi ]
|
||||
++ optionals hostPlatform.isCygwin [ expat libffi ]
|
||||
++ [ db gdbm ncurses sqlite readline ]
|
||||
++ optionals x11Support [ tcl tk xlibsWrapper libX11 ]
|
||||
++ optionals stdenv.isDarwin [ CF configd ];
|
||||
@ -190,6 +190,8 @@ in stdenv.mkDerivation {
|
||||
find $out -name "*.py" | $out/bin/python -m compileall -q -f -x "lib2to3" -i -
|
||||
find $out -name "*.py" | $out/bin/python -O -m compileall -q -f -x "lib2to3" -i -
|
||||
find $out -name "*.py" | $out/bin/python -OO -m compileall -q -f -x "lib2to3" -i -
|
||||
'' + optionalString hostPlatform.isCygwin ''
|
||||
cp libpython2.7.dll.a $out/lib
|
||||
'';
|
||||
|
||||
passthru = let
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl }:
|
||||
{ stdenv, lib, buildPlatform, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "gdbm-1.13";
|
||||
@ -10,9 +10,22 @@ stdenv.mkDerivation rec {
|
||||
|
||||
doCheck = true;
|
||||
|
||||
# Linking static stubs on cygwin requires correct ordering.
|
||||
# Consider upstreaming this.
|
||||
|
||||
# Disable dbmfetch03.at test because it depends on unlink()
|
||||
# failing on a link in a chmod -w directory, which cygwin
|
||||
# apparently allows.
|
||||
postPatch = lib.optionalString buildPlatform.isCygwin ''
|
||||
substituteInPlace tests/Makefile.in --replace \
|
||||
'_LDADD = ../src/libgdbm.la ../compat/libgdbm_compat.la' \
|
||||
'_LDADD = ../compat/libgdbm_compat.la ../src/libgdbm.la'
|
||||
substituteInPlace tests/testsuite.at --replace \
|
||||
'm4_include([dbmfetch03.at])' ""
|
||||
'';
|
||||
configureFlags = [ "--enable-libgdbm-compat" ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "GNU dbm key/value database library";
|
||||
|
||||
longDescription =
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, lib, fetchurl, libiconv, xz }:
|
||||
{ stdenv, lib, hostPlatform, fetchurl, libiconv, xz }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "gettext-${version}";
|
||||
@ -18,15 +18,6 @@ stdenv.mkDerivation rec {
|
||||
LDFLAGS = if stdenv.isSunOS then "-lm -lmd -lmp -luutil -lnvpair -lnsl -lidmap -lavl -lsec" else "";
|
||||
|
||||
configureFlags = [ "--disable-csharp" "--with-xz" ]
|
||||
++ lib.optionals stdenv.isCygwin [
|
||||
"--disable-java"
|
||||
"--disable-native-java"
|
||||
# Share the cache among the various `configure' runs.
|
||||
"--config-cache"
|
||||
"--with-included-gettext"
|
||||
"--with-included-glib"
|
||||
"--with-included-libcroco"
|
||||
]
|
||||
# avoid retaining reference to CF during stdenv bootstrap
|
||||
++ lib.optionals stdenv.isDarwin [
|
||||
"gt_cv_func_CFPreferencesCopyAppValue=no"
|
||||
@ -38,6 +29,9 @@ stdenv.mkDerivation rec {
|
||||
substituteInPlace gettext-tools/projects/KDE/trigger --replace "/bin/pwd" pwd
|
||||
substituteInPlace gettext-tools/projects/GNOME/trigger --replace "/bin/pwd" pwd
|
||||
substituteInPlace gettext-tools/src/project-id --replace "/bin/pwd" pwd
|
||||
'' + lib.optionalString hostPlatform.isCygwin ''
|
||||
sed -i -e "s/\(cldr_plurals_LDADD = \)/\\1..\/gnulib-lib\/libxml_rpl.la /" gettext-tools/src/Makefile.in
|
||||
sed -i -e "s/\(libgettextsrc_la_LDFLAGS = \)/\\1..\/gnulib-lib\/libxml_rpl.la /" gettext-tools/src/Makefile.in
|
||||
'';
|
||||
|
||||
# On cross building, gettext supposes that the wchar.h from libc
|
||||
@ -49,11 +43,9 @@ stdenv.mkDerivation rec {
|
||||
echo gl_cv_func_wcwidth_works=yes > cachefile
|
||||
configureFlags="$configureFlags --cache-file=`pwd`/cachefile"
|
||||
fi
|
||||
'' + lib.optionalString stdenv.isCygwin ''
|
||||
sed -i -e "s/\(am_libgettextlib_la_OBJECTS = \)error.lo/\\1/" gettext-tools/gnulib-lib/Makefile.in
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ xz xz.bin ] ++ stdenv.lib.optional (!stdenv.isLinux) libiconv; # HACK, see #10874 (and 14664)
|
||||
nativeBuildInputs = [ xz xz.bin ] ++ stdenv.lib.optional (!stdenv.isLinux && !hostPlatform.isCygwin) libiconv; # HACK, see #10874 (and 14664)
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
@ -89,14 +81,3 @@ stdenv.mkDerivation rec {
|
||||
// stdenv.lib.optionalAttrs stdenv.isDarwin {
|
||||
makeFlags = "CFLAGS=-D_FORTIFY_SOURCE=0";
|
||||
}
|
||||
|
||||
// stdenv.lib.optionalAttrs stdenv.isCygwin {
|
||||
patchPhase =
|
||||
# Make sure `error.c' gets compiled and is part of `libgettextlib.la'.
|
||||
# This fixes:
|
||||
# gettext-0.18.1.1/gettext-tools/src/msgcmp.c:371: undefined reference to `_error_message_count'
|
||||
''
|
||||
sed -i gettext-tools/gnulib-lib/Makefile.in \
|
||||
-e 's/am_libgettextlib_la_OBJECTS =/am_libgettextlib_la_OBJECTS = error.lo/g'
|
||||
'';
|
||||
}
|
||||
|
@ -38,8 +38,8 @@ stdenv.mkDerivation rec {
|
||||
cp -r README.txt LICENSE.txt doc $out/share/doc/glew
|
||||
'';
|
||||
|
||||
makeFlags = if hostPlatform == buildPlatform then null else [
|
||||
"SYSTEM=${if hostPlatform.isMinGW then "mingw" else hostPlatform.parsed.kernel}"
|
||||
makeFlags = [
|
||||
"SYSTEM=${if hostPlatform.isMinGW then "mingw" else hostPlatform.parsed.kernel.name}"
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
@ -39,8 +39,8 @@ stdenv.mkDerivation rec {
|
||||
rm $out/lib/*.a
|
||||
'';
|
||||
|
||||
makeFlags = if hostPlatform == buildPlatform then null else [
|
||||
"SYSTEM=${if hostPlatform.isMinGW then "mingw" else hostPlatform.parsed.kernel}"
|
||||
makeFlags = [
|
||||
"SYSTEM=${if hostPlatform.isMinGW then "mingw" else hostPlatform.parsed.kernel.name}"
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, pkgconfig, gettext, perl, python
|
||||
{ stdenv, hostPlatform, fetchurl, pkgconfig, gettext, perl, python
|
||||
, libiconv, libintlOrEmpty, zlib, libffi, pcre, libelf
|
||||
# use utillinuxMinimal to avoid circular dependency (utillinux, systemd, glib)
|
||||
, utillinuxMinimal ? null
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
assert stdenv.isFreeBSD || stdenv.isDarwin || stdenv.cc.isGNU;
|
||||
assert stdenv.isFreeBSD || stdenv.isDarwin || stdenv.cc.isGNU || hostPlatform.isCygwin;
|
||||
assert stdenv.isLinux -> utillinuxMinimal != null;
|
||||
|
||||
# TODO:
|
||||
|
@ -0,0 +1,209 @@
|
||||
From ba67ba3275d47e0080f0e5f09d9f5102c000c97e Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <ba67ba3275d47e0080f0e5f09d9f5102c000c97e.1495998948.git.fweimer@redhat.com>
|
||||
In-Reply-To: <cover.1495998948.git.fweimer@redhat.com>
|
||||
References: <cover.1495998948.git.fweimer@redhat.com>
|
||||
From: Florian Weimer <fweimer@redhat.com>
|
||||
Date: Sun, 28 May 2017 20:44:52 +0200
|
||||
Subject: [PATCH 3/3] rtld: Reject overly long LD_AUDIT path elements
|
||||
To: libc-alpha@sourceware.org
|
||||
|
||||
Also only process the last LD_AUDIT entry.
|
||||
---
|
||||
elf/rtld.c | 110 ++++++++++++++++++++++++++++++++++++++++++++++++++++---------
|
||||
1 file changed, 95 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/elf/rtld.c b/elf/rtld.c
|
||||
index 30f0cae..89d8573 100644
|
||||
--- a/elf/rtld.c
|
||||
+++ b/elf/rtld.c
|
||||
@@ -116,13 +116,95 @@ dso_name_valid_for_suid (const char *p)
|
||||
return *p != '\0';
|
||||
}
|
||||
|
||||
-/* List of auditing DSOs. */
|
||||
+/* LD_AUDIT variable contents. Must be processed before the
|
||||
+ audit_list below. */
|
||||
+const char *audit_list_string;
|
||||
+
|
||||
+/* Cyclic list of auditing DSOs. audit_list->next is the first
|
||||
+ element. */
|
||||
static struct audit_list
|
||||
{
|
||||
const char *name;
|
||||
struct audit_list *next;
|
||||
} *audit_list;
|
||||
|
||||
+/* Iterator for audit_list_string followed by audit_list. */
|
||||
+struct audit_list_iter
|
||||
+{
|
||||
+ /* Tail of audit_list_string still needing processing, or NULL. */
|
||||
+ const char *audit_list_tail;
|
||||
+
|
||||
+ /* The list element returned in the previous iteration. NULL before
|
||||
+ the first element. */
|
||||
+ struct audit_list *previous;
|
||||
+
|
||||
+ /* Scratch buffer for returning a name which is part of
|
||||
+ audit_list_string. */
|
||||
+#ifdef PATH_MAX
|
||||
+ char fname[PATH_MAX];
|
||||
+#else
|
||||
+ char fname[4096];
|
||||
+#endif
|
||||
+};
|
||||
+
|
||||
+/* Initialize an audit list iterator. */
|
||||
+static void
|
||||
+audit_list_iter_init (struct audit_list_iter *iter)
|
||||
+{
|
||||
+ iter->audit_list_tail = audit_list_string;
|
||||
+ iter->previous = NULL;
|
||||
+}
|
||||
+
|
||||
+/* Iterate through both audit_list_string and audit_list. */
|
||||
+static const char *
|
||||
+audit_list_iter_next (struct audit_list_iter *iter)
|
||||
+{
|
||||
+ if (iter->audit_list_tail != NULL)
|
||||
+ {
|
||||
+ /* First iterate over audit_list_string. */
|
||||
+ while (*iter->audit_list_tail != '\0')
|
||||
+ {
|
||||
+ /* Split audit list at colon. */
|
||||
+ size_t len = strcspn (iter->audit_list_tail, ":");
|
||||
+ if (len > 0 && len < sizeof(iter->fname))
|
||||
+ {
|
||||
+ memcpy (iter->fname, iter->audit_list_tail, len);
|
||||
+ iter->fname[len] = '\0';
|
||||
+ }
|
||||
+ else
|
||||
+ /* Do not return this name to the caller. */
|
||||
+ iter->fname[0] = '\0';
|
||||
+
|
||||
+ /* Skip over the substring and the following delimiter. */
|
||||
+ iter->audit_list_tail += len;
|
||||
+ if (*iter->audit_list_tail == ':')
|
||||
+ ++iter->audit_list_tail;
|
||||
+
|
||||
+ /* If the name is valid, return it. */
|
||||
+ if (dso_name_valid_for_suid (iter->fname))
|
||||
+ return iter->fname;
|
||||
+ /* Otherwise, wrap around and try the next name. */
|
||||
+ }
|
||||
+ /* Fall through to the procesing of audit_list. */
|
||||
+ }
|
||||
+
|
||||
+ if (iter->previous == NULL)
|
||||
+ {
|
||||
+ if (audit_list == NULL)
|
||||
+ /* No pre-parsed audit list. */
|
||||
+ return NULL;
|
||||
+ /* Start of audit list. The first list element is at
|
||||
+ audit_list->next (cyclic list). */
|
||||
+ iter->previous = audit_list->next;
|
||||
+ return iter->previous->name;
|
||||
+ }
|
||||
+ if (iter->previous == audit_list)
|
||||
+ /* Cyclic list wrap-around. */
|
||||
+ return NULL;
|
||||
+ iter->previous = iter->previous->next;
|
||||
+ return iter->previous->name;
|
||||
+}
|
||||
+
|
||||
#ifndef HAVE_INLINED_SYSCALLS
|
||||
/* Set nonzero during loading and initialization of executable and
|
||||
libraries, cleared before the executable's entry point runs. This
|
||||
@@ -1290,11 +1368,13 @@ of this helper program; chances are you did not intend to run this program.\n\
|
||||
GL(dl_rtld_map).l_tls_modid = _dl_next_tls_modid ();
|
||||
|
||||
/* If we have auditing DSOs to load, do it now. */
|
||||
- if (__glibc_unlikely (audit_list != NULL))
|
||||
+ bool need_security_init = true;
|
||||
+ if (__glibc_unlikely (audit_list != NULL)
|
||||
+ || __glibc_unlikely (audit_list_string != NULL))
|
||||
{
|
||||
- /* Iterate over all entries in the list. The order is important. */
|
||||
struct audit_ifaces *last_audit = NULL;
|
||||
- struct audit_list *al = audit_list->next;
|
||||
+ struct audit_list_iter al_iter;
|
||||
+ audit_list_iter_init (&al_iter);
|
||||
|
||||
/* Since we start using the auditing DSOs right away we need to
|
||||
initialize the data structures now. */
|
||||
@@ -1305,9 +1385,14 @@ of this helper program; chances are you did not intend to run this program.\n\
|
||||
use different values (especially the pointer guard) and will
|
||||
fail later on. */
|
||||
security_init ();
|
||||
+ need_security_init = false;
|
||||
|
||||
- do
|
||||
+ while (true)
|
||||
{
|
||||
+ const char *name = audit_list_iter_next (&al_iter);
|
||||
+ if (name == NULL)
|
||||
+ break;
|
||||
+
|
||||
int tls_idx = GL(dl_tls_max_dtv_idx);
|
||||
|
||||
/* Now it is time to determine the layout of the static TLS
|
||||
@@ -1316,7 +1401,7 @@ of this helper program; chances are you did not intend to run this program.\n\
|
||||
no DF_STATIC_TLS bit is set. The reason is that we know
|
||||
glibc will use the static model. */
|
||||
struct dlmopen_args dlmargs;
|
||||
- dlmargs.fname = al->name;
|
||||
+ dlmargs.fname = name;
|
||||
dlmargs.map = NULL;
|
||||
|
||||
const char *objname;
|
||||
@@ -1329,7 +1414,7 @@ of this helper program; chances are you did not intend to run this program.\n\
|
||||
not_loaded:
|
||||
_dl_error_printf ("\
|
||||
ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
|
||||
- al->name, err_str);
|
||||
+ name, err_str);
|
||||
if (malloced)
|
||||
free ((char *) err_str);
|
||||
}
|
||||
@@ -1433,10 +1518,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
|
||||
goto not_loaded;
|
||||
}
|
||||
}
|
||||
-
|
||||
- al = al->next;
|
||||
}
|
||||
- while (al != audit_list->next);
|
||||
|
||||
/* If we have any auditing modules, announce that we already
|
||||
have two objects loaded. */
|
||||
@@ -1700,7 +1782,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
|
||||
if (tcbp == NULL)
|
||||
tcbp = init_tls ();
|
||||
|
||||
- if (__glibc_likely (audit_list == NULL))
|
||||
+ if (__glibc_likely (need_security_init))
|
||||
/* Initialize security features. But only if we have not done it
|
||||
earlier. */
|
||||
security_init ();
|
||||
@@ -2331,9 +2413,7 @@ process_dl_audit (char *str)
|
||||
char *p;
|
||||
|
||||
while ((p = (strsep) (&str, ":")) != NULL)
|
||||
- if (p[0] != '\0'
|
||||
- && (__builtin_expect (! __libc_enable_secure, 1)
|
||||
- || strchr (p, '/') == NULL))
|
||||
+ if (dso_name_valid_for_suid (p))
|
||||
{
|
||||
/* This is using the local malloc, not the system malloc. The
|
||||
memory can never be freed. */
|
||||
@@ -2397,7 +2477,7 @@ process_envvars (enum mode *modep)
|
||||
break;
|
||||
}
|
||||
if (memcmp (envline, "AUDIT", 5) == 0)
|
||||
- process_dl_audit (&envline[6]);
|
||||
+ audit_list_string = &envline[6];
|
||||
break;
|
||||
|
||||
case 7:
|
||||
--
|
||||
2.9.4
|
||||
|
@ -0,0 +1,33 @@
|
||||
From 4d009d39ac9ede0369e268554a181b428f177a80 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <4d009d39ac9ede0369e268554a181b428f177a80.1495998948.git.fweimer@redhat.com>
|
||||
In-Reply-To: <cover.1495998948.git.fweimer@redhat.com>
|
||||
References: <cover.1495998948.git.fweimer@redhat.com>
|
||||
From: Florian Weimer <fweimer@redhat.com>
|
||||
Date: Sun, 28 May 2017 20:37:40 +0200
|
||||
Subject: [PATCH 1/3] rtld: Completely ignore LD_LIBRARY_PATH for AT_SECURE=1
|
||||
programs
|
||||
To: libc-alpha@sourceware.org
|
||||
|
||||
LD_LIBRARY_PATH can only be used to reorder system search paths, which
|
||||
is not useful functionality.
|
||||
---
|
||||
elf/rtld.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/elf/rtld.c b/elf/rtld.c
|
||||
index 319ef06..824b6cf 100644
|
||||
--- a/elf/rtld.c
|
||||
+++ b/elf/rtld.c
|
||||
@@ -2419,7 +2419,8 @@ process_envvars (enum mode *modep)
|
||||
|
||||
case 12:
|
||||
/* The library search path. */
|
||||
- if (memcmp (envline, "LIBRARY_PATH", 12) == 0)
|
||||
+ if (!__libc_enable_secure
|
||||
+ && memcmp (envline, "LIBRARY_PATH", 12) == 0)
|
||||
{
|
||||
library_path = &envline[13];
|
||||
break;
|
||||
--
|
||||
2.9.4
|
||||
|
@ -0,0 +1,115 @@
|
||||
From 65ff0b7a085b85271ec8fde99f542281b495e3bc Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <65ff0b7a085b85271ec8fde99f542281b495e3bc.1495998948.git.fweimer@redhat.com>
|
||||
In-Reply-To: <cover.1495998948.git.fweimer@redhat.com>
|
||||
References: <cover.1495998948.git.fweimer@redhat.com>
|
||||
From: Florian Weimer <fweimer@redhat.com>
|
||||
Date: Sun, 28 May 2017 20:57:40 +0200
|
||||
Subject: [PATCH 2/3] rtld: Reject overly long LD_PRELOAD path elements
|
||||
To: libc-alpha@sourceware.org
|
||||
|
||||
---
|
||||
elf/rtld.c | 69 +++++++++++++++++++++++++++++++++++++++++++++++---------------
|
||||
1 file changed, 53 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/elf/rtld.c b/elf/rtld.c
|
||||
index 824b6cf..30f0cae 100644
|
||||
--- a/elf/rtld.c
|
||||
+++ b/elf/rtld.c
|
||||
@@ -99,6 +99,22 @@ uintptr_t __pointer_chk_guard_local
|
||||
strong_alias (__pointer_chk_guard_local, __pointer_chk_guard)
|
||||
#endif
|
||||
|
||||
+/* Check that AT_SECURE=0, or that the passed name does not contain
|
||||
+ directories and is not overly long. Reject empty names
|
||||
+ unconditionally. */
|
||||
+static bool
|
||||
+dso_name_valid_for_suid (const char *p)
|
||||
+{
|
||||
+ if (__glibc_unlikely (__libc_enable_secure))
|
||||
+ {
|
||||
+ /* Ignore pathnames with directories for AT_SECURE=1
|
||||
+ programs, and also skip overlong names. */
|
||||
+ size_t len = strlen (p);
|
||||
+ if (len >= NAME_MAX || memchr (p, '/', len) != NULL)
|
||||
+ return false;
|
||||
+ }
|
||||
+ return *p != '\0';
|
||||
+}
|
||||
|
||||
/* List of auditing DSOs. */
|
||||
static struct audit_list
|
||||
@@ -716,6 +732,46 @@ static const char *preloadlist attribute_relro;
|
||||
/* Nonzero if information about versions has to be printed. */
|
||||
static int version_info attribute_relro;
|
||||
|
||||
+/* The LD_PRELOAD environment variable gives list of libraries
|
||||
+ separated by white space or colons that are loaded before the
|
||||
+ executable's dependencies and prepended to the global scope list.
|
||||
+ (If the binary is running setuid all elements containing a '/' are
|
||||
+ ignored since it is insecure.) Return the number of preloads
|
||||
+ performed. */
|
||||
+unsigned int
|
||||
+handle_ld_preload (const char *preloadlist, struct link_map *main_map)
|
||||
+{
|
||||
+ unsigned int npreloads = 0;
|
||||
+ const char *p = preloadlist;
|
||||
+#ifdef PATH_MAX
|
||||
+ char fname[PATH_MAX];
|
||||
+#else
|
||||
+ char fname[4096];
|
||||
+#endif
|
||||
+
|
||||
+ while (*p != '\0')
|
||||
+ {
|
||||
+ /* Split preload list at space/colon. */
|
||||
+ size_t len = strcspn (p, " :");
|
||||
+ if (len > 0 && len < sizeof(fname))
|
||||
+ {
|
||||
+ memcpy (fname, p, len);
|
||||
+ fname[len] = '\0';
|
||||
+ }
|
||||
+ else
|
||||
+ fname[0] = '\0';
|
||||
+
|
||||
+ /* Skip over the substring and the following delimiter. */
|
||||
+ p += len;
|
||||
+ if (*p == ' ' || *p == ':')
|
||||
+ ++p;
|
||||
+
|
||||
+ if (dso_name_valid_for_suid (fname))
|
||||
+ npreloads += do_preload (fname, main_map, "LD_PRELOAD");
|
||||
+ }
|
||||
+ return npreloads;
|
||||
+}
|
||||
+
|
||||
static void
|
||||
dl_main (const ElfW(Phdr) *phdr,
|
||||
ElfW(Word) phnum,
|
||||
@@ -1462,23 +1514,8 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
|
||||
|
||||
if (__glibc_unlikely (preloadlist != NULL))
|
||||
{
|
||||
- /* The LD_PRELOAD environment variable gives list of libraries
|
||||
- separated by white space or colons that are loaded before the
|
||||
- executable's dependencies and prepended to the global scope
|
||||
- list. If the binary is running setuid all elements
|
||||
- containing a '/' are ignored since it is insecure. */
|
||||
- char *list = strdupa (preloadlist);
|
||||
- char *p;
|
||||
-
|
||||
HP_TIMING_NOW (start);
|
||||
-
|
||||
- /* Prevent optimizing strsep. Speed is not important here. */
|
||||
- while ((p = (strsep) (&list, " :")) != NULL)
|
||||
- if (p[0] != '\0'
|
||||
- && (__builtin_expect (! __libc_enable_secure, 1)
|
||||
- || strchr (p, '/') == NULL))
|
||||
- npreloads += do_preload (p, main_map, "LD_PRELOAD");
|
||||
-
|
||||
+ npreloads += handle_ld_preload (preloadlist, main_map);
|
||||
HP_TIMING_NOW (stop);
|
||||
HP_TIMING_DIFF (diff, start, stop);
|
||||
HP_TIMING_ACCUM_NT (load_time, diff);
|
||||
--
|
||||
2.9.4
|
||||
|
@ -59,8 +59,16 @@ stdenv.mkDerivation ({
|
||||
"/bin:/usr/bin", which is inappropriate on NixOS machines. This
|
||||
patch extends the search path by "/run/current-system/sw/bin". */
|
||||
./fix_path_attribute_in_getconf.patch
|
||||
|
||||
/* Stack Clash */
|
||||
./CVE-2017-1000366-rtld-LD_LIBRARY_PATH.patch
|
||||
./CVE-2017-1000366-rtld-LD_PRELOAD.patch
|
||||
./CVE-2017-1000366-rtld-LD_AUDIT.patch
|
||||
]
|
||||
++ lib.optional stdenv.isi686 ./fix-i686-memchr.patch;
|
||||
++ lib.optionals stdenv.isi686 [
|
||||
./fix-i686-memchr.patch
|
||||
./i686-fix-vectorized-strcspn.patch
|
||||
];
|
||||
|
||||
postPatch =
|
||||
# Needed for glibc to build with the gnumake 3.82
|
||||
|
@ -0,0 +1,42 @@
|
||||
From adc7e06fb412a2a1ee52f8cb788caf436335b9f3 Mon Sep 17 00:00:00 2001
|
||||
From: Florian Weimer <fweimer@redhat.com>
|
||||
Date: Wed, 14 Jun 2017 08:11:22 +0200
|
||||
Subject: [PATCH] i686: Add missing IS_IN (libc) guards to vectorized strcspn
|
||||
|
||||
Since commit d957c4d3fa48d685ff2726c605c988127ef99395 (i386: Compile
|
||||
rtld-*.os with -mno-sse -mno-mmx -mfpmath=387), vector intrinsics can
|
||||
no longer be used in ld.so, even if the compiled code never makes it
|
||||
into the final ld.so link. This commit adds the missing IS_IN (libc)
|
||||
guard to the SSE 4.2 strcspn implementation, so that it can be used from
|
||||
ld.so in the future.
|
||||
|
||||
(cherry picked from commit 69052a3a95da37169a08f9e59b2cc1808312753c)
|
||||
---
|
||||
ChangeLog | 5 +++++
|
||||
sysdeps/i386/i686/multiarch/strcspn-c.c | 6 ++++--
|
||||
sysdeps/i386/i686/multiarch/varshift.c | 4 +++-
|
||||
3 files changed, 12 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/sysdeps/i386/i686/multiarch/strcspn-c.c b/sysdeps/i386/i686/multiarch/strcspn-c.c
|
||||
index 6d61e19..ec230fb 100644
|
||||
--- a/sysdeps/i386/i686/multiarch/strcspn-c.c
|
||||
+++ b/sysdeps/i386/i686/multiarch/strcspn-c.c
|
||||
@@ -1,2 +1,4 @@
|
||||
-#define __strcspn_sse2 __strcspn_ia32
|
||||
-#include <sysdeps/x86_64/multiarch/strcspn-c.c>
|
||||
+#if IS_IN (libc)
|
||||
+# define __strcspn_sse2 __strcspn_ia32
|
||||
+# include <sysdeps/x86_64/multiarch/strcspn-c.c>
|
||||
+#endif
|
||||
diff --git a/sysdeps/i386/i686/multiarch/varshift.c b/sysdeps/i386/i686/multiarch/varshift.c
|
||||
index 7760b96..6742a35 100644
|
||||
--- a/sysdeps/i386/i686/multiarch/varshift.c
|
||||
+++ b/sysdeps/i386/i686/multiarch/varshift.c
|
||||
@@ -1 +1,3 @@
|
||||
-#include <sysdeps/x86_64/multiarch/varshift.c>
|
||||
+#if IS_IN (libc)
|
||||
+# include <sysdeps/x86_64/multiarch/varshift.c>
|
||||
+#endif
|
||||
--
|
||||
2.9.3
|
||||
|
@ -11,9 +11,8 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "0vf7s9dwk2xkmhb79aigqm0x0yfbw1j0b9ksm51207qwr179n6jr";
|
||||
};
|
||||
|
||||
# TODO(@Ericson2314) Make unconditional next hash break
|
||||
patches = if hostPlatform == buildPlatform then null else [
|
||||
./cross-ar.patch
|
||||
patches = [
|
||||
./dont-hardcode-ar.patch
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "libev-${version}";
|
||||
version="4.22";
|
||||
version="4.24";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://dist.schmorp.de/libev/Attic/${name}.tar.gz";
|
||||
sha256 = "1mhvy38g9947bbr0n0hzc34zwfvvfd99qgzpkbap8g2lmkl7jq3k";
|
||||
sha256 = "08gqsza1czx0nf62nkk183jb0946yzjsymaacxbzdgcs8z9r6dcp";
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
@ -13,11 +13,6 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "0y1ij745r4p48mxq84rax40p10ln7fc7m243p8k8sia519i3dxfc";
|
||||
};
|
||||
|
||||
patches = lib.optionals stdenv.isCygwin [
|
||||
./libiconv-1.14-reloc.patch
|
||||
./libiconv-1.14-wchar.patch
|
||||
];
|
||||
|
||||
postPatch =
|
||||
lib.optionalString ((hostPlatform != buildPlatform && hostPlatform.libc == "msvcrt") || stdenv.cc.nativeLibc)
|
||||
''
|
||||
@ -25,12 +20,7 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
configureFlags =
|
||||
# On Cygwin, Libtool produces a `.dll.a', which is not a "real" DLL
|
||||
# (Windows' linker would need to be used somehow to produce an actual
|
||||
# DLL.) Thus, build the static library too, and this is what Gettext
|
||||
# will actually use.
|
||||
lib.optional stdenv.isCygwin "--enable-static"
|
||||
++ lib.optional stdenv.isFreeBSD "--with-pic";
|
||||
lib.optional stdenv.isFreeBSD "--with-pic";
|
||||
|
||||
crossAttrs = {
|
||||
# Disable stripping to avoid "libiconv.a: Archive has no index" (MinGW).
|
||||
|
@ -1,269 +0,0 @@
|
||||
--- libiconv-1.14/lib/relocatable.c 2011-08-07 13:48:03.000000000 -0400
|
||||
+++ libiconv-1.14/lib/relocatable.c 2011-10-15 03:14:13.195133600 -0400
|
||||
@@ -2,20 +2,18 @@
|
||||
Copyright (C) 2003-2006, 2008-2011 Free Software Foundation, Inc.
|
||||
Written by Bruno Haible <bruno@clisp.org>, 2003.
|
||||
|
||||
- This program is free software; you can redistribute it and/or modify it
|
||||
- under the terms of the GNU Library General Public License as published
|
||||
- by the Free Software Foundation; either version 2, or (at your option)
|
||||
- any later version.
|
||||
+ This program is free software: you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU Lesser General Public License as published by
|
||||
+ the Free Software Foundation; either version 2.1 of the License, or
|
||||
+ (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
- Library General Public License for more details.
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU Lesser General Public License for more details.
|
||||
|
||||
- You should have received a copy of the GNU Library General Public
|
||||
- License along with this program; if not, write to the Free Software
|
||||
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
- USA. */
|
||||
+ You should have received a copy of the GNU Lesser General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
|
||||
/* Tell glibc's <stdio.h> to provide a prototype for getline().
|
||||
@@ -87,6 +85,19 @@
|
||||
# define FILE_SYSTEM_PREFIX_LEN(P) 0
|
||||
#endif
|
||||
|
||||
+/* Whether to enable the more costly support for relocatable libraries.
|
||||
+ It allows libraries to be have been installed with a different original
|
||||
+ prefix than the program. But it is quite costly, especially on Cygwin
|
||||
+ platforms, see below. Therefore we enable it by default only on native
|
||||
+ Win32 platforms. */
|
||||
+#ifndef ENABLE_COSTLY_RELOCATABLE
|
||||
+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
|
||||
+# define ENABLE_COSTLY_RELOCATABLE 1
|
||||
+# else
|
||||
+# define ENABLE_COSTLY_RELOCATABLE 0
|
||||
+# endif
|
||||
+#endif
|
||||
+
|
||||
/* Original installation prefix. */
|
||||
static char *orig_prefix;
|
||||
static size_t orig_prefix_len;
|
||||
@@ -156,7 +167,7 @@
|
||||
#endif
|
||||
}
|
||||
|
||||
-#if !defined IN_LIBRARY || (defined PIC && defined INSTALLDIR)
|
||||
+#if !defined IN_LIBRARY || (defined PIC && defined INSTALLDIR && ENABLE_COSTLY_RELOCATABLE)
|
||||
|
||||
/* Convenience function:
|
||||
Computes the current installation prefix, based on the original
|
||||
@@ -286,7 +297,7 @@
|
||||
|
||||
#endif /* !IN_LIBRARY || PIC */
|
||||
|
||||
-#if defined PIC && defined INSTALLDIR
|
||||
+#if defined PIC && defined INSTALLDIR && ENABLE_COSTLY_RELOCATABLE
|
||||
|
||||
/* Full pathname of shared library, or NULL. */
|
||||
static char *shared_library_fullname;
|
||||
@@ -332,7 +343,9 @@
|
||||
#if (defined __linux__ && (__GLIBC__ >= 2 || defined __UCLIBC__)) || defined __CYGWIN__
|
||||
/* Linux has /proc/self/maps. glibc 2 and uClibc have the getline()
|
||||
function.
|
||||
- Cygwin >= 1.5 has /proc/self/maps and the getline() function too. */
|
||||
+ Cygwin >= 1.5 has /proc/self/maps and the getline() function too.
|
||||
+ But it is costly: ca. 0.3 ms on Linux, 3 ms on Cygwin 1.5, and 5 ms on
|
||||
+ Cygwin 1.7. */
|
||||
FILE *fp;
|
||||
|
||||
/* Open the current process' maps file. It describes one VMA per line. */
|
||||
@@ -405,7 +418,7 @@
|
||||
const char *
|
||||
relocate (const char *pathname)
|
||||
{
|
||||
-#if defined PIC && defined INSTALLDIR
|
||||
+#if defined PIC && defined INSTALLDIR && ENABLE_COSTLY_RELOCATABLE
|
||||
static int initialized;
|
||||
|
||||
/* Initialization code for a shared library. */
|
||||
--- libiconv-1.14/libcharset/lib/relocatable.c 2011-08-07 13:48:03.000000000 -0400
|
||||
+++ libiconv-1.14/libcharset/lib/relocatable.c 2011-10-15 03:14:27.878133600 -0400
|
||||
@@ -2,20 +2,18 @@
|
||||
Copyright (C) 2003-2006, 2008-2011 Free Software Foundation, Inc.
|
||||
Written by Bruno Haible <bruno@clisp.org>, 2003.
|
||||
|
||||
- This program is free software; you can redistribute it and/or modify it
|
||||
- under the terms of the GNU Library General Public License as published
|
||||
- by the Free Software Foundation; either version 2, or (at your option)
|
||||
- any later version.
|
||||
+ This program is free software: you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU Lesser General Public License as published by
|
||||
+ the Free Software Foundation; either version 2.1 of the License, or
|
||||
+ (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
- Library General Public License for more details.
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU Lesser General Public License for more details.
|
||||
|
||||
- You should have received a copy of the GNU Library General Public
|
||||
- License along with this program; if not, write to the Free Software
|
||||
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
- USA. */
|
||||
+ You should have received a copy of the GNU Lesser General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
|
||||
/* Tell glibc's <stdio.h> to provide a prototype for getline().
|
||||
@@ -87,6 +85,19 @@
|
||||
# define FILE_SYSTEM_PREFIX_LEN(P) 0
|
||||
#endif
|
||||
|
||||
+/* Whether to enable the more costly support for relocatable libraries.
|
||||
+ It allows libraries to be have been installed with a different original
|
||||
+ prefix than the program. But it is quite costly, especially on Cygwin
|
||||
+ platforms, see below. Therefore we enable it by default only on native
|
||||
+ Win32 platforms. */
|
||||
+#ifndef ENABLE_COSTLY_RELOCATABLE
|
||||
+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
|
||||
+# define ENABLE_COSTLY_RELOCATABLE 1
|
||||
+# else
|
||||
+# define ENABLE_COSTLY_RELOCATABLE 0
|
||||
+# endif
|
||||
+#endif
|
||||
+
|
||||
/* Original installation prefix. */
|
||||
static char *orig_prefix;
|
||||
static size_t orig_prefix_len;
|
||||
@@ -156,7 +167,7 @@
|
||||
#endif
|
||||
}
|
||||
|
||||
-#if !defined IN_LIBRARY || (defined PIC && defined INSTALLDIR)
|
||||
+#if !defined IN_LIBRARY || (defined PIC && defined INSTALLDIR && ENABLE_COSTLY_RELOCATABLE)
|
||||
|
||||
/* Convenience function:
|
||||
Computes the current installation prefix, based on the original
|
||||
@@ -286,7 +297,7 @@
|
||||
|
||||
#endif /* !IN_LIBRARY || PIC */
|
||||
|
||||
-#if defined PIC && defined INSTALLDIR
|
||||
+#if defined PIC && defined INSTALLDIR && ENABLE_COSTLY_RELOCATABLE
|
||||
|
||||
/* Full pathname of shared library, or NULL. */
|
||||
static char *shared_library_fullname;
|
||||
@@ -332,7 +343,9 @@
|
||||
#if (defined __linux__ && (__GLIBC__ >= 2 || defined __UCLIBC__)) || defined __CYGWIN__
|
||||
/* Linux has /proc/self/maps. glibc 2 and uClibc have the getline()
|
||||
function.
|
||||
- Cygwin >= 1.5 has /proc/self/maps and the getline() function too. */
|
||||
+ Cygwin >= 1.5 has /proc/self/maps and the getline() function too.
|
||||
+ But it is costly: ca. 0.3 ms on Linux, 3 ms on Cygwin 1.5, and 5 ms on
|
||||
+ Cygwin 1.7. */
|
||||
FILE *fp;
|
||||
|
||||
/* Open the current process' maps file. It describes one VMA per line. */
|
||||
@@ -405,7 +418,7 @@
|
||||
const char *
|
||||
relocate (const char *pathname)
|
||||
{
|
||||
-#if defined PIC && defined INSTALLDIR
|
||||
+#if defined PIC && defined INSTALLDIR && ENABLE_COSTLY_RELOCATABLE
|
||||
static int initialized;
|
||||
|
||||
/* Initialization code for a shared library. */
|
||||
--- libiconv-1.14/srclib/relocatable.c 2011-08-07 09:42:06.000000000 -0400
|
||||
+++ libiconv-1.14/srclib/relocatable.c 2011-10-15 03:14:37.739133600 -0400
|
||||
@@ -3,16 +3,16 @@
|
||||
Written by Bruno Haible <bruno@clisp.org>, 2003.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
- it under the terms of the GNU General Public License as published by
|
||||
- the Free Software Foundation; either version 3 of the License, or
|
||||
+ it under the terms of the GNU Lesser General Public License as published by
|
||||
+ the Free Software Foundation; either version 2.1 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
- GNU General Public License for more details.
|
||||
+ GNU Lesser General Public License for more details.
|
||||
|
||||
- You should have received a copy of the GNU General Public License
|
||||
+ You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
|
||||
@@ -85,6 +85,19 @@
|
||||
# define FILE_SYSTEM_PREFIX_LEN(P) 0
|
||||
#endif
|
||||
|
||||
+/* Whether to enable the more costly support for relocatable libraries.
|
||||
+ It allows libraries to be have been installed with a different original
|
||||
+ prefix than the program. But it is quite costly, especially on Cygwin
|
||||
+ platforms, see below. Therefore we enable it by default only on native
|
||||
+ Win32 platforms. */
|
||||
+#ifndef ENABLE_COSTLY_RELOCATABLE
|
||||
+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
|
||||
+# define ENABLE_COSTLY_RELOCATABLE 1
|
||||
+# else
|
||||
+# define ENABLE_COSTLY_RELOCATABLE 0
|
||||
+# endif
|
||||
+#endif
|
||||
+
|
||||
/* Original installation prefix. */
|
||||
static char *orig_prefix;
|
||||
static size_t orig_prefix_len;
|
||||
@@ -154,7 +167,7 @@
|
||||
#endif
|
||||
}
|
||||
|
||||
-#if !defined IN_LIBRARY || (defined PIC && defined INSTALLDIR)
|
||||
+#if !defined IN_LIBRARY || (defined PIC && defined INSTALLDIR && ENABLE_COSTLY_RELOCATABLE)
|
||||
|
||||
/* Convenience function:
|
||||
Computes the current installation prefix, based on the original
|
||||
@@ -284,7 +297,7 @@
|
||||
|
||||
#endif /* !IN_LIBRARY || PIC */
|
||||
|
||||
-#if defined PIC && defined INSTALLDIR
|
||||
+#if defined PIC && defined INSTALLDIR && ENABLE_COSTLY_RELOCATABLE
|
||||
|
||||
/* Full pathname of shared library, or NULL. */
|
||||
static char *shared_library_fullname;
|
||||
@@ -330,7 +343,9 @@
|
||||
#if (defined __linux__ && (__GLIBC__ >= 2 || defined __UCLIBC__)) || defined __CYGWIN__
|
||||
/* Linux has /proc/self/maps. glibc 2 and uClibc have the getline()
|
||||
function.
|
||||
- Cygwin >= 1.5 has /proc/self/maps and the getline() function too. */
|
||||
+ Cygwin >= 1.5 has /proc/self/maps and the getline() function too.
|
||||
+ But it is costly: ca. 0.3 ms on Linux, 3 ms on Cygwin 1.5, and 5 ms on
|
||||
+ Cygwin 1.7. */
|
||||
FILE *fp;
|
||||
|
||||
/* Open the current process' maps file. It describes one VMA per line. */
|
||||
@@ -403,7 +418,7 @@
|
||||
const char *
|
||||
relocate (const char *pathname)
|
||||
{
|
||||
-#if defined PIC && defined INSTALLDIR
|
||||
+#if defined PIC && defined INSTALLDIR && ENABLE_COSTLY_RELOCATABLE
|
||||
static int initialized;
|
||||
|
||||
/* Initialization code for a shared library. */
|
||||
--- libiconv-1.14/srcm4/gnulib-comp.m4 2011-08-07 09:42:12.000000000 -0400
|
||||
+++ libiconv-1.14/srcm4/gnulib-comp.m4 2011-08-30 02:40:45.597317000 -0400
|
||||
@@ -164,6 +164,7 @@ gl_UNISTD_MODULE_INDICATOR([readlink])
|
||||
gl_RELOCATABLE([$gl_source_base])
|
||||
if test $RELOCATABLE = yes; then
|
||||
AC_LIBOBJ([progreloc])
|
||||
+ AC_LIBOBJ([relocatable])
|
||||
fi
|
||||
gl_FUNC_READLINK_SEPARATE
|
||||
gl_CANONICALIZE_LGPL_SEPARATE
|
@ -1,102 +0,0 @@
|
||||
--- libiconv-1.14/libcharset/lib/localcharset.c 2011-02-28 17:43:35.000000000 -0500
|
||||
+++ libiconv-1.14/libcharset/lib/localcharset.c 2011-08-28 00:16:57.238000000 -0400
|
||||
@@ -54,10 +54,6 @@
|
||||
# include <locale.h>
|
||||
# endif
|
||||
# endif
|
||||
-# ifdef __CYGWIN__
|
||||
-# define WIN32_LEAN_AND_MEAN
|
||||
-# include <windows.h>
|
||||
-# endif
|
||||
#elif defined WIN32_NATIVE
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# include <windows.h>
|
||||
@@ -124,7 +120,7 @@
|
||||
cp = charset_aliases;
|
||||
if (cp == NULL)
|
||||
{
|
||||
-#if !(defined DARWIN7 || defined VMS || defined WIN32_NATIVE || defined __CYGWIN__)
|
||||
+#if !(defined DARWIN7 || defined VMS || defined WIN32_NATIVE)
|
||||
const char *dir;
|
||||
const char *base = "charset.alias";
|
||||
char *file_name;
|
||||
@@ -309,7 +305,7 @@
|
||||
"DECKOREAN" "\0" "EUC-KR" "\0";
|
||||
# endif
|
||||
|
||||
-# if defined WIN32_NATIVE || defined __CYGWIN__
|
||||
+# if defined WIN32_NATIVE
|
||||
/* To avoid the troubles of installing a separate file in the same
|
||||
directory as the DLL and of retrieving the DLL's directory at
|
||||
runtime, simply inline the aliases here. */
|
||||
@@ -365,64 +361,12 @@
|
||||
|
||||
# if HAVE_LANGINFO_CODESET
|
||||
|
||||
- /* Most systems support nl_langinfo (CODESET) nowadays. */
|
||||
- codeset = nl_langinfo (CODESET);
|
||||
-
|
||||
-# ifdef __CYGWIN__
|
||||
- /* Cygwin < 1.7 does not have locales. nl_langinfo (CODESET) always
|
||||
- returns "US-ASCII". Return the suffix of the locale name from the
|
||||
- environment variables (if present) or the codepage as a number. */
|
||||
- if (codeset != NULL && strcmp (codeset, "US-ASCII") == 0)
|
||||
- {
|
||||
- const char *locale;
|
||||
- static char buf[2 + 10 + 1];
|
||||
-
|
||||
- locale = getenv ("LC_ALL");
|
||||
- if (locale == NULL || locale[0] == '\0')
|
||||
- {
|
||||
- locale = getenv ("LC_CTYPE");
|
||||
- if (locale == NULL || locale[0] == '\0')
|
||||
- locale = getenv ("LANG");
|
||||
- }
|
||||
- if (locale != NULL && locale[0] != '\0')
|
||||
- {
|
||||
- /* If the locale name contains an encoding after the dot, return
|
||||
- it. */
|
||||
- const char *dot = strchr (locale, '.');
|
||||
-
|
||||
- if (dot != NULL)
|
||||
- {
|
||||
- const char *modifier;
|
||||
-
|
||||
- dot++;
|
||||
- /* Look for the possible @... trailer and remove it, if any. */
|
||||
- modifier = strchr (dot, '@');
|
||||
- if (modifier == NULL)
|
||||
- return dot;
|
||||
- if (modifier - dot < sizeof (buf))
|
||||
- {
|
||||
- memcpy (buf, dot, modifier - dot);
|
||||
- buf [modifier - dot] = '\0';
|
||||
- return buf;
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- /* Woe32 has a function returning the locale's codepage as a number:
|
||||
- GetACP(). This encoding is used by Cygwin, unless the user has set
|
||||
- the environment variable CYGWIN=codepage:oem (which very few people
|
||||
- do).
|
||||
- Output directed to console windows needs to be converted (to
|
||||
- GetOEMCP() if the console is using a raster font, or to
|
||||
- GetConsoleOutputCP() if it is using a TrueType font). Cygwin does
|
||||
- this conversion transparently (see winsup/cygwin/fhandler_console.cc),
|
||||
- converting to GetConsoleOutputCP(). This leads to correct results,
|
||||
- except when SetConsoleOutputCP has been called and a raster font is
|
||||
- in use. */
|
||||
- sprintf (buf, "CP%u", GetACP ());
|
||||
- codeset = buf;
|
||||
- }
|
||||
-# endif
|
||||
+ /* Most systems support nl_langinfo (CODESET) nowadays.
|
||||
+ POSIX allows that the returned pointer may point to a static area that
|
||||
+ may be overwritten by subsequent calls to setlocale or nl_langinfo. */
|
||||
+ static char codeset_buf[64];
|
||||
+ codeset_buf[0] = '\0';
|
||||
+ codeset = strncat (codeset_buf, nl_langinfo (CODESET), sizeof (codeset_buf));
|
||||
|
||||
# else
|
||||
|
@ -1,11 +1,11 @@
|
||||
{ stdenv, fetchurl, libgcrypt, curl, gnutls, pkgconfig }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "libmicrohttpd-0.9.53";
|
||||
name = "libmicrohttpd-0.9.55";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/libmicrohttpd/${name}.tar.gz";
|
||||
sha256 = "1i1c7hwjmc4n31cgmfycgi8xsnm3kyc4zzdd4dir6i0z70nyq5cv";
|
||||
sha256 = "1y6h1slav5l6k8zyb01dpw65dscdgxxgfa3a0z9qnn7jr66sn70c";
|
||||
};
|
||||
|
||||
outputs = [ "out" "dev" "devdoc" "info" ];
|
||||
|
@ -19,6 +19,12 @@ stdenv.mkDerivation rec {
|
||||
|
||||
patches = stdenv.lib.optional stdenv.isSunOS ./patch-ah.patch;
|
||||
|
||||
# fixes: can't build x86_64-unknown-cygwin shared library unless -no-undefined is specified
|
||||
postPatch = optionalString hostPlatform.isCygwin ''
|
||||
substituteInPlace tests/plugins/Makefile.in \
|
||||
--replace 'la_LDFLAGS =' 'la_LDFLAGS = $(WIN32_EXTRA_LDFLAGS)'
|
||||
'';
|
||||
|
||||
outputs = [ "bin" "dev" "out" "doc" ] ++ stdenv.lib.optional pythonSupport "py";
|
||||
|
||||
buildInputs = [ libxml2.dev ] ++ stdenv.lib.optionals pythonSupport [ libxml2.py python2 ];
|
||||
|
@ -67,7 +67,7 @@ let
|
||||
in
|
||||
|
||||
let
|
||||
version = "17.1.2";
|
||||
version = "17.1.4";
|
||||
branch = head (splitString "." version);
|
||||
driverLink = "/run/opengl-driver" + optionalString stdenv.isi686 "-32";
|
||||
in
|
||||
@ -82,7 +82,7 @@ stdenv.mkDerivation {
|
||||
"ftp://ftp.freedesktop.org/pub/mesa/older-versions/${branch}.x/${version}/mesa-${version}.tar.xz"
|
||||
"https://launchpad.net/mesa/trunk/${version}/+download/mesa-${version}.tar.xz"
|
||||
];
|
||||
sha256 = "0937804f43746339b1f9540d8f9c8b4a1bb3d3eec0e4020eac283b8799798239";
|
||||
sha256 = "06f3b0e6a28f0d20b7f3391cf67fe89ae98ecd0a686cd545da76557b6cec9cad";
|
||||
};
|
||||
|
||||
prePatch = "patchShebangs .";
|
||||
|
@ -46,6 +46,9 @@ stdenv.mkDerivation rec {
|
||||
buildInputs = lib.optional (mouseSupport && stdenv.isLinux) gpm;
|
||||
|
||||
preConfigure = ''
|
||||
# These paths end up in the default lookup chain.
|
||||
export TERMINFO_DIRS=/etc/terminfo
|
||||
|
||||
export PKG_CONFIG_LIBDIR="$dev/lib/pkgconfig"
|
||||
mkdir -p "$PKG_CONFIG_LIBDIR"
|
||||
configureFlagsArray+=(
|
||||
@ -61,8 +64,6 @@ stdenv.mkDerivation rec {
|
||||
-e '/CPPFLAGS="$CPPFLAGS/s/ -D_XOPEN_SOURCE_EXTENDED//' \
|
||||
configure
|
||||
CFLAGS=-D_XOPEN_SOURCE_EXTENDED
|
||||
'' + lib.optionalString stdenv.isCygwin ''
|
||||
sed -i -e 's,LIB_SUFFIX="t,LIB_SUFFIX=",' configure
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
@ -122,7 +123,7 @@ stdenv.mkDerivation rec {
|
||||
moveToOutput "bin/tset" "$out"
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
preFixup = lib.optionalString (!hostPlatform.isCygwin) ''
|
||||
rm "$out"/lib/*.a
|
||||
'';
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
{ stdenv, fetchurl, openssl, cyrus_sasl, db, groff, libtool }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "openldap-2.4.44";
|
||||
name = "openldap-2.4.45";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.openldap.org/software/download/OpenLDAP/openldap-release/${name}.tgz";
|
||||
sha256 = "0044p20hx07fwgw2mbwj1fkx04615hhs1qyx4mawj2bhqvrnppnp";
|
||||
sha256 = "091qvwk5dkcpp17ziabcnh3rg3m7qwzw2pihfcd1d5fdxgywzmnd";
|
||||
};
|
||||
|
||||
# TODO: separate "out" and "bin"
|
||||
|
@ -1,136 +0,0 @@
|
||||
--- openssl-1.0.1e/config 2014-10-23 15:53:23.436600000 +0200
|
||||
+++ openssl-1.0.1e/config 2014-10-23 15:55:33.837000000 +0200
|
||||
@@ -832,6 +832,7 @@
|
||||
# these are all covered by the catchall below
|
||||
# *-dgux) OUT="dgux" ;;
|
||||
mips-sony-newsos4) OUT="newsos4-gcc" ;;
|
||||
+ x86_64-*-cygwin) OUT="Cygwin-x86_64" ;;
|
||||
*-*-cygwin_pre1.3) OUT="Cygwin-pre1.3" ;;
|
||||
*-*-cygwin) OUT="Cygwin" ;;
|
||||
t3e-cray-unicosmk) OUT="cray-t3e" ;;
|
||||
--- openssl-1.0.1e/Configure 2013-02-17 17:06:18.682058900 -0600
|
||||
+++ openssl-1.0.1e/Configure 2013-02-17 16:38:08.000000000 -0600
|
||||
@@ -550,6 +550,7 @@ my %table=(
|
||||
"Cygwin-pre1.3", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown):CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:win32",
|
||||
"Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall:::CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_asm}:coff:dlfcn:cygwin-shared:-D_WINDLL:-shared:.dll.a",
|
||||
"debug-Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -march=i486 -Wall -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -g -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror:::CYGWIN32:::${no_asm}:dlfcn:cygwin-shared:-D_WINDLL:-shared:.dll.a",
|
||||
+"Cygwin-x86_64", "gcc:-DTERMIOS -DL_ENDIAN -O3 -Wall:::CYGWIN32::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:mingw64:dlfcn:cygwin-shared:-D_WINDLL:-shared:.dll.a",
|
||||
|
||||
# NetWare from David Ward (dsward@novell.com)
|
||||
# requires either MetroWerks NLM development tools, or gcc / nlmconv
|
||||
@@ -1128,7 +1129,7 @@ foreach (sort @experimental)
|
||||
|
||||
my $IsMK1MF=scalar grep /^$target$/,@MK1MF_Builds;
|
||||
|
||||
-$exe_ext=".exe" if ($target eq "Cygwin" || $target eq "DJGPP" || $target =~ /^mingw/);
|
||||
+$exe_ext=".exe" if ($target =~ /^Cygwin/ || $target eq "DJGPP" || $target =~ /^mingw/);
|
||||
$exe_ext=".nlm" if ($target =~ /netware/);
|
||||
$exe_ext=".pm" if ($target =~ /vos/);
|
||||
$openssldir="/usr/local/ssl" if ($openssldir eq "" and $prefix eq "");
|
||||
--- openssl-1.0.1e/Makefile.org 2013-02-11 09:26:04.000000000 -0600
|
||||
+++ openssl-1.0.1e/Makefile.org 2013-02-17 16:38:08.000000000 -0600
|
||||
@@ -326,9 +326,9 @@ clean-shared:
|
||||
done; \
|
||||
fi; \
|
||||
( set -x; rm -f lib$$i$(SHLIB_EXT) ); \
|
||||
- if [ "$(PLATFORM)" = "Cygwin" ]; then \
|
||||
+ case "$(PLATFORM)" in Cygwin*) \
|
||||
( set -x; rm -f cyg$$i$(SHLIB_EXT) lib$$i$(SHLIB_EXT).a ); \
|
||||
- fi; \
|
||||
+ esac; \
|
||||
done
|
||||
|
||||
link-shared:
|
||||
@@ -571,11 +571,7 @@ install_sw:
|
||||
do \
|
||||
if [ -f "$$i" -o -f "$$i.a" ]; then \
|
||||
( echo installing $$i; \
|
||||
- if [ "$(PLATFORM)" != "Cygwin" ]; then \
|
||||
- cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
|
||||
- chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
|
||||
- mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
|
||||
- else \
|
||||
+ case "$(PLATFORM)" in Cygwin*) \
|
||||
c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
|
||||
cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
|
||||
chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
|
||||
@@ -583,7 +579,12 @@ install_sw:
|
||||
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
|
||||
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
|
||||
- fi ); \
|
||||
+ ;; \
|
||||
+ *) \
|
||||
+ cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
|
||||
+ chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
|
||||
+ mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
|
||||
+ esac ); \
|
||||
if expr $(PLATFORM) : 'mingw' > /dev/null; then \
|
||||
( case $$i in \
|
||||
*crypto*) i=libeay32.dll;; \
|
||||
@@ -643,9 +644,9 @@ install_docs:
|
||||
@pod2man="`cd ./util; ./pod2mantest $(PERL)`"; \
|
||||
here="`pwd`"; \
|
||||
filecase=; \
|
||||
- if [ "$(PLATFORM)" = "DJGPP" -o "$(PLATFORM)" = "Cygwin" -o "$(PLATFORM)" = "mingw" ]; then \
|
||||
+ case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*) \
|
||||
filecase=-i; \
|
||||
- fi; \
|
||||
+ esac; \
|
||||
set -e; for i in doc/apps/*.pod; do \
|
||||
fn=`basename $$i .pod`; \
|
||||
sec=`$(PERL) util/extract-section.pl 1 < $$i`; \
|
||||
--- openssl-1.0.1e/engines/ccgost/Makefile 2013-02-11 09:26:04.000000000 -0600
|
||||
+++ openssl-1.0.1e/engines/ccgost/Makefile 2013-02-17 17:05:47.759290200 -0600
|
||||
@@ -45,7 +45,11 @@ install:
|
||||
set -e; \
|
||||
echo installing $(LIBNAME); \
|
||||
pfx=lib; \
|
||||
- if [ "$(PLATFORM)" != "Cygwin" ]; then \
|
||||
+ case "$(PLATFORM)" in Cygwin*) \
|
||||
+ sfx=".so"; \
|
||||
+ cp cyg$(LIBNAME).dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \
|
||||
+ ;; \
|
||||
+ *) \
|
||||
case "$(CFLAGS)" in \
|
||||
*DSO_BEOS*) sfx=".so";; \
|
||||
*DSO_DLFCN*) sfx=`expr "$(SHLIB_EXT)" : '.*\(\.[a-z][a-z]*\)' \| ".so"`;; \
|
||||
@@ -54,10 +58,7 @@ install:
|
||||
*) sfx=".bad";; \
|
||||
esac; \
|
||||
cp $${pfx}$(LIBNAME)$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \
|
||||
- else \
|
||||
- sfx=".so"; \
|
||||
- cp cyg$(LIBNAME).dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \
|
||||
- fi; \
|
||||
+ esac; \
|
||||
chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \
|
||||
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx; \
|
||||
fi
|
||||
--- openssl-1.0.1i/engines/Makefile 2014-10-23 16:08:19.360200000 +0200
|
||||
+++ openssl-1.0.1i/engines/Makefile 2014-10-23 16:10:54.205800000 +0200
|
||||
@@ -111,7 +111,11 @@
|
||||
for l in $(LIBNAMES); do \
|
||||
( echo installing $$l; \
|
||||
pfx=lib; \
|
||||
- if [ "$(PLATFORM)" != "Cygwin" ]; then \
|
||||
+ case "$(PLATFORM)" in Cygwin*) \
|
||||
+ sfx=".so"; \
|
||||
+ cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
|
||||
+ ;; \
|
||||
+ *) \
|
||||
case "$(CFLAGS)" in \
|
||||
*DSO_BEOS*) sfx=".so";; \
|
||||
*DSO_DLFCN*) sfx=`expr "$(SHLIB_EXT)" : '.*\(\.[a-z][a-z]*\)' \| ".so"`;; \
|
||||
@@ -120,10 +124,7 @@
|
||||
*) sfx=".bad";; \
|
||||
esac; \
|
||||
cp $$pfx$$l$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
|
||||
- else \
|
||||
- sfx=".so"; \
|
||||
- cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
|
||||
- fi; \
|
||||
+ esac; \
|
||||
chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
|
||||
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx ); \
|
||||
done; \
|
@ -24,7 +24,6 @@ let
|
||||
++ [ ./nix-ssl-cert-file.patch ]
|
||||
++ optional (versionOlder version "1.1.0")
|
||||
(if stdenv.isDarwin then ./use-etc-ssl-certs-darwin.patch else ./use-etc-ssl-certs.patch)
|
||||
++ optional stdenv.isCygwin ./1.0.1-cygwin64.patch
|
||||
++ optional (versionOlder version "1.0.2" && hostPlatform.isDarwin)
|
||||
./darwin-arch.patch;
|
||||
|
||||
|
@ -3,11 +3,11 @@
|
||||
assert interactive -> readline != null && ncurses != null;
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "sqlite-3.17.0";
|
||||
name = "sqlite-3.19.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://sqlite.org/2017/sqlite-autoconf-3170000.tar.gz";
|
||||
sha256 = "0k472gq0p706jq4529p60znvw02hdf172qxgbdv59q0n7anqbr54";
|
||||
url = "http://sqlite.org/2017/sqlite-autoconf-3190300.tar.gz";
|
||||
sha256 = "00b3l2qglpl1inx21fckiwxnfq5xf6441flc79rqg7zdvh1rq4h6";
|
||||
};
|
||||
|
||||
outputs = [ "bin" "dev" "out" ];
|
||||
|
@ -4,10 +4,9 @@
|
||||
, static ? false
|
||||
}:
|
||||
|
||||
let version = "1.2.11"; in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "zlib-${version}";
|
||||
version = "1.2.11";
|
||||
|
||||
src = fetchurl {
|
||||
urls =
|
||||
@ -17,7 +16,9 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1";
|
||||
};
|
||||
|
||||
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
patches = stdenv.lib.optional hostPlatform.isCygwin ./disable-cygwin-widechar.patch;
|
||||
|
||||
postPatch = stdenv.lib.optionalString hostPlatform.isDarwin ''
|
||||
substituteInPlace configure \
|
||||
--replace '/usr/bin/libtool' 'ar' \
|
||||
--replace 'AR="libtool"' 'AR="ar"' \
|
||||
@ -28,14 +29,6 @@ stdenv.mkDerivation rec {
|
||||
setOutputFlags = false;
|
||||
outputDoc = "dev"; # single tiny man3 page
|
||||
|
||||
# TODO(@Dridus) CC set by cc-wrapper setup-hook, so just empty out the preConfigure script when cross building, but leave the old incorrect script when not
|
||||
# cross building to avoid hash breakage. Once hash breakage is acceptable, remove preConfigure entirely.
|
||||
preConfigure = stdenv.lib.optionalString (hostPlatform == buildPlatform) ''
|
||||
if test -n "$crossConfig"; then
|
||||
export CC=$crossConfig-gcc
|
||||
fi
|
||||
'';
|
||||
|
||||
# FIXME needs gcc 4.9 in bootstrap tools
|
||||
hardeningDisable = [ "stackprotector" ];
|
||||
|
||||
@ -47,37 +40,42 @@ stdenv.mkDerivation rec {
|
||||
# jww (2015-01-06): Sometimes this library install as a .so, even on
|
||||
# Darwin; others time it installs as a .dylib. I haven't yet figured out
|
||||
# what causes this difference.
|
||||
+ stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
+ stdenv.lib.optionalString hostPlatform.isDarwin ''
|
||||
for file in $out/lib/*.so* $out/lib/*.dylib* ; do
|
||||
install_name_tool -id "$file" $file
|
||||
done
|
||||
''
|
||||
# Non-typical naming confuses libtool which then refuses to use zlib's DLL
|
||||
# in some cases, e.g. when compiling libpng.
|
||||
+ stdenv.lib.optionalString (hostPlatform.libc == "msvcrt") ''
|
||||
ln -s zlib1.dll $out/bin/libz.dll
|
||||
'';
|
||||
|
||||
# As zlib takes part in the stdenv building, we don't want references
|
||||
# to the bootstrap-tools libgcc (as uses to happen on arm/mips)
|
||||
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (!stdenv.isDarwin) "-static-libgcc";
|
||||
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (!hostPlatform.isDarwin) "-static-libgcc";
|
||||
|
||||
crossAttrs = {
|
||||
dontStrip = static;
|
||||
configurePlatforms = [];
|
||||
} // stdenv.lib.optionalAttrs (hostPlatform.libc == "msvcrt") {
|
||||
installFlags = [
|
||||
"BINARY_PATH=$(out)/bin"
|
||||
"INCLUDE_PATH=$(dev)/include"
|
||||
"LIBRARY_PATH=$(out)/lib"
|
||||
];
|
||||
makeFlags = [
|
||||
"-f" "win32/Makefile.gcc"
|
||||
"PREFIX=${stdenv.cc.prefix}"
|
||||
] ++ stdenv.lib.optional (!static) "SHARED_MODE=1";
|
||||
dontStrip = hostPlatform != buildPlatform && static;
|
||||
configurePlatforms = [];
|
||||
|
||||
# Non-typical naming confuses libtool which then refuses to use zlib's DLL
|
||||
# in some cases, e.g. when compiling libpng.
|
||||
postInstall = postInstall + "ln -s zlib1.dll $out/bin/libz.dll";
|
||||
installFlags = stdenv.lib.optionals (hostPlatform.libc == "msvcrt") [
|
||||
"BINARY_PATH=$(out)/bin"
|
||||
"INCLUDE_PATH=$(dev)/include"
|
||||
"LIBRARY_PATH=$(out)/lib"
|
||||
];
|
||||
|
||||
makeFlags = [
|
||||
"PREFIX=${stdenv.cc.prefix}"
|
||||
] ++ stdenv.lib.optionals (hostPlatform.libc == "msvcrt") [
|
||||
"-f" "win32/Makefile.gcc"
|
||||
] ++ stdenv.lib.optionals (!static) [
|
||||
"SHARED_MODE=1"
|
||||
];
|
||||
|
||||
passthru = {
|
||||
inherit version;
|
||||
};
|
||||
|
||||
passthru.version = version;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Lossless data-compression library";
|
||||
license = licenses.zlib;
|
||||
|
@ -0,0 +1,13 @@
|
||||
diff --git a/gzguts.h b/gzguts.h
|
||||
index 990a4d2..6378d46 100644
|
||||
--- a/gzguts.h
|
||||
+++ b/gzguts.h
|
||||
@@ -39,7 +39,7 @@
|
||||
# include <io.h>
|
||||
#endif
|
||||
|
||||
-#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
+#if defined(_WIN32)
|
||||
# define WIDECHAR
|
||||
#endif
|
||||
|
@ -8,10 +8,13 @@ let
|
||||
version = "2.28";
|
||||
basename = "binutils-${version}";
|
||||
inherit (stdenv.lib) optional optionals optionalString;
|
||||
# The prefix prepended to binary names to allow multiple binuntils on the
|
||||
# PATH to both be usable.
|
||||
prefix = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-" + basename;
|
||||
name = prefix + basename;
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/binutils/${basename}.tar.bz2";
|
||||
@ -78,15 +81,20 @@ stdenv.mkDerivation rec {
|
||||
then "-Wno-string-plus-int -Wno-deprecated-declarations"
|
||||
else "-static-libgcc";
|
||||
|
||||
# TODO(@Ericson2314): Always pass "--target" and always prefix.
|
||||
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
configureFlags =
|
||||
[ "--enable-shared" "--enable-deterministic-archives" "--disable-werror" ]
|
||||
++ optional (stdenv.system == "mips64el-linux") "--enable-fix-loongson2f-nop"
|
||||
++ optional (targetPlatform != hostPlatform) "--target=${targetPlatform.config}" # TODO: make this unconditional
|
||||
++ optionals gold [ "--enable-gold" "--enable-plugins" ]
|
||||
++ optional (stdenv.system == "i686-linux") "--enable-targets=x86_64-linux-gnu";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
passthru = {
|
||||
inherit prefix;
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Tools for manipulating binaries (linker, assembler, etc.)";
|
||||
longDescription = ''
|
||||
|
@ -48,6 +48,9 @@ stdenv.mkDerivation rec {
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-Wno-format-nonliteral";
|
||||
|
||||
# TODO(@Ericson2314): Always pass "--target" and always prefix.
|
||||
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
|
||||
configureFlags = with stdenv.lib; [
|
||||
"--with-gmp=${gmp.dev}" "--with-mpfr=${mpfr.dev}" "--with-system-readline"
|
||||
"--with-system-zlib" "--with-expat" "--with-libexpat-prefix=${expat.dev}"
|
||||
@ -55,8 +58,6 @@ stdenv.mkDerivation rec {
|
||||
# TODO(@Ericson2314): make this conditional on whether host platform is NixOS
|
||||
"--with-separate-debug-dir=/run/current-system/sw/lib/debug"
|
||||
++ stdenv.lib.optional (!pythonSupport) "--without-python"
|
||||
# TODO(@Ericson2314): This should be done in stdenv, not per-package
|
||||
++ stdenv.lib.optional (targetPlatform != hostPlatform) "--target=${targetPlatform.config}"
|
||||
++ stdenv.lib.optional multitarget "--enable-targets=all";
|
||||
|
||||
postInstall =
|
||||
|
@ -16,8 +16,8 @@ that we're trying to help2man).
|
||||
|
||||
install_preload: install_dirs preload
|
||||
- $(INSTALL_PROGRAM) $(preload).so $(DESTDIR)$(pkglibdir)
|
||||
+ $(INSTALL_PROGRAM) lib/cygintl-8.dll $(DESTDIR)$(pkglibdir)
|
||||
+ ln -sf cygintl-8.dll $(DESTDIR)$(pkglibdir)/$(preload).so
|
||||
+ $(INSTALL_PROGRAM) lib/cygintl-9.dll $(DESTDIR)$(pkglibdir)
|
||||
+ ln -sf cygintl-9.dll $(DESTDIR)$(pkglibdir)/$(preload).so
|
||||
|
||||
install_l10n: install_dirs msg_l10n man_l10n info_l10n
|
||||
set -e; \
|
||||
@ -27,8 +27,8 @@ that we're trying to help2man).
|
||||
$(preload).so: $(srcdir)/$(preload).c
|
||||
- $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ -fPIC -shared $? $(LIBS)
|
||||
+ mkdir -p lib
|
||||
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o lib/cygintl-8.dll -shared $? $(LIBS)
|
||||
+ ln -sf lib/cygintl-8.dll $@
|
||||
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o lib/cygintl-9.dll -shared $? $(LIBS)
|
||||
+ ln -sf lib/cygintl-9.dll $@
|
||||
|
||||
man: $(target).1
|
||||
$(target).1: $(srcdir)/$(target).PL $(srcdir)/$(target).h2m.PL
|
||||
@ -62,7 +62,7 @@ that we're trying to help2man).
|
||||
return;
|
||||
|
||||
+#ifdef __CYGWIN__
|
||||
+ if (!(RTLD_NEXT = dlopen("/usr/bin/cygintl-8.dll", RTLD_LAZY)))
|
||||
+ if (!(RTLD_NEXT = dlopen("/usr/bin/cygintl-9.dll", RTLD_LAZY)))
|
||||
+ die("libintl8 not found");
|
||||
+#endif
|
||||
+
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, perl, gettext, LocaleGettext, makeWrapper }:
|
||||
{ stdenv, hostPlatform, fetchurl, perl, gettext, LocaleGettext, makeWrapper }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "help2man-1.47.4";
|
||||
@ -12,11 +12,12 @@ stdenv.mkDerivation rec {
|
||||
|
||||
doCheck = false; # target `check' is missing
|
||||
|
||||
patches = if stdenv.isCygwin then [ ./1.40.4-cygwin-nls.patch ] else null;
|
||||
patches = if hostPlatform.isCygwin then [ ./1.40.4-cygwin-nls.patch ] else null;
|
||||
|
||||
postInstall =
|
||||
'' wrapProgram "$out/bin/help2man" \
|
||||
--prefix PERL5LIB : "$(echo ${LocaleGettext}/lib/perl*/site_perl)"
|
||||
--prefix PERL5LIB : "$(echo ${LocaleGettext}/lib/perl*/site_perl)" \
|
||||
${stdenv.lib.optionalString hostPlatform.isCygwin "--prefix PATH : ${gettext}/bin"}
|
||||
'';
|
||||
|
||||
|
||||
|
@ -309,3 +309,16 @@
|
||||
# else
|
||||
|
||||
/* On old systems which lack it, use setlocale or getenv. */
|
||||
diff --git a/glib/gtypes.h b/glib/gtypes.h
|
||||
index c18e0bf..816685a 100644
|
||||
--- a/glib/glib/gtypes.h
|
||||
+++ b/glib/glib/gtypes.h
|
||||
@@ -462,7 +462,7 @@ G_END_DECLS
|
||||
* properly get exported in Windows DLLs.
|
||||
*/
|
||||
#ifndef GLIB_VAR
|
||||
-# ifdef G_PLATFORM_WIN32
|
||||
+# ifdef G_OS_WIN32
|
||||
# ifdef GLIB_STATIC_COMPILATION
|
||||
# define GLIB_VAR extern
|
||||
# else /* !GLIB_STATIC_COMPILATION */
|
||||
|
@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
|
||||
configureFlags = [ "--with-internal-glib" ]
|
||||
++ optional (stdenv.isSunOS) [ "--with-libiconv=gnu" "--with-system-library-path" "--with-system-include-path" "CFLAGS=-DENABLE_NLS" ];
|
||||
|
||||
postInstall = ''rm "$out"/bin/*-pkg-config''; # clean the duplicate file
|
||||
postInstall = ''rm -f "$out"/bin/*-pkg-config''; # clean the duplicate file
|
||||
|
||||
meta = {
|
||||
description = "A tool that allows packages to find out information about other packages";
|
||||
|
@ -2,11 +2,12 @@
|
||||
, hostPlatform, targetPlatform
|
||||
}:
|
||||
|
||||
let
|
||||
prefix = stdenv.lib.optionalString
|
||||
(targetPlatform != hostPlatform)
|
||||
"${targetPlatform.config}-";
|
||||
# Make sure both underlying packages claim to have prepended their binaries
|
||||
# with the same prefix.
|
||||
assert binutils-raw.prefix == cctools.prefix;
|
||||
|
||||
let
|
||||
inherit (binutils-raw) prefix;
|
||||
cmds = [
|
||||
"ar" "ranlib" "as" "dsymutil" "install_name_tool"
|
||||
"ld" "strip" "otool" "lipo" "nm" "strings" "size"
|
||||
@ -50,4 +51,8 @@ stdenv.mkDerivation {
|
||||
|
||||
ln -s ${cctools}/libexec $out/libexec
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
inherit prefix;
|
||||
};
|
||||
}
|
||||
|
@ -1,10 +1,12 @@
|
||||
{ stdenv, fetchFromGitHub, makeWrapper, autoconf, automake, libtool_2
|
||||
, llvm, libcxx, libcxxabi, clang, libuuid
|
||||
, libobjc ? null, maloader ? null, xctoolchain ? null
|
||||
, buildPlatform, hostPlatform, targetPlatform
|
||||
, hostPlatform, targetPlatform
|
||||
}:
|
||||
|
||||
let
|
||||
# The prefix prepended to binary names to allow multiple binuntils on the
|
||||
# PATH to both be usable.
|
||||
prefix = stdenv.lib.optionalString
|
||||
(targetPlatform != hostPlatform)
|
||||
"${targetPlatform.config}-";
|
||||
@ -38,13 +40,10 @@ let
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
# TODO(@Ericson2314): Always pass "--target" and always prefix.
|
||||
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
configureFlags = stdenv.lib.optionals (!stdenv.isDarwin) [
|
||||
"CXXFLAGS=-I${libcxx}/include/c++/v1"
|
||||
] ++ stdenv.lib.optionals (targetPlatform != buildPlatform) [
|
||||
# TODO make unconditional next hash break
|
||||
"--build=${buildPlatform.config}"
|
||||
"--host=${hostPlatform.config}"
|
||||
"--target=${targetPlatform.config}"
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
@ -104,6 +103,10 @@ let
|
||||
done
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
inherit prefix;
|
||||
};
|
||||
|
||||
meta = {
|
||||
homepage = "http://www.opensource.apple.com/source/cctools/";
|
||||
description = "Mac OS X Compiler Tools (cross-platform port)";
|
||||
|
@ -1,14 +1,14 @@
|
||||
{ stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "alsa-lib-1.1.2";
|
||||
name = "alsa-lib-1.1.4.1";
|
||||
|
||||
src = fetchurl {
|
||||
urls = [
|
||||
"ftp://ftp.alsa-project.org/pub/lib/${name}.tar.bz2"
|
||||
"http://alsa.cybermirror.org/lib/${name}.tar.bz2"
|
||||
];
|
||||
sha256 = "1mk1v2av6ibyydgr6f2mxrwy7clgnf0c68s9y2zvh1ibi7csr3fk";
|
||||
sha256 = "0xjvi381105gldhv0z872a0x58sghznyx19j45lw5iyi2h68gfwi";
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
@ -1,14 +1,14 @@
|
||||
{ stdenv, fetchurl, lib, pkgconfig, alsaLib, libogg, libpulseaudio ? null, libjack2 ? null }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "alsa-plugins-1.1.1";
|
||||
name = "alsa-plugins-1.1.4";
|
||||
|
||||
src = fetchurl {
|
||||
urls = [
|
||||
"ftp://ftp.alsa-project.org/pub/plugins/${name}.tar.bz2"
|
||||
"http://alsa.cybermirror.org/plugins/${name}.tar.bz2"
|
||||
];
|
||||
sha256 = "1w81z5jlwqhd1l2m7qrq69lc4k9dnrg1wn52jsl2hrf3hbhd394f";
|
||||
sha256 = "12hsvm6rpinjkg06pa9hzndkdrbfw6wk6yk00cm8y1gbv8xiq3ak";
|
||||
};
|
||||
|
||||
# ToDo: a52, etc.?
|
||||
|
@ -4,14 +4,14 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "alsa-tools-${version}";
|
||||
version = "1.1.0";
|
||||
version = "1.1.3";
|
||||
|
||||
src = fetchurl {
|
||||
urls = [
|
||||
"ftp://ftp.alsa-project.org/pub/tools/${name}.tar.bz2"
|
||||
"http://alsa.cybermirror.org/tools/${name}.tar.bz2"
|
||||
];
|
||||
sha256 = "0ldbaz3qr7z0639xg37ba7cmrb512rrjavap6r5jjl0ab665ad3x";
|
||||
sha256 = "02b75fyfmm9m2iz59d3xa97cas4f697a4pzdxn1i64kjd36iv3yq";
|
||||
};
|
||||
|
||||
buildInputs = [ alsaLib pkgconfig gtk2 gtk3 fltk13 ];
|
||||
|
@ -2,14 +2,14 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "alsa-utils-${version}";
|
||||
version = "1.1.2";
|
||||
version = "1.1.4";
|
||||
|
||||
src = fetchurl {
|
||||
urls = [
|
||||
"ftp://ftp.alsa-project.org/pub/utils/${name}.tar.bz2"
|
||||
"http://alsa.cybermirror.org/utils/${name}.tar.bz2"
|
||||
];
|
||||
sha256 = "0wcha78c2sm8qqk5r3w83cvm8fp6fb1zpd35kmcm24kxhz007xks";
|
||||
sha256 = "17cxih9ibjp1193dyd79j50pyfa9dvrs6r9kpwrvzicjvr2110x7";
|
||||
};
|
||||
|
||||
patchPhase = ''
|
||||
|
@ -63,7 +63,7 @@ stdenv.mkDerivation rec {
|
||||
CONFIG_DEFAULT_SETFONT_DIR "/etc/kbd"
|
||||
|
||||
${extraConfig}
|
||||
$extraCrossConfig
|
||||
CONFIG_CROSS_COMPILER_PREFIX "${stdenv.cc.prefix}"
|
||||
EOF
|
||||
|
||||
make oldconfig
|
||||
@ -79,10 +79,6 @@ stdenv.mkDerivation rec {
|
||||
|
||||
buildInputs = lib.optionals (enableStatic && !useMusl) [ stdenv.cc.libc stdenv.cc.libc.static ];
|
||||
|
||||
extraCrossConfig = if hostPlatform == buildPlatform then null else ''
|
||||
CONFIG_CROSS_COMPILER_PREFIX "${stdenv.cc.prefix}"
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
@ -23,6 +23,6 @@ stdenv.mkDerivation rec {
|
||||
description = "Utilities that give information about processes using the /proc filesystem";
|
||||
priority = 10; # less than coreutils, which also provides "kill" and "uptime"
|
||||
license = lib.licenses.gpl2;
|
||||
platforms = lib.platforms.linux;
|
||||
platforms = lib.platforms.linux ++ lib.platforms.cygwin;
|
||||
};
|
||||
}
|
||||
|
@ -4,8 +4,8 @@
|
||||
let
|
||||
version = lib.concatStringsSep "." ([ majorVersion ]
|
||||
++ lib.optional (patchVersion != "") patchVersion);
|
||||
majorVersion = "2.29";
|
||||
patchVersion = "2";
|
||||
majorVersion = "2.30";
|
||||
patchVersion = "";
|
||||
|
||||
fstrimPatch = fetchpatch {
|
||||
url = "https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/patch/?id=155d48f590a50bb5dc265162ff2f9a971daed543";
|
||||
@ -16,7 +16,7 @@ in stdenv.mkDerivation rec {
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://kernel/linux/utils/util-linux/v${majorVersion}/${name}.tar.xz";
|
||||
sha256 = "1qz81w8vzrmy8xn9yx7ls4amkbgwx6vr62pl6kv9g7r0g3ba9kmc";
|
||||
sha256 = "13d0ax8bcapga8phj2nclx86w57ddqxbr98ajibpzjq6d7zs8262";
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
|
||||
homepage = http://www.nico.schottelius.org/software/gpm/;
|
||||
description = "A daemon that provides mouse support on the Linux console";
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.linux;
|
||||
platforms = platforms.linux ++ platforms.cygwin;
|
||||
maintainers = with maintainers; [ eelco wkennington ];
|
||||
};
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ coreutils, fetchurl, db, openssl, pcre, perl, pkgconfig, stdenv }:
|
||||
{ coreutils, fetchurl, db, openssl, pcre, perl, pkgconfig, stdenv, fetchpatch }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "exim-4.89";
|
||||
@ -8,6 +8,14 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "09lndv34jsxwglq5zsh9y4xaqj5g37g9ca4x0zb25fvvm4f0lj8c";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "CVE-2017-1000369.patch";
|
||||
url = "https://anonscm.debian.org/git/pkg-exim4/exim4.git/plain/debian/patches/79_CVE-2017-1000369.patch?h=4.89-2%2bdeb9u1";
|
||||
sha256 = "0v46zywgkv1rdqhybqqrd0rwkdaj6q1f4x0a3vm9p0wz8vad3023";
|
||||
})
|
||||
];
|
||||
|
||||
buildInputs = [ coreutils db openssl pcre perl pkgconfig ];
|
||||
|
||||
preBuild = ''
|
||||
|
@ -23,7 +23,7 @@ let
|
||||
in
|
||||
import ./bash-4.4-patches.nix patch;
|
||||
|
||||
inherit (stdenv.lib) optional optionals;
|
||||
inherit (stdenv.lib) optional optionals optionalString;
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@ -52,8 +52,9 @@ stdenv.mkDerivation rec {
|
||||
|
||||
patchFlags = "-p0";
|
||||
|
||||
patches = upstreamPatches
|
||||
++ optional hostPlatform.isCygwin ./cygwin-bash-4.3.33-1.src.patch;
|
||||
patches = upstreamPatches;
|
||||
|
||||
postPatch = optionalString hostPlatform.isCygwin "patch -p2 < ${./cygwin-bash-4.4.11-2.src.patch}";
|
||||
|
||||
configureFlags = [
|
||||
(if interactive then "--with-installed-readline" else "--disable-readline")
|
||||
@ -79,6 +80,11 @@ stdenv.mkDerivation rec {
|
||||
# build `version.h'.
|
||||
enableParallelBuilding = false;
|
||||
|
||||
makeFlags = optional hostPlatform.isCygwin [
|
||||
"LOCAL_LDFLAGS=-Wl,--export-all,--out-implib,libbash.dll.a"
|
||||
"SHOBJ_LIBS=-lbash"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
ln -s bash "$out/bin/sh"
|
||||
rm $out/lib/bash/Makefile.inc
|
||||
|
File diff suppressed because it is too large
Load Diff
607
pkgs/shells/bash/cygwin-bash-4.4.11-2.src.patch
Normal file
607
pkgs/shells/bash/cygwin-bash-4.4.11-2.src.patch
Normal file
@ -0,0 +1,607 @@
|
||||
--- origsrc/bash-4.4/bashline.c 2017-01-23 13:28:06.955247200 -0600
|
||||
+++ src/bash-4.4/bashline.c 2017-01-23 13:55:07.992877600 -0600
|
||||
@@ -76,6 +76,16 @@
|
||||
# include "pcomplete.h"
|
||||
#endif
|
||||
|
||||
+#if __CYGWIN__
|
||||
+# ifdef __x86_64__
|
||||
+# define IMP(x) __imp_##x
|
||||
+# else
|
||||
+# define IMP(x) _imp__##x
|
||||
+# endif
|
||||
+#else
|
||||
+# define IMP(x) x
|
||||
+#endif
|
||||
+
|
||||
/* These should agree with the defines for emacs_mode and vi_mode in
|
||||
rldefs.h, even though that's not a public readline header file. */
|
||||
#ifndef EMACS_EDITING_MODE
|
||||
@@ -271,6 +281,11 @@ int no_empty_command_completion;
|
||||
are the only possible matches, even if FIGNORE says to. */
|
||||
int force_fignore = 1;
|
||||
|
||||
+#if __CYGWIN__
|
||||
+/* If set, shorten "foo.exe" to "foo" when they are the same file. */
|
||||
+int completion_strip_exe;
|
||||
+#endif /* __CYGWIN__ */
|
||||
+
|
||||
/* Perform spelling correction on directory names during word completion */
|
||||
int dircomplete_spelling = 0;
|
||||
|
||||
@@ -498,11 +513,12 @@ initialize_readline ()
|
||||
kseq[0] = CTRL('J');
|
||||
kseq[1] = '\0';
|
||||
func = rl_function_of_keyseq (kseq, emacs_meta_keymap, (int *)NULL);
|
||||
- if (func == rl_vi_editing_mode)
|
||||
+ extern rl_command_func_t *IMP(rl_vi_editing_mode);
|
||||
+ if (func == rl_vi_editing_mode || func == IMP(rl_vi_editing_mode))
|
||||
rl_unbind_key_in_map (CTRL('J'), emacs_meta_keymap);
|
||||
kseq[0] = CTRL('M');
|
||||
func = rl_function_of_keyseq (kseq, emacs_meta_keymap, (int *)NULL);
|
||||
- if (func == rl_vi_editing_mode)
|
||||
+ if (func == rl_vi_editing_mode || func == IMP(rl_vi_editing_mode))
|
||||
rl_unbind_key_in_map (CTRL('M'), emacs_meta_keymap);
|
||||
#if defined (VI_MODE)
|
||||
rl_unbind_key_in_map (CTRL('E'), vi_movement_keymap);
|
||||
@@ -521,7 +537,8 @@ initialize_readline ()
|
||||
kseq[0] = '~';
|
||||
kseq[1] = '\0';
|
||||
func = rl_function_of_keyseq (kseq, emacs_meta_keymap, (int *)NULL);
|
||||
- if (func == 0 || func == rl_tilde_expand)
|
||||
+ extern rl_command_func_t *IMP(rl_tilde_expand);
|
||||
+ if (func == 0 || func == rl_tilde_expand || func == IMP(rl_tilde_expand))
|
||||
rl_bind_keyseq_in_map (kseq, bash_complete_username, emacs_meta_keymap);
|
||||
|
||||
rl_bind_key_if_unbound_in_map ('~', bash_possible_username_completions, emacs_ctlx_keymap);
|
||||
@@ -544,7 +561,8 @@ initialize_readline ()
|
||||
kseq[0] = TAB;
|
||||
kseq[1] = '\0';
|
||||
func = rl_function_of_keyseq (kseq, emacs_meta_keymap, (int *)NULL);
|
||||
- if (func == 0 || func == rl_tab_insert)
|
||||
+ extern rl_command_func_t *IMP(rl_tab_insert);
|
||||
+ if (func == 0 || func == rl_tab_insert || func == IMP(rl_tab_insert))
|
||||
rl_bind_key_in_map (TAB, dynamic_complete_history, emacs_meta_keymap);
|
||||
|
||||
/* Tell the completer that we want a crack first. */
|
||||
@@ -2194,6 +2212,21 @@ globword:
|
||||
|
||||
if (match && executable_completion ((searching_path ? val : cval), searching_path))
|
||||
{
|
||||
+#if __CYGWIN__
|
||||
+ if (completion_strip_exe)
|
||||
+ {
|
||||
+ size_t val_len = strlen (val);
|
||||
+ char *candidate;
|
||||
+ if (val_len > 4 && !strcasecmp (&val[val_len - 4], ".exe")
|
||||
+ && (candidate = strdup (val)))
|
||||
+ {
|
||||
+ candidate[val_len - 4] = '\0';
|
||||
+ if (same_file (val, candidate, NULL, NULL))
|
||||
+ temp[strlen (temp) - 4] = '\0';
|
||||
+ free (candidate);
|
||||
+ }
|
||||
+ }
|
||||
+#endif
|
||||
if (cval != val)
|
||||
free (cval);
|
||||
free (val);
|
||||
@@ -2929,6 +2962,17 @@ test_for_directory (name)
|
||||
int r;
|
||||
|
||||
fn = bash_tilde_expand (name, 0);
|
||||
+#if __CYGWIN
|
||||
+ /* stat("//server") can only be successful as a directory, but can take
|
||||
+ seconds to time out on failure. It is much faster to assume that
|
||||
+ "//server" is a valid name than it is to wait for a stat, even if it
|
||||
+ gives false positives on bad names. */
|
||||
+ if (fn[0] == '/' && fn[1] == '/' && ! strchr (&fn[2], '/'))
|
||||
+ {
|
||||
+ free (fn);
|
||||
+ return 1;
|
||||
+ }
|
||||
+#endif
|
||||
r = file_isdir (fn);
|
||||
free (fn);
|
||||
|
||||
--- origsrc/bash-4.4/builtins/read.def 2017-01-23 13:28:07.017686500 -0600
|
||||
+++ src/bash-4.4/builtins/read.def 2017-01-23 13:55:07.992877600 -0600
|
||||
@@ -85,7 +85,6 @@ $END
|
||||
|
||||
#ifdef __CYGWIN__
|
||||
# include <fcntl.h>
|
||||
-# include <io.h>
|
||||
#endif
|
||||
|
||||
#include "../bashintl.h"
|
||||
@@ -530,10 +529,6 @@ read_builtin (list)
|
||||
fflush (stderr);
|
||||
}
|
||||
|
||||
-#if defined (__CYGWIN__) && defined (O_TEXT)
|
||||
- setmode (0, O_TEXT);
|
||||
-#endif
|
||||
-
|
||||
ps2 = 0;
|
||||
for (print_ps2 = eof = retval = 0;;)
|
||||
{
|
||||
@@ -664,6 +659,14 @@ read_builtin (list)
|
||||
if (c == '\0' && delim != '\0')
|
||||
continue; /* skip NUL bytes in input */
|
||||
|
||||
+#ifdef __CYGWIN__
|
||||
+ {
|
||||
+ extern igncr;
|
||||
+ if (igncr && c == '\r' && delim != '\r')
|
||||
+ continue; /* skip carriage return */
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
if ((skip_ctlesc == 0 && c == CTLESC) || (skip_ctlnul == 0 && c == CTLNUL))
|
||||
{
|
||||
saw_escape++;
|
||||
--- origsrc/bash-4.4/builtins/set.def 2016-06-02 19:10:10.000000000 -0500
|
||||
+++ src/bash-4.4/builtins/set.def 2017-01-23 13:55:07.992877600 -0600
|
||||
@@ -56,6 +56,13 @@ extern int dont_save_function_defs;
|
||||
#if defined (READLINE)
|
||||
extern int no_line_editing;
|
||||
#endif /* READLINE */
|
||||
+#ifdef __CYGWIN__
|
||||
+extern int igncr;
|
||||
+static int set_minus_o_option_maybe (int, const char *, int);
|
||||
+# define INTERACTIVE_ONLY ,1
|
||||
+#else
|
||||
+# define INTERACTIVE_ONLY
|
||||
+#endif
|
||||
|
||||
$BUILTIN set
|
||||
$FUNCTION set_builtin
|
||||
@@ -92,6 +99,9 @@ Options:
|
||||
#if defined (HISTORY)
|
||||
history enable command history
|
||||
#endif
|
||||
+#ifdef __CYGWIN__
|
||||
+ igncr on Cygwin, ignore \r in line endings
|
||||
+#endif
|
||||
ignoreeof the shell will not exit upon reading EOF
|
||||
interactive-comments
|
||||
allow comments to appear in interactive commands
|
||||
@@ -192,29 +202,39 @@ const struct {
|
||||
int *variable;
|
||||
setopt_set_func_t *set_func;
|
||||
setopt_get_func_t *get_func;
|
||||
+#ifdef __CYGWIN__
|
||||
+ /* Cygwin users have taken to exporting SHELLOPTS for the cygwin-specific
|
||||
+ igncr. As a result, we want to ensure SHELLOPTS parsing does not turn
|
||||
+ on interactive options when exported from an interactive shell, but
|
||||
+ parse in a non-interactive setting, so as not to break POSIX /bin/sh */
|
||||
+ int interactive_only;
|
||||
+#endif
|
||||
} o_options[] = {
|
||||
{ "allexport", 'a', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
|
||||
#if defined (BRACE_EXPANSION)
|
||||
{ "braceexpand",'B', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
|
||||
#endif
|
||||
#if defined (READLINE)
|
||||
- { "emacs", '\0', (int *)NULL, set_edit_mode, get_edit_mode },
|
||||
+ { "emacs", '\0', (int *)NULL, set_edit_mode, get_edit_mode INTERACTIVE_ONLY },
|
||||
#endif
|
||||
{ "errexit", 'e', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
|
||||
{ "errtrace", 'E', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
|
||||
{ "functrace", 'T', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
|
||||
{ "hashall", 'h', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
|
||||
#if defined (BANG_HISTORY)
|
||||
- { "histexpand", 'H', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
|
||||
+ { "histexpand", 'H', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL INTERACTIVE_ONLY },
|
||||
#endif /* BANG_HISTORY */
|
||||
#if defined (HISTORY)
|
||||
- { "history", '\0', &enable_history_list, bash_set_history, (setopt_get_func_t *)NULL },
|
||||
+ { "history", '\0', &enable_history_list, bash_set_history, (setopt_get_func_t *)NULL INTERACTIVE_ONLY },
|
||||
+#endif
|
||||
+#ifdef __CYGWIN__
|
||||
+ { "igncr", '\0', &igncr, NULL, (setopt_get_func_t *)NULL },
|
||||
#endif
|
||||
{ "ignoreeof", '\0', &ignoreeof, set_ignoreeof, (setopt_get_func_t *)NULL },
|
||||
{ "interactive-comments", '\0', &interactive_comments, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
|
||||
{ "keyword", 'k', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
|
||||
#if defined (JOB_CONTROL)
|
||||
- { "monitor", 'm', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
|
||||
+ { "monitor", 'm', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL INTERACTIVE_ONLY },
|
||||
#endif
|
||||
{ "noclobber", 'C', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
|
||||
{ "noexec", 'n', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
|
||||
@@ -233,7 +253,7 @@ const struct {
|
||||
{ "privileged", 'p', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
|
||||
{ "verbose", 'v', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
|
||||
#if defined (READLINE)
|
||||
- { "vi", '\0', (int *)NULL, set_edit_mode, get_edit_mode },
|
||||
+ { "vi", '\0', (int *)NULL, set_edit_mode, get_edit_mode INTERACTIVE_ONLY },
|
||||
#endif
|
||||
{ "xtrace", 'x', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
|
||||
{(char *)NULL, 0 , (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
|
||||
@@ -455,6 +475,15 @@ int
|
||||
set_minus_o_option (on_or_off, option_name)
|
||||
int on_or_off;
|
||||
char *option_name;
|
||||
+#ifdef __CYGWIN__
|
||||
+{
|
||||
+ /* See Cygwin comments above. */
|
||||
+ return set_minus_o_option_maybe (on_or_off, option_name, 0);
|
||||
+}
|
||||
+static int
|
||||
+set_minus_o_option_maybe (int on_or_off, const char *option_name,
|
||||
+ int avoid_interactive)
|
||||
+#endif /* __CYGWIN__ */
|
||||
{
|
||||
register int i;
|
||||
|
||||
@@ -462,6 +491,10 @@ set_minus_o_option (on_or_off, option_na
|
||||
{
|
||||
if (STREQ (option_name, o_options[i].name))
|
||||
{
|
||||
+#ifdef __CYGWIN__
|
||||
+ if (o_options[i].interactive_only && avoid_interactive)
|
||||
+ return EXECUTION_SUCCESS;
|
||||
+#endif
|
||||
if (o_options[i].letter == 0)
|
||||
{
|
||||
previous_option_value = GET_BINARY_O_OPTION_VALUE (i, o_options[i].name);
|
||||
@@ -588,7 +621,11 @@ parse_shellopts (value)
|
||||
vptr = 0;
|
||||
while (vname = extract_colon_unit (value, &vptr))
|
||||
{
|
||||
+#ifdef __CYGWIN__
|
||||
+ set_minus_o_option_maybe (FLAG_ON, vname, !interactive_shell);
|
||||
+#else
|
||||
set_minus_o_option (FLAG_ON, vname);
|
||||
+#endif
|
||||
free (vname);
|
||||
}
|
||||
}
|
||||
--- origsrc/bash-4.4/builtins/shopt.def 2016-05-06 14:00:02.000000000 -0500
|
||||
+++ src/bash-4.4/builtins/shopt.def 2017-01-23 13:55:07.992877600 -0600
|
||||
@@ -92,6 +92,10 @@ extern int glob_asciirange;
|
||||
extern int lastpipe_opt;
|
||||
extern int inherit_errexit;
|
||||
|
||||
+#ifdef __CYGWIN__
|
||||
+extern int completion_strip_exe;
|
||||
+#endif
|
||||
+
|
||||
#if defined (EXTENDED_GLOB)
|
||||
extern int extended_glob;
|
||||
#endif
|
||||
@@ -169,6 +173,9 @@ static struct {
|
||||
{ "compat41", &shopt_compat41, set_compatibility_level },
|
||||
{ "compat42", &shopt_compat42, set_compatibility_level },
|
||||
{ "compat43", &shopt_compat43, set_compatibility_level },
|
||||
+#ifdef __CYGWIN__
|
||||
+ { "completion_strip_exe", &completion_strip_exe, NULL },
|
||||
+#endif
|
||||
#if defined (READLINE)
|
||||
{ "complete_fullquote", &complete_fullquote, (shopt_set_func_t *)NULL},
|
||||
{ "direxpand", &dircomplete_expand, shopt_set_complete_direxpand },
|
||||
--- origsrc/bash-4.4/config-top.h 2016-05-19 13:34:02.000000000 -0500
|
||||
+++ src/bash-4.4/config-top.h 2017-01-23 13:55:07.992877600 -0600
|
||||
@@ -87,10 +87,10 @@
|
||||
#define DEFAULT_BASHRC "~/.bashrc"
|
||||
|
||||
/* System-wide .bashrc file for interactive shells. */
|
||||
-/* #define SYS_BASHRC "/etc/bash.bashrc" */
|
||||
+#define SYS_BASHRC "/etc/bash.bashrc"
|
||||
|
||||
/* System-wide .bash_logout for login shells. */
|
||||
-/* #define SYS_BASH_LOGOUT "/etc/bash.bash_logout" */
|
||||
+#define SYS_BASH_LOGOUT "/etc/bash.bash_logout"
|
||||
|
||||
/* Define this to make non-interactive shells begun with argv[0][0] == '-'
|
||||
run the startup files when not in posix mode. */
|
||||
@@ -100,7 +100,7 @@
|
||||
sshd and source the .bashrc if so (like the rshd behavior). This checks
|
||||
for the presence of SSH_CLIENT or SSH2_CLIENT in the initial environment,
|
||||
which can be fooled under certain not-uncommon circumstances. */
|
||||
-/* #define SSH_SOURCE_BASHRC */
|
||||
+#define SSH_SOURCE_BASHRC
|
||||
|
||||
/* Define if you want the case-capitalizing operators (~[~]) and the
|
||||
`capcase' variable attribute (declare -c). */
|
||||
--- origsrc/bash-4.4/doc/Makefile.in 2015-12-06 18:55:56.000000000 -0600
|
||||
+++ src/bash-4.4/doc/Makefile.in 2017-01-23 13:55:07.992877600 -0600
|
||||
@@ -189,7 +189,7 @@ bashref.html: $(BASHREF_FILES) $(HSUSER)
|
||||
$(MAKEINFO) --html --no-split -I$(TEXINPUTDIR) $(srcdir)/bashref.texi
|
||||
|
||||
bash.info: bashref.info
|
||||
- ${SHELL} ${INFOPOST} < $(srcdir)/bashref.info > $@ ; \
|
||||
+ ${SHELL} ${INFOPOST} < bashref.info > $@ ; \
|
||||
|
||||
bash.txt: bash.1
|
||||
bash.ps: bash.1
|
||||
@@ -252,9 +252,9 @@ install: info installdirs
|
||||
-$(INSTALL_DATA) $(srcdir)/bashbug.1 $(DESTDIR)$(man1dir)/bashbug${man1ext}
|
||||
-$(INSTALL_DATA) $(OTHER_DOCS) $(DESTDIR)$(docdir)
|
||||
# uncomment the next lines to install the builtins man page
|
||||
-# sed 's:bash\.1:man1/&:' $(srcdir)/builtins.1 > $${TMPDIR:-/var/tmp}/builtins.1
|
||||
-# -$(INSTALL_DATA) $${TMPDIR:-/var/tmp}/builtins.1 $(DESTDIR)$(man1dir)/bash_builtins${man1ext}
|
||||
-# -$(RM) $${TMPDIR:-/var/tmp}/builtins.1
|
||||
+ sed 's:bash\.1:man1/&:' $(srcdir)/builtins.1 > $${TMPDIR:-/var/tmp}/builtins.1
|
||||
+ -$(INSTALL_DATA) $${TMPDIR:-/var/tmp}/builtins.1 $(DESTDIR)$(man1dir)/bash_builtins${man1ext}
|
||||
+ -$(RM) $${TMPDIR:-/var/tmp}/builtins.1
|
||||
-if test -f bash.info; then d=.; else d=$(srcdir); fi; \
|
||||
$(INSTALL_DATA) $$d/bash.info $(DESTDIR)$(infodir)/bash.info
|
||||
# run install-info if it is present to update the info directory
|
||||
--- origsrc/bash-4.4/doc/bash.1 2016-08-26 08:45:17.000000000 -0500
|
||||
+++ src/bash-4.4/doc/bash.1 2017-01-23 13:55:08.008447700 -0600
|
||||
@@ -9607,6 +9607,10 @@ filenames.
|
||||
This variable is set by default, which is the default bash behavior in
|
||||
versions through 4.2.
|
||||
.TP 8
|
||||
+.B completion_strip_exe
|
||||
+If set, whenever bash sees \fIfoo.exe\fP during completion, it checks if
|
||||
+\fIfoo\fP is the same file and strips the suffix.
|
||||
+.TP 8
|
||||
.B direxpand
|
||||
If set,
|
||||
.B bash
|
||||
--- origsrc/bash-4.4/doc/bashref.texi 2016-09-07 16:13:36.000000000 -0500
|
||||
+++ src/bash-4.4/doc/bashref.texi 2017-01-23 13:55:08.008447700 -0600
|
||||
@@ -5123,6 +5123,10 @@ filenames.
|
||||
This variable is set by default, which is the default Bash behavior in
|
||||
versions through 4.2.
|
||||
|
||||
+@item completion_strip_exe
|
||||
+If set, whenever bash sees @file{foo.exe} during completion, it checks if
|
||||
+@file{foo} is the same file and strips the suffix.
|
||||
+
|
||||
@item direxpand
|
||||
If set, Bash
|
||||
replaces directory names with the results of word expansion when performing
|
||||
--- origsrc/bash-4.4/doc/builtins.1 2012-02-21 13:32:05.000000000 -0600
|
||||
+++ src/bash-4.4/doc/builtins.1 2017-01-23 13:55:08.008447700 -0600
|
||||
@@ -19,6 +19,6 @@ shift, shopt, source, suspend, test, tim
|
||||
ulimit, umask, unalias, unset, wait \- bash built-in commands, see \fBbash\fR(1)
|
||||
.SH BASH BUILTIN COMMANDS
|
||||
.nr zZ 1
|
||||
-.so bash.1
|
||||
+.so man1/bash.1
|
||||
.SH SEE ALSO
|
||||
bash(1), sh(1)
|
||||
--- origsrc/bash-4.4/general.c 2016-08-11 10:16:56.000000000 -0500
|
||||
+++ src/bash-4.4/general.c 2017-01-23 13:55:08.008447700 -0600
|
||||
@@ -48,6 +48,10 @@
|
||||
|
||||
#include <tilde/tilde.h>
|
||||
|
||||
+#ifdef __CYGWIN__
|
||||
+# include <sys/cygwin.h>
|
||||
+#endif
|
||||
+
|
||||
#if !defined (errno)
|
||||
extern int errno;
|
||||
#endif /* !errno */
|
||||
@@ -718,7 +722,8 @@ make_absolute (string, dot_path)
|
||||
{
|
||||
char pathbuf[PATH_MAX + 1];
|
||||
|
||||
- cygwin_conv_to_full_posix_path (string, pathbuf);
|
||||
+ cygwin_conv_path (CCP_WIN_A_TO_POSIX | CCP_ABSOLUTE, string, pathbuf,
|
||||
+ sizeof pathbuf);
|
||||
result = savestring (pathbuf);
|
||||
}
|
||||
#else
|
||||
--- origsrc/bash-4.4/input.c 2015-09-24 18:49:23.000000000 -0500
|
||||
+++ src/bash-4.4/input.c 2017-01-23 13:55:08.008447700 -0600
|
||||
@@ -44,6 +44,10 @@
|
||||
#include "quit.h"
|
||||
#include "trap.h"
|
||||
|
||||
+#ifdef __CYGWIN__
|
||||
+int igncr;
|
||||
+#endif
|
||||
+
|
||||
#if !defined (errno)
|
||||
extern int errno;
|
||||
#endif /* !errno */
|
||||
@@ -561,6 +565,19 @@ buffered_getchar ()
|
||||
{
|
||||
CHECK_TERMSIG;
|
||||
|
||||
+#ifdef __CYGWIN__
|
||||
+ /* shopt igncr discards carriage returns from the input stream.
|
||||
+ If cr is the only character left in the buffer, recurse to pick
|
||||
+ up the next byte; otherwise flatten the buffer. */
|
||||
+ if (igncr)
|
||||
+ {
|
||||
+ int ch;
|
||||
+ while ((ch = bufstream_getc (buffers[bash_input.location.buffered_fd]))
|
||||
+ == '\r')
|
||||
+ ;
|
||||
+ return ch;
|
||||
+ }
|
||||
+#endif
|
||||
#if !defined (DJGPP)
|
||||
return (bufstream_getc (buffers[bash_input.location.buffered_fd]));
|
||||
#else
|
||||
--- origsrc/bash-4.4/lib/sh/pathphys.c 2013-05-28 14:33:58.000000000 -0500
|
||||
+++ src/bash-4.4/lib/sh/pathphys.c 2017-01-23 13:55:08.008447700 -0600
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <stdio.h>
|
||||
#include <chartypes.h>
|
||||
#include <errno.h>
|
||||
+#include <stdlib.h>
|
||||
|
||||
#include "shell.h"
|
||||
|
||||
@@ -76,6 +77,9 @@ sh_physpath (path, flags)
|
||||
char *path;
|
||||
int flags;
|
||||
{
|
||||
+#ifdef __CYGWIN__
|
||||
+ return realpath (path, NULL);
|
||||
+#endif
|
||||
char tbuf[PATH_MAX+1], linkbuf[PATH_MAX+1];
|
||||
char *result, *p, *q, *qsave, *qbase, *workpath;
|
||||
int double_slash_path, linklen, nlink;
|
||||
@@ -214,11 +218,7 @@ error:
|
||||
{
|
||||
q = result;
|
||||
/* Duplicating some code here... */
|
||||
-#if defined (__CYGWIN__)
|
||||
- qbase = (ISALPHA((unsigned char)workpath[0]) && workpath[1] == ':') ? workpath + 3 : workpath + 1;
|
||||
-#else
|
||||
qbase = workpath + 1;
|
||||
-#endif
|
||||
double_slash_path = DOUBLE_SLASH (workpath);
|
||||
qbase += double_slash_path;
|
||||
|
||||
--- origsrc/bash-4.4/lib/sh/tmpfile.c 2016-08-11 10:05:58.000000000 -0500
|
||||
+++ src/bash-4.4/lib/sh/tmpfile.c 2017-01-23 13:55:08.008447700 -0600
|
||||
@@ -101,7 +101,7 @@ get_tmpdir (flags)
|
||||
if (tdir && (file_iswdir (tdir) == 0 || strlen (tdir) > PATH_MAX))
|
||||
tdir = 0;
|
||||
|
||||
- if (tdir == 0)
|
||||
+ if (tdir == 0 || !file_iswdir (tdir))
|
||||
tdir = get_sys_tmpdir ();
|
||||
|
||||
#if defined (HAVE_PATHCONF) && defined (_PC_NAME_MAX)
|
||||
--- origsrc/bash-4.4/mksyntax.c 2012-07-29 18:48:38.000000000 -0500
|
||||
+++ src/bash-4.4/mksyntax.c 2017-01-23 13:55:08.008447700 -0600
|
||||
@@ -29,13 +29,13 @@
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
+#else
|
||||
+extern int optind;
|
||||
+extern char *optarg;
|
||||
#endif
|
||||
|
||||
#include "syntax.h"
|
||||
|
||||
-extern int optind;
|
||||
-extern char *optarg;
|
||||
-
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
--- origsrc/bash-4.4/parse.y 2016-09-11 10:31:46.000000000 -0500
|
||||
+++ src/bash-4.4/parse.y 2017-01-23 13:55:08.008447700 -0600
|
||||
@@ -1539,14 +1539,20 @@ yy_string_get ()
|
||||
string = bash_input.location.string;
|
||||
|
||||
/* If the string doesn't exist, or is empty, EOF found. */
|
||||
- if (string && *string)
|
||||
+ while (string && *string)
|
||||
{
|
||||
c = *string++;
|
||||
bash_input.location.string = string;
|
||||
+#ifdef __CYGWIN__
|
||||
+ {
|
||||
+ extern int igncr;
|
||||
+ if (igncr && c == '\r')
|
||||
+ continue;
|
||||
+ }
|
||||
+#endif
|
||||
return (c);
|
||||
}
|
||||
- else
|
||||
- return (EOF);
|
||||
+ return (EOF);
|
||||
}
|
||||
|
||||
static int
|
||||
--- origsrc/bash-4.4/subst.c 2017-01-23 13:28:06.955247200 -0600
|
||||
+++ src/bash-4.4/subst.c 2017-01-23 13:55:08.008447700 -0600
|
||||
@@ -43,6 +43,7 @@
|
||||
#include "posixstat.h"
|
||||
#include "bashintl.h"
|
||||
|
||||
+#define NEED_SH_SETLINEBUF_DECL
|
||||
#include "shell.h"
|
||||
#include "parser.h"
|
||||
#include "flags.h"
|
||||
@@ -5964,6 +5965,13 @@ read_comsub (fd, quoted, rflag)
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
+#ifdef __CYGWIN__
|
||||
+ {
|
||||
+ extern int igncr;
|
||||
+ if (igncr && c == '\r')
|
||||
+ continue;
|
||||
+ }
|
||||
+#endif
|
||||
|
||||
/* Add the character to ISTRING, possibly after resizing it. */
|
||||
RESIZE_MALLOCED_BUFFER (istring, istring_index, 2, istring_size, DEFAULT_ARRAY_SIZE);
|
||||
@@ -6088,6 +6096,28 @@ command_substitute (string, quoted)
|
||||
goto error_exit;
|
||||
}
|
||||
|
||||
+#ifdef __CYGWIN__
|
||||
+ /* Passing a pipe through std fds can cause hangs when talking to a
|
||||
+ non-cygwin child. Move it. */
|
||||
+ if (fildes[0] < 3)
|
||||
+ {
|
||||
+ int fd = fcntl (fildes[0], F_DUPFD, 3);
|
||||
+ close (fildes[0]);
|
||||
+ fildes[0] = fd;
|
||||
+ }
|
||||
+ if (fildes[1] < 3)
|
||||
+ {
|
||||
+ int fd = fcntl (fildes[1], F_DUPFD, 3);
|
||||
+ close (fildes[1]);
|
||||
+ fildes[1] = fd;
|
||||
+ }
|
||||
+ if (fildes[0] < 0 || fildes[1] < 0)
|
||||
+ {
|
||||
+ sys_error (_("cannot make pipe for command substitution"));
|
||||
+ goto error_exit;
|
||||
+ }
|
||||
+#endif /* __CYGWIN__ */
|
||||
+
|
||||
old_pid = last_made_pid;
|
||||
#if defined (JOB_CONTROL)
|
||||
old_pipeline_pgrp = pipeline_pgrp;
|
||||
--- origsrc/bash-4.4/support/bashversion.c 2008-09-09 08:31:53.000000000 -0500
|
||||
+++ src/bash-4.4/support/bashversion.c 2017-01-23 13:55:08.024037200 -0600
|
||||
@@ -26,6 +26,9 @@
|
||||
|
||||
#if defined (HAVE_UNISTD_H)
|
||||
# include <unistd.h>
|
||||
+#else
|
||||
+extern int optind;
|
||||
+extern char *optarg;
|
||||
#endif
|
||||
|
||||
#include "bashansi.h"
|
||||
@@ -41,9 +44,6 @@
|
||||
#define LFLAG 0x0020
|
||||
#define XFLAG 0x0040
|
||||
|
||||
-extern int optind;
|
||||
-extern char *optarg;
|
||||
-
|
||||
extern char *dist_version;
|
||||
extern int patch_level;
|
||||
|
||||
--- origsrc/bash-4.4/support/mkversion.sh 2008-08-13 07:25:57.000000000 -0500
|
||||
+++ src/bash-4.4/support/mkversion.sh 2017-01-23 13:55:08.024037200 -0600
|
||||
@@ -29,7 +29,7 @@ source_dir="."
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
-o) shift; OUTFILE=$1; shift ;;
|
||||
- -b) shift; inc_build=yes ;;
|
||||
+ -b) shift; ;; # inc_build=yes ;; # hacked out for cygport
|
||||
-s) shift; rel_status=$1; shift ;;
|
||||
-p) shift; patch_level=$1; shift ;;
|
||||
-d) shift; dist_version=$1; shift ;;
|
||||
--- origsrc/bash-4.4/variables.c 2016-06-15 15:05:52.000000000 -0500
|
||||
+++ src/bash-4.4/variables.c 2017-01-23 13:55:08.024037200 -0600
|
||||
@@ -5239,6 +5239,7 @@ sv_winsize (name)
|
||||
/* Update the value of HOME in the export environment so tilde expansion will
|
||||
work on cygwin. */
|
||||
#if defined (__CYGWIN__)
|
||||
+void
|
||||
sv_home (name)
|
||||
char *name;
|
||||
{
|
@ -1,10 +1,10 @@
|
||||
postFixupHooks+=(_cygwinFixAutoImageBase)
|
||||
fixupOutputHooks+=(_cygwinFixAutoImageBase)
|
||||
|
||||
_cygwinFixAutoImageBase() {
|
||||
if [ "$dontRebase" == 1 ]; then
|
||||
if [ "$dontRebase" == 1 ] || [ ! -d "$prefix" ]; then
|
||||
return
|
||||
fi
|
||||
find $out -name "*.dll" | while read DLL; do
|
||||
find "$prefix" -name "*.dll" -type f | while read DLL; do
|
||||
if [ -f /etc/rebasenix.nextbase ]; then
|
||||
NEXTBASE="$(</etc/rebasenix.nextbase)"
|
||||
fi
|
||||
|
@ -1,10 +1,10 @@
|
||||
postFixupHooks+=(_cygwinFixAutoImageBase)
|
||||
fixupOutputHooks+=(_cygwinFixAutoImageBase)
|
||||
|
||||
_cygwinFixAutoImageBase() {
|
||||
if [ "$dontRebase" == 1 ]; then
|
||||
if [ "$dontRebase" == 1 ] || [ ! -d "$prefix" ]; then
|
||||
return
|
||||
fi
|
||||
find $out -name "*.dll" | while read DLL; do
|
||||
find "$prefix" -name "*.dll" -type f | while read DLL; do
|
||||
if [ -f /etc/rebasenix.nextbase ]; then
|
||||
NEXTBASE="$(</etc/rebasenix.nextbase)"
|
||||
fi
|
||||
|
@ -235,11 +235,11 @@ in rec {
|
||||
libcxxabi libcxx ncurses libffi zlib gmp pcre gnugrep
|
||||
coreutils findutils diffutils patchutils;
|
||||
|
||||
llvmPackages = let llvmOverride = llvmPackages.llvm.override { enableManpages = false; inherit libcxxabi; }; in
|
||||
super.llvmPackages // {
|
||||
llvm = llvmOverride;
|
||||
clang-unwrapped = llvmPackages.clang-unwrapped.override { enableManpages = false; llvm = llvmOverride; };
|
||||
};
|
||||
llvmPackages = let llvmOverride = llvmPackages.llvm.override { inherit libcxxabi; };
|
||||
in super.llvmPackages // {
|
||||
llvm = llvmOverride;
|
||||
clang-unwrapped = llvmPackages.clang-unwrapped.override { llvm = llvmOverride; };
|
||||
};
|
||||
|
||||
darwin = super.darwin // {
|
||||
inherit (darwin) dyld Libsystem libiconv locale;
|
||||
|
@ -102,7 +102,7 @@ let
|
||||
|
||||
fetchurlBoot = fetchurl;
|
||||
|
||||
inherit system shell cc overrides config;
|
||||
inherit shell cc overrides config;
|
||||
};
|
||||
|
||||
in
|
||||
|
@ -1,27 +1,21 @@
|
||||
{ stdenv, buildGoPackage, fetchFromGitHub }:
|
||||
{ lib, python2Packages, fetchurl }:
|
||||
|
||||
buildGoPackage rec {
|
||||
python2Packages.buildPythonApplication rec {
|
||||
name = "cli53-${version}";
|
||||
version = "0.8.8";
|
||||
version = "0.4.4";
|
||||
|
||||
goPackagePath = "github.com/barnybug/cli53";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "barnybug";
|
||||
repo = "cli53";
|
||||
rev = version;
|
||||
sha256 = "1hbx64rn25qzp2xlfwv8xaqyfcax9b6pl30j9vciw7cb346i84gc";
|
||||
src = fetchurl {
|
||||
url = "mirror://pypi/c/cli53/${name}.tar.gz";
|
||||
sha256 = "0s9jzigq6a16m2c3qklssx2lz16cf13g5zh80vh24kxazaxqzbig";
|
||||
};
|
||||
|
||||
buildPhase = ''
|
||||
pushd go/src/${goPackagePath}/cmd/cli53
|
||||
go get .
|
||||
popd
|
||||
'';
|
||||
propagatedBuildInputs = with python2Packages; [
|
||||
argparse
|
||||
boto
|
||||
dns
|
||||
];
|
||||
|
||||
goDeps = ./deps.nix;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "CLI tool for the Amazon Route 53 DNS service";
|
||||
homepage = https://github.com/barnybug/cli53;
|
||||
license = licenses.mit;
|
||||
|
@ -1,7 +1,6 @@
|
||||
{ stdenv, fetchurl
|
||||
, bzip2
|
||||
, enableNLS ? false, libnatspec
|
||||
, buildPlatform, hostPlatform
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
@ -23,13 +22,13 @@ stdenv.mkDerivation {
|
||||
./CVE-2015-7697.diff
|
||||
./CVE-2014-9913.patch
|
||||
./CVE-2016-9844.patch
|
||||
./dont-hardcode-cc.patch
|
||||
] ++ stdenv.lib.optional enableNLS
|
||||
(fetchurl {
|
||||
url = "http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-arch/unzip/files/unzip-6.0-natspec.patch?revision=1.1";
|
||||
name = "unzip-6.0-natspec.patch";
|
||||
sha256 = "67ab260ae6adf8e7c5eda2d1d7846929b43562943ec4aff629bd7018954058b1";
|
||||
})
|
||||
++ stdenv.lib.optional (hostPlatform != buildPlatform) ./cross-cc.patch;
|
||||
});
|
||||
|
||||
nativeBuildInputs = [ bzip2 ];
|
||||
buildInputs = [ bzip2 ] ++ stdenv.lib.optional enableNLS libnatspec;
|
||||
|
@ -1,12 +1,14 @@
|
||||
--- a/unix/Makefile
|
||||
+++ b/unix/Makefile
|
||||
@@ -42,9 +42,7 @@
|
||||
@@ -42,9 +42,9 @@
|
||||
# such as -DDOSWILD).
|
||||
|
||||
# UnZip flags
|
||||
-CC = cc# try using "gcc" target rather than changing this (CC and LD
|
||||
+CC ?= cc# try using "gcc" target rather than changing this (CC and LD
|
||||
LD = $(CC)# must match, else "unresolved symbol: ___main" is possible)
|
||||
-AS = as
|
||||
+AS ?= as
|
||||
LOC = $(D_USE_BZ2) $(LOCAL_UNZIP)
|
||||
AF = $(LOC)
|
||||
CFLAGS = -O
|
@ -15,10 +15,6 @@ stdenv.mkDerivation rec {
|
||||
|
||||
nativeBuildInputs = [ xz.bin ];
|
||||
|
||||
preConfigure = if stdenv.isCygwin then ''
|
||||
sed -i lib/fpending.h -e 's,include <stdio_ext.h>,,'
|
||||
'' else null;
|
||||
|
||||
# In stdenv-linux, prevent a dependency on bootstrap-tools.
|
||||
makeFlags = "SHELL=/bin/sh GREP=grep";
|
||||
|
||||
|
@ -32,6 +32,9 @@ stdenv.mkDerivation rec {
|
||||
sed '2i echo Skipping cp sparse test && exit 0' -i ./tests/cp/sparse.sh
|
||||
sed '2i echo Skipping rm deep-2 test && exit 0' -i ./tests/rm/deep-2.sh
|
||||
sed '2i echo Skipping du long-from-unreadable test && exit 0' -i ./tests/du/long-from-unreadable.sh
|
||||
sed '2i echo Skipping chmod setgid test && exit 0' -i ./tests/chmod/setgid.sh
|
||||
substituteInPlace ./tests/install/install-C.sh \
|
||||
--replace 'mode3=2755' 'mode3=1755'
|
||||
'';
|
||||
|
||||
outputs = [ "out" "info" ];
|
||||
@ -67,7 +70,7 @@ stdenv.mkDerivation rec {
|
||||
&& builtins.storeDir == "/nix/store";
|
||||
|
||||
# Prevents attempts of running 'help2man' on cross-built binaries.
|
||||
${if hostPlatform == buildPlatform then null else "PERL"} = "missing";
|
||||
PERL = if hostPlatform == buildPlatform then null else "missing";
|
||||
|
||||
# Saw random failures like ‘help2man: can't get '--help' info from
|
||||
# man/sha512sum.td/sha512sum’.
|
||||
@ -80,11 +83,11 @@ stdenv.mkDerivation rec {
|
||||
|
||||
# Works around a bug with 8.26:
|
||||
# Makefile:3440: *** Recursive variable 'INSTALL' references itself (eventually). Stop.
|
||||
${if hostPlatform == buildPlatform then null else "preInstall"} = ''
|
||||
preInstall = optionalString (hostPlatform != buildPlatform) ''
|
||||
sed -i Makefile -e 's|^INSTALL =.*|INSTALL = ${buildPackages.coreutils}/bin/install -c|'
|
||||
'';
|
||||
|
||||
${if hostPlatform == buildPlatform then null else "postInstall"} = ''
|
||||
postInstall = optionalString (hostPlatform != buildPlatform) ''
|
||||
rm $out/share/man/man1/*
|
||||
cp ${buildPackages.coreutils}/share/man/man1/* $out/share/man/man1
|
||||
'';
|
||||
|
@ -26,7 +26,7 @@ rec {
|
||||
url = "https://pypi.python.org/packages/52/b3/a96d62711a26d8cfbe546519975dc9ed54d2eb50b3238d2e6de045764796/ZConfig-3.1.0.tar.gz";
|
||||
sha256 = "c21fa3a073a56925a8098036d46717392994a92cffea1b3cda3176b70c0a842e";
|
||||
};
|
||||
propagatedBuildInputs = [ pythonPackages.zope_testrunner ];
|
||||
propagatedBuildInputs = with pythonPackages; [ zope_testrunner ];
|
||||
meta = with stdenv.lib; {
|
||||
homepage = "";
|
||||
license = licenses.zpt21;
|
||||
|
@ -17,11 +17,6 @@ stdenv.mkDerivation rec {
|
||||
|
||||
doCheck = hostPlatform == buildPlatform;
|
||||
|
||||
${if hostPlatform != buildPlatform then "crossPlatforms" else null} = [ ];
|
||||
${if hostPlatform != buildPlatform then "configureFlags" else null} = [
|
||||
"CXX=${stdenv.cc.prefix}c++"
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "GNU ddrescue, a data recovery tool";
|
||||
|
||||
|
@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
buildInputs = stdenv.lib.optional doCheck ed;
|
||||
|
||||
configureFlags = if hostPlatform == buildPlatform then null else [
|
||||
configureFlags = stdenv.lib.optionals (hostPlatform != buildPlatform) [
|
||||
"ac_cv_func_strnlen_working=yes"
|
||||
];
|
||||
|
||||
|
@ -7754,6 +7754,7 @@ let self = _self // overrides; _self = with self; {
|
||||
url = mirror://cpan/authors/id/P/PV/PVANDRY/gettext-1.05.tar.gz;
|
||||
sha256 = "15262a00vx714szpx8p2z52wxkz46xp7acl72znwjydyq4ypydi7";
|
||||
};
|
||||
LANG="C";
|
||||
};
|
||||
|
||||
LocaleMaketext = buildPerlPackage {
|
||||
|
Loading…
Reference in New Issue
Block a user