Merge branch 'master' into staging-next

This commit is contained in:
Robert Schütz
2018-08-31 17:32:48 +02:00
497 changed files with 2235 additions and 1360 deletions

View File

@@ -16,11 +16,11 @@ stdenv.mkDerivation {
xlibsWrapper
];
buildPhase = if stdenv.system == "x86_64-linux" then ''
buildPhase = if stdenv.hostPlatform.system == "x86_64-linux" then ''
make all64
'' else if stdenv.system == "i686-linux" then ''
'' else if stdenv.hostPlatform.system == "i686-linux" then ''
make all32
'' else throw "xwinwrap is not supported on ${stdenv.system}";
'' else throw "xwinwrap is not supported on ${stdenv.hostPlatform.system}";
installPhase = ''
mkdir -p $out/bin

View File

@@ -5,7 +5,7 @@ stdenv.mkDerivation rec {
version = "0.8.0";
src =
if stdenv.system == "i686-linux" then
if stdenv.hostPlatform.system == "i686-linux" then
fetchurl {
name = "linux32-${version}.tar.gz";
url = "https://clis.ng.bluemix.net/download/bluemix-cli/${version}/linux32";

View File

@@ -32,7 +32,7 @@ in stdenv.mkDerivation rec {
name = "google-cloud-sdk-${version}";
version = "206.0.0";
src = fetchurl (sources name stdenv.system);
src = fetchurl (sources name stdenv.hostPlatform.system);
buildInputs = [ python makeWrapper ];

View File

@@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
# May have some issues with root compilation because the bootstrap tool
# cannot be used as a login shell for now.
FORCE_UNSAFE_CONFIGURE = stdenv.lib.optionalString (stdenv.system == "armv7l-linux" || stdenv.isSunOS) "1";
FORCE_UNSAFE_CONFIGURE = stdenv.lib.optionalString (stdenv.hostPlatform.system == "armv7l-linux" || stdenv.isSunOS) "1";
preConfigure = if stdenv.isCygwin then ''
sed -i gnu/fpending.h -e 's,include <stdio_ext.h>,,'

View File

@@ -1,6 +1,4 @@
{ stdenv, fetchurl, unzip
, hostPlatform
}:
{ stdenv, fetchurl, unzip }:
let
# Generated upstream information
@@ -14,10 +12,10 @@ let
};
compileFlags = stdenv.lib.concatStringsSep " " ([ "-O3" "-mtune=generic" "-DNDEBUG" ]
++ stdenv.lib.optional (hostPlatform.isUnix) "-Dunix -pthread"
++ stdenv.lib.optional (hostPlatform.isi686) "-march=i686"
++ stdenv.lib.optional (hostPlatform.isx86_64) "-march=nocona"
++ stdenv.lib.optional (!hostPlatform.isx86) "-DNOJIT");
++ stdenv.lib.optional (stdenv.hostPlatform.isUnix) "-Dunix -pthread"
++ stdenv.lib.optional (stdenv.hostPlatform.isi686) "-march=i686"
++ stdenv.lib.optional (stdenv.hostPlatform.isx86_64) "-march=nocona"
++ stdenv.lib.optional (!stdenv.hostPlatform.isx86) "-DNOJIT");
in
stdenv.mkDerivation {
inherit (s) name version;

View File

@@ -7,7 +7,7 @@ let
};
inherit
(archids.${stdenv.system} or (throw "unsupported system: ${stdenv.system}"))
(archids.${stdenv.hostPlatform.system} or (throw "unsupported system: ${stdenv.hostPlatform.system}"))
hostarch efiPlatform;
in

View File

@@ -1,5 +1,5 @@
{ stdenv, fetchurl
, linkStatic ? (stdenv.system == "i686-cygwin")
, linkStatic ? (stdenv.hostPlatform.system == "i686-cygwin")
}:
stdenv.mkDerivation rec {

View File

@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
checkInputs = [ which python3Packages.pytest ];
NIX_CFLAGS_COMPILE = stdenv.lib.optional
(stdenv.system == "i686-linux")
(stdenv.hostPlatform.system == "i686-linux")
"-D_FILE_OFFSET_BITS=64";
postInstall = ''

View File

@@ -1,5 +1,4 @@
{ stdenv, fetchurl, libpng, static ? false
, buildPlatform, hostPlatform
}:
# This package comes with its own copy of zlib, libpng and pngxtern
@@ -26,11 +25,11 @@ stdenv.mkDerivation rec {
configureFlags = [
"--with-system-zlib"
"--with-system-libpng"
] ++ stdenv.lib.optionals (hostPlatform != buildPlatform) [
] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
#"-prefix=$out"
];
postInstall = if hostPlatform != buildPlatform && hostPlatform.isWindows then ''
postInstall = if stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform.isWindows then ''
mv "$out"/bin/optipng{,.exe}
'' else null;

View File

@@ -1,9 +1,9 @@
{stdenv, fetchurl}:
let
folder = if stdenv.system == "i686-linux" then "i686"
else if stdenv.system == "x86_64-linux" then "x86_64"
else throw "Unsupported system: ${stdenv.system}";
folder = if stdenv.hostPlatform.system == "i686-linux" then "i686"
else if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64"
else throw "Unsupported system: ${stdenv.hostPlatform.system}";
in
stdenv.mkDerivation {
name = "pngout-20130221";
@@ -17,9 +17,9 @@ stdenv.mkDerivation {
mkdir -p $out/bin
cp ${folder}/pngout $out/bin
${if stdenv.system == "i686-linux" then ''
${if stdenv.hostPlatform.system == "i686-linux" then ''
patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 $out/bin/pngout
'' else if stdenv.system == "x86_64-linux" then ''
'' else if stdenv.hostPlatform.system == "x86_64-linux" then ''
patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux-x86-64.so.2 $out/bin/pngout
'' else ""}
'';

View File

@@ -2,11 +2,11 @@
let
arch =
if stdenv.system == "x86_64-linux" then "bandwidth64"
else if stdenv.system == "i686-linux" then "bandwidth32"
else if stdenv.system == "x86_64-darwin" then "bandwidth-mac64"
else if stdenv.system == "i686-darwin" then "bandwidth-mac32"
else if stdenv.system == "i686-cygwin" then "bandwidth-win32"
if stdenv.hostPlatform.system == "x86_64-linux" then "bandwidth64"
else if stdenv.hostPlatform.system == "i686-linux" then "bandwidth32"
else if stdenv.hostPlatform.system == "x86_64-darwin" then "bandwidth-mac64"
else if stdenv.hostPlatform.system == "i686-darwin" then "bandwidth-mac32"
else if stdenv.hostPlatform.system == "i686-cygwin" then "bandwidth-win32"
else throw "Unknown architecture";
in
stdenv.mkDerivation rec {

View File

@@ -1,6 +1,5 @@
{ stdenv, lib, buildPackages
, autoreconfHook, texinfo, fetchurl, perl, xz, libiconv, gmp ? null
, hostPlatform, buildPlatform
, aclSupport ? false, acl ? null
, attrSupport ? false, attr ? null
, selinuxSupport? false, libselinux ? null, libsepol ? null
@@ -21,10 +20,10 @@ stdenv.mkDerivation rec {
sha256 = "0plm1zs9il6bb5mk881qvbghq4glc8ybbgakk2lfzb0w64fgml4j";
};
patches = optional hostPlatform.isCygwin ./coreutils-8.23-4.cygwin.patch;
patches = optional stdenv.hostPlatform.isCygwin ./coreutils-8.23-4.cygwin.patch;
# The test tends to fail on btrfs and maybe other unusual filesystems.
postPatch = optionalString (!hostPlatform.isDarwin) ''
postPatch = optionalString (!stdenv.hostPlatform.isDarwin) ''
sed '2i echo Skipping dd sparse test && exit 0' -i ./tests/dd/sparse.sh
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
@@ -40,9 +39,9 @@ stdenv.mkDerivation rec {
configureFlags =
optional (singleBinary != false)
("--enable-single-binary" + optionalString (isString singleBinary) "=${singleBinary}")
++ optional hostPlatform.isSunOS "ac_cv_func_inotify_init=no"
++ optional stdenv.hostPlatform.isSunOS "ac_cv_func_inotify_init=no"
++ optional withPrefix "--program-prefix=g"
++ optionals (hostPlatform != buildPlatform && hostPlatform.libc == "glibc") [
++ optionals (stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform.libc == "glibc") [
# TODO(19b98110126fde7cbb1127af7e3fe1568eacad3d): Needed for fstatfs() I
# don't know why it is not properly detected cross building with glibc.
"fu_cv_sys_stat_statfs2_bsize=yes"
@@ -52,37 +51,37 @@ stdenv.mkDerivation rec {
buildInputs = [ gmp ]
++ optional aclSupport acl
++ optional attrSupport attr
++ optionals hostPlatform.isCygwin [ autoreconfHook texinfo ] # due to patch
++ optionals stdenv.hostPlatform.isCygwin [ autoreconfHook texinfo ] # due to patch
++ optionals selinuxSupport [ libselinux libsepol ]
# TODO(@Ericson2314): Investigate whether Darwin could benefit too
++ optional (hostPlatform != buildPlatform && hostPlatform.libc != "glibc") libiconv;
++ optional (stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform.libc != "glibc") libiconv;
# The tests are known broken on Cygwin
# (http://thread.gmane.org/gmane.comp.gnu.core-utils.bugs/19025),
# Darwin (http://thread.gmane.org/gmane.comp.gnu.core-utils.bugs/19351),
# and {Open,Free}BSD.
# With non-standard storeDir: https://github.com/NixOS/nix/issues/512
doCheck = hostPlatform == buildPlatform
&& hostPlatform.libc == "glibc"
doCheck = stdenv.hostPlatform == stdenv.buildPlatform
&& stdenv.hostPlatform.libc == "glibc"
&& builtins.storeDir == "/nix/store";
# Prevents attempts of running 'help2man' on cross-built binaries.
PERL = if hostPlatform == buildPlatform then null else "missing";
PERL = if stdenv.hostPlatform == stdenv.buildPlatform then null else "missing";
# Saw random failures like help2man: can't get '--help' info from
# man/sha512sum.td/sha512sum.
enableParallelBuilding = false;
NIX_LDFLAGS = optionalString selinuxSupport "-lsepol";
FORCE_UNSAFE_CONFIGURE = optionalString hostPlatform.isSunOS "1";
FORCE_UNSAFE_CONFIGURE = optionalString stdenv.hostPlatform.isSunOS "1";
# Works around a bug with 8.26:
# Makefile:3440: *** Recursive variable 'INSTALL' references itself (eventually). Stop.
preInstall = optionalString (hostPlatform != buildPlatform) ''
preInstall = optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
sed -i Makefile -e 's|^INSTALL =.*|INSTALL = ${buildPackages.coreutils}/bin/install -c|'
'';
postInstall = optionalString (hostPlatform != buildPlatform) ''
postInstall = optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
rm $out/share/man/man1/*
cp ${buildPackages.coreutils}/share/man/man1/* $out/share/man/man1
'';

View File

@@ -32,7 +32,7 @@ in stdenv.mkDerivation rec {
"--with-dynlib=${skalibs.lib}/lib"
]
++ (if stdenv.isDarwin then [ "--disable-shared" ] else [ "--enable-shared" ])
++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.system}");
++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}");
postInstall = ''
mkdir -p $doc/share/doc/execline

View File

@@ -1,6 +1,5 @@
{ stdenv, fetchurl
, coreutils
, buildPlatform, hostPlatform
}:
stdenv.mkDerivation rec {
@@ -17,10 +16,10 @@ stdenv.mkDerivation rec {
# Since glibc-2.25 the i686 tests hang reliably right after test-sleep.
doCheck
= !hostPlatform.isDarwin
&& !(hostPlatform.libc == "glibc" && hostPlatform.isi686)
&& (hostPlatform.libc != "musl")
&& hostPlatform == buildPlatform;
= !stdenv.hostPlatform.isDarwin
&& !(stdenv.hostPlatform.libc == "glibc" && stdenv.hostPlatform.isi686)
&& (stdenv.hostPlatform.libc != "musl")
&& stdenv.hostPlatform == stdenv.buildPlatform;
outputs = [ "out" "info" ];

View File

@@ -28,8 +28,8 @@ let
"aarch64-linux".target = "arm64";
};
canEfi = any (system: stdenv.system == system) (mapAttrsToList (name: _: name) efiSystemsBuild);
inPCSystems = any (system: stdenv.system == system) (mapAttrsToList (name: _: name) pcSystems);
canEfi = any (system: stdenv.hostPlatform.system == system) (mapAttrsToList (name: _: name) efiSystemsBuild);
inPCSystems = any (system: stdenv.hostPlatform.system == system) (mapAttrsToList (name: _: name) pcSystems);
version = "2.02";
@@ -86,14 +86,14 @@ stdenv.mkDerivation rec {
configureFlags = [ "--enable-grub-mount" ] # dep of os-prober
++ optional zfsSupport "--enable-libzfs"
++ optionals efiSupport [ "--with-platform=efi" "--target=${efiSystemsBuild.${stdenv.system}.target}" "--program-prefix=" ]
++ optionals xenSupport [ "--with-platform=xen" "--target=${efiSystemsBuild.${stdenv.system}.target}"];
++ optionals efiSupport [ "--with-platform=efi" "--target=${efiSystemsBuild.${stdenv.hostPlatform.system}.target}" "--program-prefix=" ]
++ optionals xenSupport [ "--with-platform=xen" "--target=${efiSystemsBuild.${stdenv.hostPlatform.system}.target}"];
# save target that grub is compiled for
grubTarget = if efiSupport
then "${efiSystemsInstall.${stdenv.system}.target}-efi"
then "${efiSystemsInstall.${stdenv.hostPlatform.system}.target}-efi"
else if inPCSystems
then "${pcSystems.${stdenv.system}.target}-pc"
then "${pcSystems.${stdenv.hostPlatform.system}.target}-pc"
else "";
doCheck = false;

View File

@@ -22,11 +22,11 @@ stdenv.mkDerivation rec {
tar -cf memdisk.tar grub.cfg
# We include all modules except all_video.mod as otherwise grub will fail printing "no symbol table"
# if we include it.
grub-mkimage -O "${efiSystemsBuild.${stdenv.system}.target}-xen" -c grub-bootstrap.cfg \
-m memdisk.tar -o "grub-${efiSystemsBuild.${stdenv.system}.target}-xen.bin" \
$(ls "${grub2_xen}/lib/grub/${efiSystemsBuild.${stdenv.system}.target}-xen/" |grep 'mod''$'|grep -v '^all_video\.mod''$')
grub-mkimage -O "${efiSystemsBuild.${stdenv.hostPlatform.system}.target}-xen" -c grub-bootstrap.cfg \
-m memdisk.tar -o "grub-${efiSystemsBuild.${stdenv.hostPlatform.system}.target}-xen.bin" \
$(ls "${grub2_xen}/lib/grub/${efiSystemsBuild.${stdenv.hostPlatform.system}.target}-xen/" |grep 'mod''$'|grep -v '^all_video\.mod''$')
mkdir -p "$out/lib/grub-xen"
cp "grub-${efiSystemsBuild.${stdenv.system}.target}-xen.bin" $out/lib/grub-xen/
cp "grub-${efiSystemsBuild.${stdenv.hostPlatform.system}.target}-xen.bin" $out/lib/grub-xen/
'';
meta = with stdenv.lib; {

View File

@@ -10,7 +10,7 @@ let
"x86_64-linux".target = "i386";
};
inPCSystems = any (system: stdenv.system == system) (mapAttrsToList (name: _: name) pcSystems);
inPCSystems = any (system: stdenv.hostPlatform.system == system) (mapAttrsToList (name: _: name) pcSystems);
version = if for_HP_laptop then "1.2.1" else "1.2.0";
@@ -84,7 +84,7 @@ stdenv.mkDerivation rec {
# save target that grub is compiled for
grubTarget = if inPCSystems
then "${pcSystems.${stdenv.system}.target}-pc"
then "${pcSystems.${stdenv.hostPlatform.system}.target}-pc"
else "";
doCheck = false;

View File

@@ -43,13 +43,13 @@ let
] + ":${stdenv.cc.cc.lib}/lib64";
src =
if stdenv.system == "x86_64-linux" then
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "https://downloads.mongodb.com/compass/mongodb-compass_${version}_amd64.deb";
sha256 = "0x23jshnr0rafm5sn2vhq2y2gryg8mksahzyv5fszblgaxay234p";
}
else
throw "MongoDB compass is not supported on ${stdenv.system}";
throw "MongoDB compass is not supported on ${stdenv.hostPlatform.system}";
in stdenv.mkDerivation {
name = "mongodb-compass-${version}";

View File

@@ -2,15 +2,15 @@
let
srcDir =
if stdenv.system == "x86_64-linux" then "linux64"
else if stdenv.system == "i686-linux" then "linux"
else if stdenv.system == "x86_64-darwin" then "macosx64"
if stdenv.hostPlatform.system == "x86_64-linux" then "linux64"
else if stdenv.hostPlatform.system == "i686-linux" then "linux"
else if stdenv.hostPlatform.system == "x86_64-darwin" then "macosx64"
else throwSystem;
throwSystem = throw "Unsupported system: ${stdenv.system}";
throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}";
gwnum =
if stdenv.system == "x86_64-linux" then "make64"
else if stdenv.system == "i686-linux" then "makefile"
else if stdenv.system == "x86_64-darwin" then "makemac"
if stdenv.hostPlatform.system == "x86_64-linux" then "make64"
else if stdenv.hostPlatform.system == "i686-linux" then "makefile"
else if stdenv.hostPlatform.system == "x86_64-darwin" then "makemac"
else throwSystem;
in

View File

@@ -1,7 +1,7 @@
{ fetchurl, stdenv, xorg, freetype, fontconfig, libGLU_combined, glibc, makeWrapper }:
let
system = if stdenv.system == "x86_64-linux" then "linux64" else "linux32";
system = if stdenv.hostPlatform.system == "x86_64-linux" then "linux64" else "linux32";
in
stdenv.mkDerivation rec {
name = "ocz-ssd-guru-${version}";

View File

@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
install -Dt $out/share common.sh
# probes
case "${stdenv.system}" in
case "${stdenv.hostPlatform.system}" in
i686*|x86_64*) ARCH=x86;;
powerpc*) ARCH=powerpc;;
arm*) ARCH=arm;;

View File

@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, premake5, ninja, hostPlatform }:
{ stdenv, fetchFromGitHub, premake5, ninja }:
stdenv.mkDerivation rec {
name = "otfcc-${version}";
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
premake5 ninja
'';
ninjaFlags = let x = if hostPlatform.isi686 then "x86" else "x64"; in
ninjaFlags = let x = if stdenv.hostPlatform.isi686 then "x86" else "x64"; in
[ "-C" "build/ninja" "otfccdump_release_${x}" "otfccbuild_release_${x}" ];
installPhase = ''

View File

@@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
name = "pspg-${version}";
version = "1.3.0";
version = "1.4.2";
src = fetchFromGitHub {
owner = "okbob";
repo = "pspg";
rev = "${version}";
sha256 = "1m63bhhglrpc2g68i5bigrzlpvg98qs83jgvf2gsbc4gnx9hywk5";
sha256 = "0hmx9p5pbydnf8sil4vqpmly5mq2rvcj8a33s9fvfisnxxsqz73v";
};
nativeBuildInputs = [ pkgconfig ];

View File

@@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
# Explicitly setting target ensures code can be compiled against a skalibs
# binary built on a different version of darwin.
# http://www.skarnet.org/cgi-bin/archive.cgi?1:mss:623:heiodchokfjdkonfhdph
++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.system}");
++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}");
postInstall = ''
mkdir -p $doc/share/doc/s6-portable-utils/

View File

@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
name = "staruml-${version}";
src =
if stdenv.system == "i686-linux" then fetchurl {
if stdenv.hostPlatform.system == "i686-linux" then fetchurl {
url = "http://staruml.io/download/release/v${version}/StarUML-v${version}-32-bit.deb";
sha256 = "0vb3k9m3l6pmsid4shlk0xdjsriq3gxzm8q7l04didsppg0vvq1n";
} else fetchurl {

View File

@@ -1,4 +1,4 @@
{ stdenv, fetchurl, buildPlatform }:
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "ttyrec-${version}";
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
patches = [ ./clang-fixes.patch ];
makeFlags = stdenv.lib.optional buildPlatform.isLinux "CFLAGS=-DSVR4"
makeFlags = stdenv.lib.optional stdenv.buildPlatform.isLinux "CFLAGS=-DSVR4"
++ stdenv.lib.optional stdenv.cc.isClang "CC=clang";
installPhase = ''

View File

@@ -15,11 +15,11 @@
buildPythonPackage rec {
pname = "youtube-dl";
version = "2018.08.04";
version = "2018.08.28";
src = fetchurl {
url = "https://yt-dl.org/downloads/${version}/${pname}-${version}.tar.gz";
sha256 = "1hcx99qbbyigc8k98c8bcc6a2wnhq6493fmrkl7rysc8krlxr0pm";
sha256 = "1swdp4czvm0752psbi8a4qw5i9x18s7nhivh7iw92274pmqxq9wi";
};
nativeBuildInputs = [ makeWrapper ];

View File

@@ -6,7 +6,7 @@
let
nodePackages = import ./node.nix {
inherit pkgs;
system = stdenv.system;
system = stdenv.hostPlatform.system;
};
runtimeEnv = buildEnv {

View File

@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
buildInputs = [ go ];
buildPhase = ''
${stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "export GOARM=5"}
${stdenv.lib.optionalString (stdenv.hostPlatform.system == "armv5tel-linux") "export GOARM=5"}
mkdir $TMPDIR/go
export GOPATH=$TMPDIR/go

View File

@@ -4,13 +4,13 @@ with stdenv.lib;
let
arch =
if stdenv.system == "x86_64-linux" then "x64"
else if stdenv.system == "i686-linux" then "x86"
if stdenv.hostPlatform.system == "x86_64-linux" then "x64"
else if stdenv.hostPlatform.system == "i686-linux" then "x86"
else throwSystem;
throwSystem = throw "Unsupported system: ${stdenv.system}";
throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}";
sha256 =
if stdenv.system == "x86_64-linux" then "11mxa4kls5xjj3462ycrfvfxb1xkk23p5m9iirvwsi0zdmhpnwm8"
else if stdenv.system == "i686-linux" then "03ml9xv19km99f0z7fpr21b1zkxvw7q39kjzd8wpb2pds51wnc62"
if stdenv.hostPlatform.system == "x86_64-linux" then "11mxa4kls5xjj3462ycrfvfxb1xkk23p5m9iirvwsi0zdmhpnwm8"
else if stdenv.hostPlatform.system == "i686-linux" then "03ml9xv19km99f0z7fpr21b1zkxvw7q39kjzd8wpb2pds51wnc62"
else throwSystem;
libraries = stdenv.lib.makeLibraryPath [ stdenv.cc.cc ];

View File

@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
} else if stdenv.isDarwin then fetchurl {
url = "https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-darwin-386.zip";
sha256 = "0yfd250b55wcpgqd00rqfaa7a82f35fmybb31q5xwdbgc2i47pbh";
} else throw "platform ${stdenv.system} not supported!";
} else throw "platform ${stdenv.hostPlatform.system} not supported!";
sourceRoot = ".";

View File

@@ -33,7 +33,7 @@ in stdenv.mkDerivation rec {
"--with-dynlib=${skalibs.lib}/lib"
]
++ (if stdenv.isDarwin then [ "--disable-shared" ] else [ "--enable-shared" ])
++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.system}");
++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}");
postInstall = ''
mkdir -p $doc/share/doc/s6-dns/

View File

@@ -61,7 +61,7 @@ stdenv.mkDerivation rec {
"--with-include=${lib.getDev sslLibs.${sslSupport}}/include"
"--with-lib=${lib.getLib sslLibs.${sslSupport}}/lib"
])
++ (lib.optional stdenv.isDarwin "--build=${stdenv.system}");
++ (lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}");
postInstall = ''
mkdir -p $doc/share/doc/s6-networking/

View File

@@ -68,7 +68,7 @@ stdenv.mkDerivation rec {
"--enable-af-alg" "--enable-xauth-pam" "--enable-chapoly"
"--enable-curl" ]
++ optionals stdenv.isx86_64 [ "--enable-aesni" "--enable-rdrand" ]
++ optional (stdenv.system == "i686-linux") "--enable-padlock"
++ optional (stdenv.hostPlatform.system == "i686-linux") "--enable-padlock"
++ optionals enableTNC [
"--disable-gmp" "--disable-aes" "--disable-md5" "--disable-sha1" "--disable-sha2" "--disable-fips-prf"
"--enable-eap-tnc" "--enable-eap-ttls" "--enable-eap-dynamic" "--enable-tnccs-20"

View File

@@ -2,7 +2,7 @@
{ pkgs }:
with pkgs;
let kernel = buildPlatform.parsed.kernel.name;
let kernel = stdenv.buildPlatform.parsed.kernel.name;
updateFeatures = f: up: functions: builtins.deepSeq f (lib.lists.foldl' (features: fun: fun features) (lib.attrsets.recursiveUpdate f up) functions);
mapFeatures = features: map (fun: fun { features = features; });
mkFeatures = feat: lib.lists.foldl (features: featureName:

View File

@@ -1,7 +1,7 @@
# Generated by carnix 0.6.6: carnix -o cargo-update.nix --src ./. Cargo.lock --standalone
{ lib, buildPlatform, buildRustCrate, fetchgit }:
let kernel = buildPlatform.parsed.kernel.name;
abi = buildPlatform.parsed.abi.name;
{ lib, stdenv, buildRustCrate, fetchgit }:
let kernel = stdenv.hostPlatform.parsed.kernel.name;
abi = stdenv.hostPlatform.parsed.abi.name;
include = includedFiles: src: builtins.filterSource (path: type:
lib.lists.any (f:
let p = toString (src + ("/" + f)); in

View File

@@ -37,7 +37,7 @@ stdenv.mkDerivation {
./set-buildroot.patch
]
++ stdenv.lib.optional (stdenv.system == "x86_64-linux")
++ stdenv.lib.optional (stdenv.hostPlatform.system == "x86_64-linux")
# Force use of old memcpy so that installwatch works on Glibc <
# 2.14.
./use-old-memcpy.patch;

View File

@@ -2,7 +2,6 @@
, pkgconfig, boehmgc, perlPackages, libsodium, aws-sdk-cpp, brotli, boost
, autoreconfHook, autoconf-archive, bison, flex, libxml2, libxslt, docbook5, docbook_xsl_ns
, busybox-sandbox-shell
, hostPlatform, buildPlatform
, storeDir ? "/nix/store"
, stateDir ? "/nix/var"
, confDir ? "/etc"
@@ -73,8 +72,8 @@ let
"--with-sandbox-shell=${sh}/bin/busybox"
]
++ lib.optional (
hostPlatform != buildPlatform && hostPlatform ? nix && hostPlatform.nix ? system
) ''--with-system=${hostPlatform.nix.system}''
stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform ? nix && stdenv.hostPlatform.nix ? system
) ''--with-system=${stdenv.hostPlatform.nix.system}''
# RISC-V support in progress https://github.com/seccomp/libseccomp/pull/50
++ lib.optional (!libseccomp.meta.available) "--disable-seccomp-sandboxing";

View File

@@ -9,7 +9,7 @@ let
};
nixui = (import ./nixui.nix {
inherit pkgs;
inherit (stdenv) system;
inherit (stdenv.hostPlatform) system;
})."nixui-git://github.com/matejc/nixui.git#0.2.1";
script = writeScript "nixui" ''
#! ${stdenv.shell}

View File

@@ -4,9 +4,9 @@
let
afl-qemu = callPackage ./qemu.nix {};
qemu-exe-name = if stdenv.system == "x86_64-linux" then "qemu-x86_64"
else if stdenv.system == "i686-linux" then "qemu-i386"
else throw "afl: no support for ${stdenv.system}!";
qemu-exe-name = if stdenv.hostPlatform.system == "x86_64-linux" then "qemu-x86_64"
else if stdenv.hostPlatform.system == "i686-linux" then "qemu-i386"
else throw "afl: no support for ${stdenv.hostPlatform.system}!";
in
stdenv.mkDerivation rec {

View File

@@ -16,9 +16,9 @@ let
aflTypesFile = writeText "afl-types.h"
(builtins.readFile ./qemu-patches/afl-types.h);
cpuTarget = if stdenv.system == "x86_64-linux" then "x86_64-linux-user"
else if stdenv.system == "i686-linux" then "i386-linux-user"
else throw "afl: no support for ${stdenv.system}!";
cpuTarget = if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64-linux-user"
else if stdenv.hostPlatform.system == "i686-linux" then "i386-linux-user"
else throw "afl: no support for ${stdenv.hostPlatform.system}!";
in
stdenv.mkDerivation rec {
name = "afl-${n}";
@@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
vde2 texinfo libuuid flex bison lzo snappy autoconf
libcap_ng gnutls
]
++ optionals (hasSuffix "linux" stdenv.system) [ libaio ];
++ optionals (hasSuffix "linux" stdenv.hostPlatform.system) [ libaio ];
enableParallelBuilding = true;

View File

@@ -5,13 +5,13 @@
}:
let
arch = if stdenv.system == "x86_64-linux" then "amd"
else if stdenv.system == "i686-linux" then "i386"
else throw "Encryptr for ${stdenv.system} not supported!";
arch = if stdenv.hostPlatform.system == "x86_64-linux" then "amd"
else if stdenv.hostPlatform.system == "i686-linux" then "i386"
else throw "Encryptr for ${stdenv.hostPlatform.system} not supported!";
sha256 = if stdenv.system == "x86_64-linux" then "1j3g467g7ar86hpnh6q9mf7mh2h4ia94mwhk1283zh739s2g53q2"
else if stdenv.system == "i686-linux" then "02j9hg9b1jlv25q1sjfhv8d46mii33f94dj0ccn83z9z18q4y2cm"
else throw "Encryptr for ${stdenv.system} not supported!";
sha256 = if stdenv.hostPlatform.system == "x86_64-linux" then "1j3g467g7ar86hpnh6q9mf7mh2h4ia94mwhk1283zh739s2g53q2"
else if stdenv.hostPlatform.system == "i686-linux" then "02j9hg9b1jlv25q1sjfhv8d46mii33f94dj0ccn83z9z18q4y2cm"
else throw "Encryptr for ${stdenv.hostPlatform.system} not supported!";
in stdenv.mkDerivation rec {
name = "encryptr-${version}";

View File

@@ -1,8 +1,9 @@
{stdenv, system, fetchurl, dpkg, openssl, xorg
{ stdenv, fetchurl, dpkg, openssl, xorg
, glib, libGLU_combined, libpulseaudio, zlib, dbus, fontconfig, freetype
, gtk2, pango, atk, cairo, gdk_pixbuf, jasper, xkeyboardconfig
, makeWrapper , python, pythonPackages, lib
, libredirect, lsof}:
, libredirect, lsof
}:
let
all_data = builtins.fromJSON (builtins.readFile ./data.json);
@@ -11,7 +12,7 @@ let
x86_64-linux = "amd64";
};
data = all_data.${system_map.${system} or (throw "Unsupported platform")};
data = all_data.${system_map.${stdenv.hostPlatform.system} or (throw "Unsupported platform")};
baseUrl = http://repo.sinew.in;

View File

@@ -1,9 +1,9 @@
{ stdenv, fetchurl, unzip, libusb }:
let
arch = if stdenv.system == "i686-linux" then "32"
else if stdenv.system == "x86_64-linux" then "64"
else throw "Unsupported system: ${stdenv.system}";
arch = if stdenv.hostPlatform.system == "i686-linux" then "32"
else if stdenv.hostPlatform.system == "x86_64-linux" then "64"
else throw "Unsupported system: ${stdenv.hostPlatform.system}";
in
stdenv.mkDerivation rec {
name = "pcsc-scm-scl-${version}";

View File

@@ -12,7 +12,7 @@ python3Packages.buildPythonApplication rec {
patches = [ ./sudo.patch ];
nativeBuildInputs = [ makeWrapper python3Packages.setuptools_scm ] ++ stdenv.lib.optional (stdenv.system != "i686-linux") pandoc;
nativeBuildInputs = [ makeWrapper python3Packages.setuptools_scm ] ++ stdenv.lib.optional (stdenv.hostPlatform.system != "i686-linux") pandoc;
buildInputs =
[ coreutils openssh procps nettools ]
++ stdenv.lib.optionals stdenv.isLinux [ iptables ];

View File

@@ -5,12 +5,12 @@
stdenv.mkDerivation rec {
name = "at-${version}";
version = "3.1.20";
version = "3.1.23";
src = fetchurl {
# Debian is apparently the last location where it can be found.
url = "mirror://debian/pool/main/a/at/at_${version}.orig.tar.gz";
sha256 = "1fgsrqpx0r6qcjxmlsqnwilydhfxn976c870mjc0n1bkmcy94w88";
sha256 = "040pr2ivfbrhvrhzis97cpwfkzpr7nin33nc301aga5aajlhlicp";
};
patches = [

View File

@@ -0,0 +1,36 @@
{ stdenv, fetchFromGitHub, bash }:
stdenv.mkDerivation rec {
name = "incron-0.5.12";
src = fetchFromGitHub {
owner = "ar-";
repo = "incron";
rev = name;
sha256 = "11d5f98cjafiv9h9zzzrw2s06s2fvdg8gp64km7mdprd2xmy6dih";
};
patches = [ ./default_path.patch ];
prePatch = ''
sed -i "s|/bin/bash|${bash}/bin/bash|g" usertable.cpp
'';
installFlags = [ "PREFIX=$(out)" ];
installTargets = [ "install-man" ];
preInstall = ''
mkdir -p $out/bin
# make install doesn't work because setuid and permissions
# just manually install the binaries instead
cp incrond incrontab $out/bin/
'';
meta = with stdenv.lib; {
description = "A cron-like daemon which handles filesystem events.";
homepage = https://github.com/ar-/incron;
license = licenses.gpl2;
maintainers = [ maintainers.aanderse ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,36 @@
diff --git usertable.cpp usertable.cpp
index 11fd04b..a8681bd 100644
--- a/usertable.cpp
+++ b/usertable.cpp
@@ -43,9 +43,6 @@
#define DONT_FOLLOW(mask) (false)
#endif // IN_DONT_FOLLOW
-// this is not enough, but...
-#define DEFAULT_PATH "/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin"
-
PROC_MAP UserTable::s_procMap;
@@ -597,12 +594,20 @@ void UserTable::RunAsUser(std::string cmd) const
if (clearenv() != 0)
goto failed;
+ // try to recreate the user path as best as possible
+ std::string DEFAULT_PATH;
+ DEFAULT_PATH += "/run/wrappers/bin:";
+ DEFAULT_PATH += pwd->pw_dir;
+ DEFAULT_PATH += "/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/etc/profiles/per-user/";
+ DEFAULT_PATH += pwd->pw_name;
+ DEFAULT_PATH += "/bin";
+
if ( setenv("LOGNAME", pwd->pw_name, 1) != 0
|| setenv("USER", pwd->pw_name, 1) != 0
|| setenv("USERNAME", pwd->pw_name, 1) != 0
|| setenv("HOME", pwd->pw_dir, 1) != 0
|| setenv("SHELL", pwd->pw_shell, 1) != 0
- || setenv("PATH", DEFAULT_PATH, 1) != 0)
+ || setenv("PATH", DEFAULT_PATH.c_str(), 1) != 0)
{
goto failed;
}

View File

@@ -39,7 +39,7 @@ in stdenv.mkDerivation rec {
"--with-dynlib=${s6.out}/lib"
]
++ (if stdenv.isDarwin then [ "--disable-shared" ] else [ "--enable-shared" ])
++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.system}");
++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}");
postInstall = ''
mkdir -p $doc/share/doc/s6-rc/

View File

@@ -40,7 +40,7 @@ in stdenv.mkDerivation rec {
"--with-dynlib=${execline.lib}/lib"
]
++ (if stdenv.isDarwin then [ "--disable-shared" ] else [ "--enable-shared" ])
++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.system}");
++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}");
postInstall = ''
mkdir -p $doc/share/doc/s6/

View File

@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
mkdir $TMPDIR/go
export GOPATH=$TMPDIR/go
${stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "export GOARM=5"}
${stdenv.lib.optionalString (stdenv.hostPlatform.system == "armv5tel-linux") "export GOARM=5"}
GOSQLITE=$GOPATH/src/code.google.com/p/gosqlite
mkdir -p $GOSQLITE

View File

@@ -1,6 +1,6 @@
{ stdenv, fetchurl
# TODO: links -lsigsegv but loses the reference for some reason
, withSigsegv ? (false && stdenv.system != "x86_64-cygwin"), libsigsegv
, withSigsegv ? (false && stdenv.hostPlatform.system != "x86_64-cygwin"), libsigsegv
, interactive ? false, readline
/* Test suite broke on:

View File

@@ -1,6 +1,5 @@
{ stdenv, fetchurl
, ed, autoreconfHook
, buildPlatform, hostPlatform
}:
stdenv.mkDerivation rec {
@@ -27,11 +26,11 @@ stdenv.mkDerivation rec {
buildInputs = stdenv.lib.optional doCheck ed;
nativeBuildInputs = [ autoreconfHook ];
configureFlags = stdenv.lib.optionals (hostPlatform != buildPlatform) [
configureFlags = stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"ac_cv_func_strnlen_working=yes"
];
doCheck = hostPlatform.libc != "musl"; # not cross;
doCheck = stdenv.hostPlatform.libc != "musl"; # not cross;
meta = {
description = "GNU Patch, a program to apply differences to files";

View File

@@ -1,6 +1,4 @@
{ stdenv, fetchFromGitHub, cmake, libxslt
, hostPlatform
}:
{ stdenv, fetchFromGitHub, cmake, libxslt }:
stdenv.mkDerivation rec {
name = "html-tidy-${version}";
@@ -16,7 +14,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake libxslt/*manpage*/ ];
cmakeFlags = stdenv.lib.optional
(hostPlatform.libc or null == "msvcrt") "-DCMAKE_SYSTEM_NAME=Windows";
(stdenv.hostPlatform.libc or null == "msvcrt") "-DCMAKE_SYSTEM_NAME=Windows";
# ATM bin/tidy is statically linked, as upstream provides no other option yet.
# https://github.com/htacg/tidy-html5/issues/326#issuecomment-160322107

View File

@@ -11,17 +11,17 @@ stdenv.mkDerivation rec {
#};
src =
if stdenv.system == "x86_64-linux" then
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "mirror://sourceforge/videlibri/Xidel/Xidel%20${version}/xidel_${version}-1_amd64.deb";
sha256 = "0hskc74y7p4j1x33yx0w4fvr610p2yimas8pxhr6bs7mb9b300h7";
}
else if stdenv.system == "i686-linux" then
else if stdenv.hostPlatform.system == "i686-linux" then
fetchurl {
url = "mirror://sourceforge/videlibri/Xidel/Xidel%20${version}/xidel_${version}-1_i386.deb";
sha256 = "07yk5sk1p4jm0jmgjwdm2wq8d2wybi1wkn1qq5j5y03z1pdc3fi6";
}
else throw "xidel is not supported on ${stdenv.system}";
else throw "xidel is not supported on ${stdenv.hostPlatform.system}";
buildInputs = [ dpkg ];

View File

@@ -11,7 +11,7 @@ let
"i686-darwin" = "0zniyn0s41fxqrajbgwxbcsj5vzf9m7a6yvdz2b11mphr00kpbbs";
"x86_64-cygwin" = "02slfh1bbpijay4skj85cjiv7z43ha8vm5aa1lwiqjk86qbl1f3h";
"i686-cygwin" = "02slfh1bbpijay4skj85cjiv7z43ha8vm5aa1lwiqjk86qbl1f3h";
}."${stdenv.system}" or (throw "system #{stdenv.system.} is not supported");
}."${stdenv.hostPlatform.system}" or (throw "system #{stdenv.hostPlatform.system.} is not supported");
url = {
"x86_64-linux" = "http://kindlegen.s3.amazonaws.com/kindlegen_linux_2.6_i386_v${fileVersion}.tar.gz";
@@ -20,7 +20,7 @@ let
"i686-darwin" = "http://kindlegen.s3.amazonaws.com/KindleGen_Mac_i386_v${fileVersion}.zip";
"x86_64-cygwin" = "http://kindlegen.s3.amazonaws.com/kindlegen_win32_v${fileVersion}.zip";
"i686-cygwin" = "http://kindlegen.s3.amazonaws.com/kindlegen_win32_v${fileVersion}.zip";
}."${stdenv.system}" or (throw "system #{stdenv.system.} is not supported");
}."${stdenv.hostPlatform.system}" or (throw "system #{stdenv.hostPlatform.system.} is not supported");
in stdenv.mkDerivation rec {
name = "kindlegen-${version}";