Compare commits
13 Commits
master
...
syscall-tr
Author | SHA1 | Date | |
---|---|---|---|
![]() |
875f94e248 | ||
![]() |
6f36a40fae | ||
![]() |
411bf3107d | ||
![]() |
2001f17547 | ||
![]() |
06e9027476 | ||
![]() |
6643f177e3 | ||
![]() |
ae613dfda4 | ||
![]() |
bf364e9ff6 | ||
![]() |
f032df497e | ||
![]() |
6787dddb04 | ||
![]() |
8d40289096 | ||
![]() |
d78637a80a | ||
![]() |
b92492a373 |
|
@ -1,4 +1,5 @@
|
|||
args: with args; with stringsWithDeps; with lib;
|
||||
assert false;
|
||||
let inherit (builtins) head tail trace; in
|
||||
(rec
|
||||
{
|
||||
|
|
|
@ -13,6 +13,7 @@ let
|
|||
stdenv.mkDerivation ({
|
||||
name = "mirrors-list";
|
||||
builder = ./write-mirror-list.sh;
|
||||
dontTrace = true;
|
||||
} // mirrors);
|
||||
|
||||
# Names of the master sites that are mirrored (i.e., "sourceforge",
|
||||
|
@ -64,6 +65,8 @@ stdenv.mkDerivation {
|
|||
if showURLs then "urls"
|
||||
else if name != "" then name
|
||||
else baseNameOf (toString (builtins.head urls_));
|
||||
|
||||
dontTrace = true;
|
||||
|
||||
builder = ./builder.sh;
|
||||
|
||||
|
|
|
@ -1,31 +1,29 @@
|
|||
{fetchurl, stdenv, builderDefs, stringsWithDeps, singlePrecision ? false}:
|
||||
let localDefs = builderDefs.passthru.function {
|
||||
src =
|
||||
fetchurl {
|
||||
url = ftp://ftp.fftw.org/pub/fftw/fftw-3.2.2.tar.gz;
|
||||
sha256 = "13vnglardq413q2518zi4a8pam3znydrz28m9w09kss9xrjsx9va";
|
||||
};
|
||||
buildInputs = [];
|
||||
configureFlags = ["--enable-shared" "--enable-openmp"]
|
||||
# some distros seem to be shipping both versions within the same package?
|
||||
# why does --enable-float still result in ..3f.so instead of ..3.so?
|
||||
++ (if singlePrecision then [ "--enable-single" ] else [ ])
|
||||
# I think all i686 has sse
|
||||
++ (if (stdenv.isi686 || stdenv.isx86_64) && singlePrecision then [ "--enable-sse" ] else [ ])
|
||||
# I think all x86_64 has sse2
|
||||
++ (if stdenv.isx86_64 && ! singlePrecision then [ "--enable-sse2" ] else [ ]);
|
||||
|
||||
{ fetchurl, stdenv, singlePrecision ? false }:
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
let version = "3.3"; in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "fftw-${version}" + (if singlePrecision then "-single" else "-double");
|
||||
|
||||
src = fetchurl {
|
||||
url = "ftp://ftp.fftw.org/pub/fftw/fftw-${version}.tar.gz";
|
||||
sha256 = "1skakcijq5rds6mmj7jffqk5i4fw7p81k4z1iikkx4qk3999hnnj";
|
||||
};
|
||||
in with localDefs;
|
||||
stdenv.mkDerivation {
|
||||
name = "fftw-3.2.2" + ( if singlePrecision then "-single" else "-double" );
|
||||
builder = writeScript "fftw-3.2.1-builder"
|
||||
(textClosure localDefs [doConfigure doMakeInstall doForceShare]);
|
||||
|
||||
configureFlags =
|
||||
[ "--enable-shared" "--enable-openmp" ]
|
||||
# some distros seem to be shipping both versions within the same package?
|
||||
# why does --enable-float still result in ..3f.so instead of ..3.so?
|
||||
++ optional singlePrecision "--enable-single"
|
||||
# I think all i686 has sse
|
||||
++ optional ((stdenv.isi686 || stdenv.isx86_64) && singlePrecision) "--enable-sse"
|
||||
# I think all x86_64 has sse2
|
||||
++ optional (stdenv.isx86_64 && !singlePrecision) "--enable-sse2";
|
||||
|
||||
meta = {
|
||||
description = "Fastest Fourier Transform in the West library";
|
||||
};
|
||||
passthru = {
|
||||
# Allow instantiating "-A fftw.src"
|
||||
inherit src;
|
||||
homepage = http://www.fftw.org/;
|
||||
description = "A C subroutine library for computing the discrete Fourier transform";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ let inherit (lib) nv nvs; in
|
|||
# consider adding addtional elements by derivation.merge { removeAttrs = ["elem"]; };
|
||||
removeAttrs ? ["cfg" "flags"]
|
||||
|
||||
}: (lib.defaultOverridableDelayableArgs ( a: mkDerivation a)
|
||||
}: assert false; (lib.defaultOverridableDelayableArgs ( a: mkDerivation a)
|
||||
{
|
||||
inherit applyPreTidy removeAttrs;
|
||||
}).merge;
|
||||
|
|
|
@ -36,13 +36,13 @@ rec {
|
|||
# Filter out special attributes.
|
||||
drop = ["meta" "passthru" "outPath" "drvPath" "hostDrv" "buildDrv" "type" "override" "deepOverride" "origArgs"]
|
||||
# also drop functions such as .merge .override etc
|
||||
++ lib.filter (n: isFunction (getAttr n drv)) (attrNames drv);
|
||||
++ lib.filter (n: isFunction (getAttr n drv)) (attrNames drv)
|
||||
++ lib.optionals (drv ? passthru) (attrNames drv.passthru);
|
||||
attrs = removeAttrs drv drop;
|
||||
newDrv = derivation (attrs // (f drv));
|
||||
in newDrv //
|
||||
{ meta = if drv ? meta then drv.meta else {};
|
||||
passthru = if drv ? passthru then drv.passthru else {};
|
||||
};
|
||||
in newDrv
|
||||
// { meta = if drv ? meta then drv.meta else {}; }
|
||||
// (if drv ? passthru then drv.passthru // { passthru = drv.passthru; } else {});
|
||||
|
||||
|
||||
# usage: (you can use override multiple times)
|
||||
|
|
|
@ -2,8 +2,9 @@
|
|||
a new stdenv with different behaviour, e.g. using a different C
|
||||
compiler. */
|
||||
|
||||
{dietlibc, fetchurl, runCommand}:
|
||||
|
||||
{ dietlibc, fetchurl, runCommand }:
|
||||
|
||||
let pkgs = import /etc/nixos/nixpkgs { }; in
|
||||
|
||||
rec {
|
||||
|
||||
|
@ -349,4 +350,35 @@ rec {
|
|||
drvPath = validate pkg.drvPath;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
traceScript = pkgs.writeScript "builder.sh"
|
||||
''
|
||||
#! ${pkgs.bash}/bin/bash
|
||||
echo tracing: $builder $realArgs
|
||||
set +o posix
|
||||
${pkgs.coreutils}/bin/mkdir -p $out/.trace $out/.build
|
||||
# Compress the strace output on the fly. The builder's stderr
|
||||
# also goes to the log so that the trace processor can see stuff
|
||||
# like Make trace messages.
|
||||
exec 4> >(${pkgs.bzip2}/bin/bzip2 > $out/.trace/log.bz2)
|
||||
exec 5> >(${pkgs.coreutils}/bin/tee /dev/fd/4)
|
||||
${pkgs.strace}/bin/strace -e trace=file,process,dup,dup2,close,pipe -v -q -f -s 512 -o /dev/fd/4 ${pkgs.stdenv.shell} -c 'cd $out/.build; exec $builder $realArgs' 2>&5
|
||||
(cd $out && ${pkgs.gnutar}/bin/tar c .build | ${pkgs.bzip2}/bin/bzip2 > .build.tar.bz2 && ${pkgs.coreutils}/bin/chmod -R u+w .build && ${pkgs.coreutils}/bin/rm -rf .build)
|
||||
'';
|
||||
|
||||
|
||||
traceSyscalls = stdenv: stdenv //
|
||||
{ mkDerivation = args: stdenv.lib.overrideDerivation (stdenv.mkDerivation args)
|
||||
(args2: if args2 ? dontTrace then { } else {
|
||||
realArgs = args2.args;
|
||||
args = [ "-e" traceScript ];
|
||||
enableParallelBuilding = false;
|
||||
# Don't run the patchelf phase in stdenv since I don't want
|
||||
# Nixpkgs-specific stuff polluting our pictures :-)
|
||||
dontPatchELF = true;
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -87,7 +87,8 @@ let
|
|||
# should be made available to Nix expressions using the
|
||||
# derivation (e.g., in assertions).
|
||||
//
|
||||
(if attrs ? passthru then attrs.passthru else {});
|
||||
lib.optionalAttrs (attrs ? passthru)
|
||||
(attrs.passthru // { passthru = attrs.passthru; });
|
||||
|
||||
# Utility flags to test the type of platform.
|
||||
isDarwin = result.system == "i686-darwin"
|
||||
|
|
|
@ -307,7 +307,7 @@ stripDirs() {
|
|||
|
||||
if test -n "${dirs}"; then
|
||||
header "stripping (with flags $stripFlags) in $dirs"
|
||||
find $dirs -type f -print0 | xargs -0 ${xargsFlags:--r} strip $stripFlags || true
|
||||
find $dirs \( -name '.build' -prune \) -type f -print0 | xargs -0 ${xargsFlags:--r} strip $stripFlags || true
|
||||
stopNest
|
||||
fi
|
||||
}
|
||||
|
@ -665,7 +665,7 @@ patchShebangs() {
|
|||
header "patching script interpreter paths"
|
||||
local dir="$1"
|
||||
local f
|
||||
for f in $(find "$dir" -type f -perm +0100); do
|
||||
for f in $(find "$dir" \( -name '.build' -prune \) -type f -perm +0100); do
|
||||
local oldPath=$(sed -ne '1 s,^#![ ]*\([^ ]*\).*$,\1,p' "$f")
|
||||
if test -n "$oldPath" -a "${oldPath:0:${#NIX_STORE}}" != "$NIX_STORE"; then
|
||||
local newPath=$(type -P $(basename $oldPath) || true)
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
# The function defaults are for easy testing.
|
||||
{system ? "i686-linux", allPackages ? import ../../top-level/all-packages.nix, platform}:
|
||||
|
||||
with import ../adapters.nix { dietlibc = null; fetchurl = null; runCommand = null; };
|
||||
|
||||
rec {
|
||||
|
||||
bootstrapFiles =
|
||||
|
@ -143,14 +145,14 @@ rec {
|
|||
# Create the first "real" standard environment. This one consists
|
||||
# of bootstrap tools only, and a minimal Glibc to keep the GCC
|
||||
# configure script happy.
|
||||
stdenvLinuxBoot1 = stdenvBootFun {
|
||||
stdenvLinuxBoot1 = traceSyscalls (stdenvBootFun {
|
||||
gcc = wrapGCC {
|
||||
libc = bootstrapGlibc;
|
||||
binutils = bootstrapTools;
|
||||
coreutils = bootstrapTools;
|
||||
};
|
||||
inherit fetchurl;
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
# 2) These are the packages that we can build with the first
|
||||
|
@ -163,16 +165,17 @@ rec {
|
|||
};
|
||||
|
||||
firstBinutils = stdenvLinuxBoot1Pkgs.binutils;
|
||||
|
||||
|
||||
# 3) 2nd stdenv that we will use to build only the glibc.
|
||||
stdenvLinuxBoot2 = stdenvBootFun {
|
||||
stdenvLinuxBoot2 = traceSyscalls (stdenvBootFun {
|
||||
gcc = wrapGCC {
|
||||
libc = bootstrapGlibc;
|
||||
binutils = firstBinutils;
|
||||
coreutils = bootstrapTools;
|
||||
};
|
||||
inherit fetchurl;
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
# 4) These are the packages that we can build with the 2nd
|
||||
|
@ -191,7 +194,7 @@ rec {
|
|||
# 6) Construct a third stdenv identical to the 2nd, except that
|
||||
# this one uses the Glibc built in step 3. It still uses
|
||||
# the recent binutils and rest of the bootstrap tools, including GCC.
|
||||
stdenvLinuxBoot3 = stdenvBootFun {
|
||||
stdenvLinuxBoot3 = traceSyscalls (stdenvBootFun {
|
||||
gcc = wrapGCC {
|
||||
binutils = stdenvLinuxBoot1Pkgs.binutils;
|
||||
coreutils = bootstrapTools;
|
||||
|
@ -202,7 +205,7 @@ rec {
|
|||
inherit (stdenvLinuxBoot1Pkgs) perl;
|
||||
};
|
||||
inherit fetchurl;
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
# 7) The packages that can be built using the third stdenv.
|
||||
|
@ -229,7 +232,7 @@ rec {
|
|||
# this one uses the dynamically linked GCC and Binutils from step
|
||||
# 5. The other tools (e.g. coreutils) are still from the
|
||||
# bootstrap tools.
|
||||
stdenvLinuxBoot4 = stdenvBootFun {
|
||||
stdenvLinuxBoot4 = traceSyscalls (stdenvBootFun {
|
||||
gcc = wrapGCC rec {
|
||||
inherit (stdenvLinuxBoot3Pkgs) binutils;
|
||||
coreutils = bootstrapTools;
|
||||
|
@ -241,7 +244,7 @@ rec {
|
|||
inherit (stdenvLinuxBoot1Pkgs) perl;
|
||||
};
|
||||
inherit fetchurl;
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
# 9) The packages that can be built using the fourth stdenv.
|
||||
|
@ -258,7 +261,7 @@ rec {
|
|||
# When updating stdenvLinux, make sure that the result has no
|
||||
# dependency (`nix-store -qR') on bootstrapTools or the
|
||||
# first binutils built.
|
||||
stdenvLinux = import ../generic rec {
|
||||
stdenvLinux = traceSyscalls (import ../generic rec {
|
||||
name = "stdenv-linux";
|
||||
|
||||
inherit system;
|
||||
|
@ -295,6 +298,6 @@ rec {
|
|||
gnumake gnused gnutar gnugrep gnupatch patchelf
|
||||
attr acl;
|
||||
};
|
||||
};
|
||||
});
|
||||
|
||||
}
|
||||
|
|
|
@ -1507,6 +1507,7 @@ let
|
|||
|
||||
x11_ssh_askpass = callPackage ../tools/networking/x11-ssh-askpass { };
|
||||
|
||||
/*
|
||||
xbursttools = assert stdenv ? glibc; import ../tools/misc/xburst-tools {
|
||||
inherit stdenv fetchgit autoconf automake libusb confuse;
|
||||
# It needs a cross compiler for mipsel to build the firmware it will
|
||||
|
@ -1539,6 +1540,7 @@ let
|
|||
in
|
||||
pkgsCross.gccCrossStageStatic;
|
||||
};
|
||||
*/
|
||||
|
||||
xclip = callPackage ../tools/misc/xclip { };
|
||||
|
||||
|
@ -7850,7 +7852,7 @@ let
|
|||
# TODO: merge with branches/drop-kde4.5 if you want to remove KDE SC 4.5
|
||||
# This branch removes kde45 and quite a few compatibility hacks
|
||||
kde45 = kdePackagesFor pkgs.kde45 "4.5";
|
||||
kde47 = kdePackagesFor pkgs.kde47 "4.7";
|
||||
#kde47 = kdePackagesFor pkgs.kde47 "4.7";
|
||||
|
||||
kdePackagesFor = self: version:
|
||||
let callPackageOrig = callPackage; in
|
||||
|
|
|
@ -35,7 +35,7 @@ rec {
|
|||
prio = level: job: toJob job // { schedulingPriority = level; };
|
||||
|
||||
toJob = x: if builtins.isAttrs x then x else
|
||||
{ type = "job"; systems = x; schedulingPriority = 5; };
|
||||
{ type = "job"; systems = x; schedulingPriority = 1; };
|
||||
|
||||
/* Perform a job on the given set of platforms. The function `f' is
|
||||
called by Hydra for each platform, and should return some job
|
||||
|
|
Loading…
Reference in New Issue
Block a user