Merge branch 'master' into gcc-7

This commit is contained in:
Shea Levy 2018-02-18 16:25:27 -05:00
commit 32ce7012f0
No known key found for this signature in database
GPG Key ID: 5C0BD6957D86FE27
69 changed files with 1706 additions and 150 deletions

View File

@ -68,6 +68,14 @@ rec {
musl64 = { config = "x86_64-unknown-linux-musl"; }; musl64 = { config = "x86_64-unknown-linux-musl"; };
musl32 = { config = "i686-unknown-linux-musl"; }; musl32 = { config = "i686-unknown-linux-musl"; };
riscv = bits: {
config = "riscv${bits}-unknown-linux-gnu";
platform = platforms.riscv-multiplatform bits;
};
riscv64 = riscv "64";
riscv32 = riscv "32";
# #
# Darwin # Darwin
# #

View File

@ -541,6 +541,12 @@ rec {
}; };
}; };
riscv-multiplatform = bits: {
name = "riscv-multiplatform";
kernelArch = "riscv";
bfdEmulation = "elf${bits}lriscv";
};
selectBySystem = system: { selectBySystem = system: {
"i686-linux" = pc32; "i686-linux" = pc32;
"x86_64-linux" = pc64; "x86_64-linux" = pc64;

View File

@ -694,6 +694,7 @@
./services/x11/xserver.nix ./services/x11/xserver.nix
./system/activation/activation-script.nix ./system/activation/activation-script.nix
./system/activation/top-level.nix ./system/activation/top-level.nix
./system/boot/binfmt.nix
./system/boot/coredump.nix ./system/boot/coredump.nix
./system/boot/emergency-mode.nix ./system/boot/emergency-mode.nix
./system/boot/grow-partition.nix ./system/boot/grow-partition.nix

View File

@ -414,7 +414,10 @@ in
postmasterAlias = mkOption { postmasterAlias = mkOption {
type = types.str; type = types.str;
default = "root"; default = "root";
description = "Who should receive postmaster e-mail."; description = "
Who should receive postmaster e-mail. Multiple values can be added by
separating values with comma.
";
}; };
rootAlias = mkOption { rootAlias = mkOption {
@ -422,6 +425,7 @@ in
default = ""; default = "";
description = " description = "
Who should receive root e-mail. Blank for no redirection. Who should receive root e-mail. Blank for no redirection.
Multiple values can be added by separating values with comma.
"; ";
}; };

View File

@ -0,0 +1,139 @@
{ config, lib, ... }:
let
inherit (lib) mkOption types optionalString;
cfg = config.boot.binfmtMiscRegistrations;
makeBinfmtLine = name: { recognitionType, offset, magicOrExtension
, mask, preserveArgvZero, openBinary
, matchCredentials, fixBinary, ...
}: let
type = if recognitionType == "magic" then "M" else "E";
offset' = toString offset;
mask' = toString mask;
interpreter = "/run/binfmt/${name}";
flags = if !(matchCredentials -> openBinary)
then throw "boot.binfmtMiscRegistrations.${name}: you can't specify openBinary = false when matchCredentials = true."
else optionalString preserveArgvZero "P" +
optionalString (openBinary && !matchCredentials) "O" +
optionalString matchCredentials "C" +
optionalString fixBinary "F";
in ":${name}:${type}:${offset'}:${magicOrExtension}:${mask'}:${interpreter}:${flags}";
binfmtFile = builtins.toFile "binfmt_nixos.conf"
(lib.concatStringsSep "\n" (lib.mapAttrsToList makeBinfmtLine cfg));
activationSnippet = name: { interpreter, ... }:
"ln -sf ${interpreter} /run/binfmt/${name}";
activationScript = ''
mkdir -p -m 0755 /run/binfmt
${lib.concatStringsSep "\n" (lib.mapAttrsToList activationSnippet cfg)}
'';
in {
options = {
boot.binfmtMiscRegistrations = mkOption {
default = {};
description = ''
Extra binary formats to register with the kernel.
See https://www.kernel.org/doc/html/latest/admin-guide/binfmt-misc.html for more details.
'';
type = types.attrsOf (types.submodule ({ config, ... }: {
options = {
recognitionType = mkOption {
default = "magic";
description = "Whether to recognize executables by magic number or extension.";
type = types.enum [ "magic" "extension" ];
};
offset = mkOption {
default = null;
description = "The byte offset of the magic number used for recognition.";
type = types.nullOr types.int;
};
magicOrExtension = mkOption {
description = "The magic number or extension to match on.";
type = types.str;
};
mask = mkOption {
default = null;
description =
"A mask to be ANDed with the byte sequence of the file before matching";
type = types.nullOr types.str;
};
interpreter = mkOption {
description = ''
The interpreter to invoke to run the program.
Note that the actual registration will point to
/run/binfmt/''${name}, so the kernel interpreter length
limit doesn't apply.
'';
type = types.path;
};
preserveArgvZero = mkOption {
default = false;
description = ''
Whether to pass the original argv[0] to the interpreter.
See the description of the 'P' flag in the kernel docs
for more details;
'';
type = types.bool;
};
openBinary = mkOption {
default = config.matchCredentials;
description = ''
Whether to pass the binary to the interpreter as an open
file descriptor, instead of a path.
'';
type = types.bool;
};
matchCredentials = mkOption {
default = false;
description = ''
Whether to launch with the credentials and security
token of the binary, not the interpreter (e.g. setuid
bit).
See the description of the 'C' flag in the kernel docs
for more details.
Implies/requires openBinary = true.
'';
type = types.bool;
};
fixBinary = mkOption {
default = false;
description = ''
Whether to open the interpreter file as soon as the
registration is loaded, rather than waiting for a
relevant file to be invoked.
See the description of the 'F' flag in the kernel docs
for more details.
'';
type = types.bool;
};
};
}));
};
};
config = lib.mkIf (cfg != {}) {
environment.etc."binfmt.d/nixos.conf".source = binfmtFile;
system.activationScripts.binfmt = activationScript;
systemd.additionalUpstreamSystemUnits =
[ "proc-sys-fs-binfmt_misc.automount"
"proc-sys-fs-binfmt_misc.mount"
];
};
}

View File

@ -2,17 +2,27 @@ import ./make-test.nix ({ pkgs, ... }:
let let
configDir = "/var/lib/foobar"; configDir = "/var/lib/foobar";
apiPassword = "secret";
in { in {
name = "home-assistant"; name = "home-assistant";
meta = with pkgs.stdenv.lib; {
maintainers = with maintainers; [ dotlambda ];
};
nodes = { nodes = {
hass = hass =
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
environment.systemPackages = with pkgs; [
mosquitto
];
services.home-assistant = { services.home-assistant = {
inherit configDir; inherit configDir;
enable = true; enable = true;
package = pkgs.home-assistant.override {
extraPackages = ps: with ps; [ hbmqtt ];
};
config = { config = {
homeassistant = { homeassistant = {
name = "Home"; name = "Home";
@ -22,7 +32,16 @@ in {
elevation = 0; elevation = 0;
}; };
frontend = { }; frontend = { };
http = { }; http.api_password = apiPassword;
mqtt = { }; # Use hbmqtt as broker
binary_sensor = [
{
platform = "mqtt";
state_topic = "home-assistant/test";
payload_on = "let_there_be_light";
payload_off = "off";
}
];
}; };
}; };
}; };
@ -31,7 +50,7 @@ in {
testScript = '' testScript = ''
startAll; startAll;
$hass->waitForUnit("home-assistant.service"); $hass->waitForUnit("home-assistant.service");
# Since config is specified using a Nix attribute set, # Since config is specified using a Nix attribute set,
# configuration.yaml is a link to the Nix store # configuration.yaml is a link to the Nix store
$hass->succeed("test -L ${configDir}/configuration.yaml"); $hass->succeed("test -L ${configDir}/configuration.yaml");
@ -39,8 +58,19 @@ in {
# Check that Home Assistant's web interface and API can be reached # Check that Home Assistant's web interface and API can be reached
$hass->waitForOpenPort(8123); $hass->waitForOpenPort(8123);
$hass->succeed("curl --fail http://localhost:8123/states"); $hass->succeed("curl --fail http://localhost:8123/states");
$hass->succeed("curl --fail http://localhost:8123/api/ | grep 'API running'"); $hass->succeed("curl --fail -H 'x-ha-access: ${apiPassword}' http://localhost:8123/api/ | grep -qF 'API running'");
# Toggle a binary sensor using MQTT
$hass->succeed("curl http://localhost:8123/api/states/binary_sensor.mqtt_binary_sensor -H 'x-ha-access: ${apiPassword}' | grep -qF '\"state\": \"off\"'");
$hass->waitUntilSucceeds("mosquitto_pub -V mqttv311 -t home-assistant/test -u homeassistant -P '${apiPassword}' -m let_there_be_light");
$hass->succeed("curl http://localhost:8123/api/states/binary_sensor.mqtt_binary_sensor -H 'x-ha-access: ${apiPassword}' | grep -qF '\"state\": \"on\"'");
# Check that no errors were logged
$hass->fail("cat ${configDir}/home-assistant.log | grep -qF ERROR"); $hass->fail("cat ${configDir}/home-assistant.log | grep -qF ERROR");
# Print log to ease debugging
my $log = $hass->succeed("cat ${configDir}/home-assistant.log");
print "\n### home-assistant.log ###\n";
print "$log\n";
''; '';
}) })

View File

@ -54,14 +54,13 @@ let
in pythonPackages.buildPythonApplication rec { in pythonPackages.buildPythonApplication rec {
name = "OctoPrint-${version}"; name = "OctoPrint-${version}";
version = "1.3.5"; version = "1.3.6";
# 1.3.5, 2017-10-16, 77753ca02602d3a798d6b0a22535e6fd69ff448a
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "foosel"; owner = "foosel";
repo = "OctoPrint"; repo = "OctoPrint";
rev = version; rev = version;
sha256 = "13krv9i6gm4jn4cb327q4qma4xwwashjnc0dia8vlnbjbbvkrni4"; sha256 = "0pgpkjw5zjnks5bky51gjaksq8mhrzkl52kpgf799hl35pd08xr3";
}; };
# We need old Tornado # We need old Tornado
@ -70,7 +69,7 @@ in pythonPackages.buildPythonApplication rec {
semantic-version flask_principal werkzeug flaskbabel tornado semantic-version flask_principal werkzeug flaskbabel tornado
psutil pyserial flask_login netaddr markdown sockjs-tornado psutil pyserial flask_login netaddr markdown sockjs-tornado
pylru pyyaml sarge feedparser netifaces click websocket_client pylru pyyaml sarge feedparser netifaces click websocket_client
scandir chainmap future dateutil futures wrapt scandir chainmap future dateutil futures wrapt monotonic emoji
]; ];
buildInputs = with pythonPackages; [ nose mock ddt ]; buildInputs = with pythonPackages; [ nose mock ddt ];

View File

@ -41,7 +41,10 @@ stdenv.mkDerivation rec {
pythonPath = [ pygobject3 pyxdg ]; pythonPath = [ pygobject3 pyxdg ];
preConfigure = "./bootstrap"; preConfigure = "./bootstrap";
postFixup = "wrapPythonPrograms"; postFixup = ''
wrapPythonPrograms
rm "$out/share/icons/hicolor/icon-theme.cache"
'';
enableParallelBuilding = true; enableParallelBuilding = true;

View File

@ -10,14 +10,14 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "palemoon-${version}"; name = "palemoon-${version}";
version = "27.6.2"; version = "27.7.2";
src = fetchFromGitHub { src = fetchFromGitHub {
name = "palemoon-src"; name = "palemoon-src";
owner = "MoonchildProductions"; owner = "MoonchildProductions";
repo = "Pale-Moon"; repo = "Pale-Moon";
rev = version + "_Release"; rev = version + "_Release";
sha256 = "0ickxrwl36iyqj3v9qq6hnfl2y652f2ppwi949pfh4f6shm9x0ri"; sha256 = "19ki6gp6bhcvhjnclalviiyp93mqsgc22xjl0gm9x5y4sxdb5wlq";
}; };
desktopItem = makeDesktopItem { desktopItem = makeDesktopItem {
@ -101,10 +101,20 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "A web browser"; description = "A web browser";
longDescription = ''
Pale Moon is an Open Source, Goanna-based web browser focusing on
efficiency and customization.
Pale Moon offers you a browsing experience in a browser completely built
from its own, independently developed source that has been forked off from
Firefox/Mozilla code a number of years ago, with carefully selected
features and optimizations to improve the browser's stability and user
experience, while offering full customization and a growing collection of
extensions and themes to make the browser truly your own.
'';
homepage = https://www.palemoon.org/; homepage = https://www.palemoon.org/;
license = licenses.mpl20; license = licenses.mpl20;
maintainers = with maintainers; [ rnhmjoj ]; maintainers = with maintainers; [ rnhmjoj AndersonTorres ];
platforms = platforms.linux; platforms = platforms.linux;
}; };
} }

View File

@ -28,6 +28,7 @@ in stdenv.mkDerivation rec {
pythonPath = with python3Packages; [ pygobject3 pycairo ]; pythonPath = with python3Packages; [ pygobject3 pycairo ];
preFixup = '' preFixup = ''
rm "$out/share/icons/hicolor/icon-theme.cache"
buildPythonPath "$out $pythonPath" buildPythonPath "$out $pythonPath"
gappsWrapperArgs+=(--prefix PYTHONPATH : "$program_PYTHONPATH") gappsWrapperArgs+=(--prefix PYTHONPATH : "$program_PYTHONPATH")
''; '';

View File

@ -18,8 +18,8 @@
with stdenv.lib; with stdenv.lib;
let let
version = "2.11.0"; version = "2.11.1";
sha256 = "1jvzw6rdhimn583dz6an8xiw07n3ycvxmj3jpv1s312scv3k9w64"; sha256 = "1jrcff0szyjxc3vywyiclwdzk0xgq4cxvjbvmcfyjcpdrq9j5pyr";
audio = optionalString (hasSuffix "linux" stdenv.system) "alsa," audio = optionalString (hasSuffix "linux" stdenv.system) "alsa,"
+ optionalString pulseSupport "pa," + optionalString pulseSupport "pa,"
+ optionalString sdlSupport "sdl,"; + optionalString sdlSupport "sdl,";
@ -61,7 +61,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true; enableParallelBuilding = true;
patches = [ ./no-etc-install.patch ] patches = [ ./no-etc-install.patch ./statfs-flags.patch ]
++ optional nixosTestRunner ./force-uid0-on-9p.patch ++ optional nixosTestRunner ./force-uid0-on-9p.patch
++ optional pulseSupport ./fix-hda-recording.patch; ++ optional pulseSupport ./fix-hda-recording.patch;

View File

@ -0,0 +1,20 @@
{ qemu, fetchFromGitHub, lib }: let
src = fetchFromGitHub {
owner = "riscv";
repo = "riscv-qemu";
rev = "af435b709d4a5de3ec2e59ff4dcd05b0b295a730";
sha256 = "1kqcsn8yfdg3zyd991i4v5dxznd1l4a4hjry9304lvsm3sz2wllw";
fetchSubmodules = true;
};
version = "2.11.50";
revCount = "58771";
shortRev = "af435b709d";
targets = [ "riscv32-linux-user" "riscv32-softmmu"
"riscv64-linux-user" "riscv64-softmmu"
];
in lib.overrideDerivation qemu (orig: {
name = "${(builtins.parseDrvName qemu.name).name}-${version}pre${revCount}_${shortRev}";
inherit src;
configureFlags = orig.configureFlags ++ [ "--target-list=${lib.concatStringsSep "," targets}" ];
postInstall = null;
})

View File

@ -0,0 +1,200 @@
commit d3282d2512774dc5027c98930a3852b2b6e8407a
Author: Shea Levy <shea@shealevy.com>
Date: Sun Feb 18 13:50:11 2018 -0500
linux-user: Support f_flags in statfs when available.
Signed-off-by: Shea Levy <shea@shealevy.com>
diff --git a/configure b/configure
index 913e14839d..52fe2bf941 100755
--- a/configure
+++ b/configure
@@ -5303,6 +5303,22 @@ if compile_prog "" "" ; then
have_utmpx=yes
fi
+##########################################
+# Check for newer fields of struct statfs on Linux
+
+if test "$linux_user" = "yes"; then
+ cat > $TMPC <<EOF
+#include <sys/vfs.h>
+
+int main(void) {
+ struct statfs fs;
+ fs.f_flags = 0;
+}
+EOF
+ if compile_object ; then
+ have_statfs_flags=yes
+ fi
+fi
##########################################
# checks for sanitizers
@@ -6518,6 +6534,10 @@ if test "$have_utmpx" = "yes" ; then
echo "HAVE_UTMPX=y" >> $config_host_mak
fi
+if test "$have_statfs_flags" = "yes" ; then
+ echo "HAVE_STATFS_FLAGS=y" >> $config_host_mak
+fi
+
if test "$ivshmem" = "yes" ; then
echo "CONFIG_IVSHMEM=y" >> $config_host_mak
fi
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 82b35a6bdf..77481eca2c 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -9534,6 +9534,9 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
__put_user(stfs.f_fsid.__val[1], &target_stfs->f_fsid.val[1]);
__put_user(stfs.f_namelen, &target_stfs->f_namelen);
__put_user(stfs.f_frsize, &target_stfs->f_frsize);
+#ifdef HAVE_STATFS_FLAGS
+ __put_user(stfs.f_flags, &target_stfs->f_flags);
+#endif
memset(target_stfs->f_spare, 0, sizeof(target_stfs->f_spare));
unlock_user_struct(target_stfs, arg2, 1);
}
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index a35c52a60a..9f90451caf 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -362,7 +362,14 @@ struct kernel_statfs {
int f_ffree;
kernel_fsid_t f_fsid;
int f_namelen;
+#ifdef HAVE_STATFS_FLAGS
+ int f_frsize;
+ int f_flags;
+ int f_spare[4];
+#else
int f_spare[6];
+#endif
+
};
struct target_dirent {
@@ -2223,7 +2230,13 @@ struct target_statfs {
/* Linux specials */
target_fsid_t f_fsid;
int32_t f_namelen;
+#ifdef HAVE_STATFS_FLAGS
+ int32_t f_frsize;
+ int32_t f_flags;
+ int32_t f_spare[4];
+#else
int32_t f_spare[6];
+#endif
};
#else
struct target_statfs {
@@ -2239,7 +2252,13 @@ struct target_statfs {
/* Linux specials */
target_fsid_t f_fsid;
abi_long f_namelen;
+#ifdef HAVE_STATFS_FLAGS
+ abi_long f_frsize;
+ abi_long f_flags;
+ abi_long f_spare[4];
+#else
abi_long f_spare[6];
+#endif
};
#endif
@@ -2255,7 +2274,13 @@ struct target_statfs64 {
uint64_t f_bavail;
target_fsid_t f_fsid;
uint32_t f_namelen;
+#ifdef HAVE_STATFS_FLAGS
+ uint32_t f_frsize;
+ uint32_t f_flags;
+ uint32_t f_spare[4];
+#else
uint32_t f_spare[6];
+#endif
};
#elif (defined(TARGET_PPC64) || defined(TARGET_X86_64) || \
defined(TARGET_SPARC64) || defined(TARGET_AARCH64)) && \
@@ -2271,7 +2296,12 @@ struct target_statfs {
target_fsid_t f_fsid;
abi_long f_namelen;
abi_long f_frsize;
+#ifdef HAVE_STATFS_FLAGS
+ abi_long f_flags;
+ abi_long f_spare[4];
+#else
abi_long f_spare[5];
+#endif
};
struct target_statfs64 {
@@ -2285,7 +2315,12 @@ struct target_statfs64 {
target_fsid_t f_fsid;
abi_long f_namelen;
abi_long f_frsize;
+#ifdef HAVE_STATFS_FLAGS
+ abi_long f_flags;
+ abi_long f_spare[4];
+#else
abi_long f_spare[5];
+#endif
};
#elif defined(TARGET_S390X)
struct target_statfs {
@@ -2299,7 +2334,13 @@ struct target_statfs {
kernel_fsid_t f_fsid;
int32_t f_namelen;
int32_t f_frsize;
+#ifdef HAVE_STATFS_FLAGS
+ int32_t f_flags;
+ int32_t f_spare[4];
+#else
int32_t f_spare[5];
+#endif
+
};
struct target_statfs64 {
@@ -2313,7 +2354,12 @@ struct target_statfs64 {
kernel_fsid_t f_fsid;
int32_t f_namelen;
int32_t f_frsize;
+#ifdef HAVE_STATFS_FLAGS
+ int32_t f_flags;
+ int32_t f_spare[4];
+#else
int32_t f_spare[5];
+#endif
};
#else
struct target_statfs {
@@ -2327,7 +2373,12 @@ struct target_statfs {
target_fsid_t f_fsid;
uint32_t f_namelen;
uint32_t f_frsize;
+#ifdef HAVE_STATFS_FLAGS
+ uint32_t f_flags;
+ uint32_t f_spare[4];
+#else
uint32_t f_spare[5];
+#endif
};
struct target_statfs64 {
@@ -2341,7 +2392,12 @@ struct target_statfs64 {
target_fsid_t f_fsid;
uint32_t f_namelen;
uint32_t f_frsize;
+#ifdef HAVE_STATFS_FLAGS
+ uint32_t f_flags;
+ uint32_t f_spare[4];
+#else
uint32_t f_spare[5];
+#endif
};
#endif

View File

@ -49,15 +49,9 @@ callPackage (import ./generic.nix (rec {
src = fetchgit { src = fetchgit {
url = https://xenbits.xen.org/git-http/qemu-xen.git; url = https://xenbits.xen.org/git-http/qemu-xen.git;
rev = "refs/tags/qemu-xen-${version}"; rev = "refs/tags/qemu-xen-${version}";
sha256 = "1v19pp86kcgwvsbkrdrn4rlaj02i4054avw8k70w1m0rnwgcsdbs"; sha256 = "1l4sygd8p0mc13bskr4r1m31qh1kr58h195qn1s52869s58jyhvm";
}; };
buildInputs = qemuDeps; buildInputs = qemuDeps;
patches = [
(xsaPatch {
name = "216-qemuu";
sha256 = "06w2iw1r5gip2bpbg19cziws965h9in0f6np74cr31f76yy30yxn";
})
];
meta.description = "Xen's fork of upstream Qemu"; meta.description = "Xen's fork of upstream Qemu";
}; };
} // optionalAttrs withInternalTraditionalQemu { } // optionalAttrs withInternalTraditionalQemu {

View File

@ -58,10 +58,6 @@ rec {
}; };
xen_4_8-vanilla = callPackage ./4.8.nix { xen_4_8-vanilla = callPackage ./4.8.nix {
# At the very least included seabios and etherboot need gcc49,
# so we have to build all of it with gcc49.
stdenv = overrideCC stdenv gcc49;
meta = { meta = {
description = "vanilla"; description = "vanilla";
longDescription = '' longDescription = ''

View File

@ -1,20 +1,18 @@
{ stdenv, fetchzip }: { stdenv, fetchzip }:
let let
version = "2.020"; version = "3.002";
in fetchzip rec { in fetchzip rec {
name = "hack-font-${version}"; name = "hack-font-${version}";
url = let url = "https://github.com/chrissimpkins/Hack/releases/download/v${version}/Hack-v${version}-ttf.zip";
version_ = with stdenv.lib; concatStringsSep "_" (splitString "." version);
in "https://github.com/chrissimpkins/Hack/releases/download/v${version}/Hack-v${version_}-ttf.zip";
postFetch = '' postFetch = ''
mkdir -p $out/share/fonts mkdir -p $out/share/fonts
unzip -j $downloadedFile \*.ttf -d $out/share/fonts/hack unzip -j $downloadedFile \*.ttf -d $out/share/fonts/hack
''; '';
sha256 = "0cpsglb9vnhmpsn496aqisfvmq3yxvjnj7c361dspy0fn6z8x60c"; sha256 = "11f3hl4nvxq6pvsmwr1c1r5wrxhrp7ixr5bshrz2dmqn7l8bxa63";
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "A typeface designed for source code"; description = "A typeface designed for source code";
@ -25,7 +23,7 @@ in fetchzip rec {
The face has been re-designed with a larger glyph set, modifications of The face has been re-designed with a larger glyph set, modifications of
the original glyph shapes, and meticulous attention to metrics. the original glyph shapes, and meticulous attention to metrics.
''; '';
homepage = http://sourcefoundry.org/hack/; homepage = https://sourcefoundry.org/hack/;
/* /*
"The font binaries are released under a license that permits unlimited "The font binaries are released under a license that permits unlimited
@ -36,6 +34,7 @@ in fetchzip rec {
the license is available in LICENSE.md" (From the GitHub page) the license is available in LICENSE.md" (From the GitHub page)
*/ */
license = licenses.free; license = licenses.free;
maintainers = with maintainers; [ dywedir ];
platforms = platforms.all; platforms = platforms.all;
}; };
} }

View File

@ -9,11 +9,11 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "sbcl-${version}"; name = "sbcl-${version}";
version = "1.4.3"; version = "1.4.4";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/project/sbcl/sbcl/${version}/${name}-source.tar.bz2"; url = "mirror://sourceforge/project/sbcl/sbcl/${version}/${name}-source.tar.bz2";
sha256 = "1z8d11k6vc6jhmpwzy0nawj84qdd2jvibrvqmb1nmq3h8w64hlam"; sha256 = "1k6v5b8qv7vyxvh8asx6phf2hbapx5pp5p5j47hgnq123fwnh4fa";
}; };
patchPhase = '' patchPhase = ''

View File

@ -12,7 +12,6 @@
, swig , swig
, bash , bash
, libxml2 , libxml2
, llvm
, clang , clang
, python , python
, ncurses , ncurses
@ -28,13 +27,17 @@
, git , git
, libgit2 , libgit2
, fetchFromGitHub , fetchFromGitHub
, fetchpatch
, paxctl , paxctl
, findutils , findutils
, makeWrapper
, gnumake
, file
#, systemtap #, systemtap
}: }:
let let
v_major = "3.1.1"; v_major = "4.0.3";
version = "${v_major}-RELEASE"; version = "${v_major}-RELEASE";
version_friendly = "${v_major}"; version_friendly = "${v_major}";
@ -47,53 +50,53 @@ let
name = "${repo}-${version}-src"; name = "${repo}-${version}-src";
}; };
sources = { sources = {
# FYI: SourceKit probably would work but currently requires building everything twice # FYI: SourceKit probably would work but currently requires building everything twice
# For more inforation, see: https://github.com/apple/swift/pull/3594#issuecomment-234169759 # For more inforation, see: https://github.com/apple/swift/pull/3594#issuecomment-234169759
clang = fetch { clang = fetch {
repo = "swift-clang"; repo = "swift-clang";
sha256 = "1gmdgr8jph87nya8cgdl7iwrggbji2sag996m27hkbszw4nxy8sd"; sha256 = "0zm624iwiprk3c3nzqf4p1fd9zqic4yi3jv51cw3249ax4x6vy10";
}; };
llvm = fetch { llvm = fetch {
repo = "swift-llvm"; repo = "swift-llvm";
sha256 = "0nwd7cp6mbj7f6a2rx8123n7ygs8406hsx7hp7ybagww6v75bwzi"; sha256 = "11vw6461c0cdvwm1wna1a5709fjj14hzp6br6jg94p4f6jp3yv4d";
}; };
compilerrt = fetch { compilerrt = fetch {
repo = "swift-compiler-rt"; repo = "swift-compiler-rt";
sha256 = "1gjcr6g3ffs3nhf4a84iwg4flbd7rqcf9rvvclwyq96msa3mj950"; sha256 = "1hj4qaj4c9n2wzg2cvarbyl0n708zd1dlw4zkzq07fjxxqs36nfa";
}; };
cmark = fetch { cmark = fetch {
repo = "swift-cmark"; repo = "swift-cmark";
sha256 = "0qf2f3zd8lndkfbxbz6vkznzz8rvq5gigijh7pgmfx9fi4zcssqx"; sha256 = "1nmxp0fj749sgar682c5nsj7zxxigqwg973baxj2r656a7ybh325";
}; };
lldb = fetch { lldb = fetch {
repo = "swift-lldb"; repo = "swift-lldb";
sha256 = "17n4whpf3wxw9zaayiq21gk9q3547qxi4rvxld2hybh0k7a1bj5c"; sha256 = "0yk5qg85008vcn63vn2jpn5ls9pdhda222p2w1cfkrj27k5k8vqr";
}; };
llbuild = fetch { llbuild = fetch {
repo = "swift-llbuild"; repo = "swift-llbuild";
sha256 = "1l3hnb2s01jby91k1ipbc3bhszq14vyx5pzdhf2chld1yhpg420d"; sha256 = "0jffw6z1s6ck1i05brw59x6vsg7zrxbz5n2wz72fj29rh3nppc7a";
}; };
pm = fetch { pm = fetch {
repo = "swift-package-manager"; repo = "swift-package-manager";
sha256 = "1ayy5vk3mjk354pg9bf68wvnaj3jymx23w0qnlw1jxz256ff8fwi"; sha256 = "0xj070b8fii7ijfsnyq4fxgv6569vdrg0yippi85h2p1l7s9aagh";
}; };
xctest = fetch { xctest = fetch {
repo = "swift-corelibs-xctest"; repo = "swift-corelibs-xctest";
sha256 = "0cj5y7wanllfldag08ci567x12aw793c79afckpbsiaxmwy4xhnm"; sha256 = "0l355wq8zfwrpv044xf4smjwbm0bmib360748n8cwls3vkr9l2yv";
}; };
foundation = fetch { foundation = fetch {
repo = "swift-corelibs-foundation"; repo = "swift-corelibs-foundation";
sha256 = "1d1ldk7ckqn4mhmdhsx2zrmsd6jfxzgdywn2pki7limk979hcwjc"; sha256 = "0s7yc5gsbd96a4bs8c6q24dyfjm4xhcr2nzhl2ics8dmi60j15s4";
}; };
libdispatch = fetch { libdispatch = fetch {
repo = "swift-corelibs-libdispatch"; repo = "swift-corelibs-libdispatch";
sha256 = "0ckjg41fjak06i532azhryckjq64fkxzsal4svf5v4s8n9mkq2sg"; sha256 = "0x8zzq3shhvmhq4sbhaaa0ddiv3nw347pz6ayym6jyzq7j9n15ia";
fetchSubmodules = true; fetchSubmodules = true;
}; };
swift = fetch { swift = fetch {
repo = "swift"; repo = "swift";
sha256 = "0879jlv37lmxc1apzi53xn033y72548i86r7fzwr0g52124q5gry"; sha256 = "0a1gq0k5701i418f0qi7kywv16q7vh4a4wp0f6fpyv4sjkq27msx";
}; };
}; };
@ -119,6 +122,9 @@ sources = {
]; ];
builder = '' builder = ''
# gcc-6.4.0/include/c++/6.4.0/cstdlib:75:15: fatal error: 'stdlib.h' file not found
NIX_CFLAGS_COMPILE="$( echo ${clang.default_cxx_stdlib_compile} ) $NIX_CFLAGS_COMPILE"
$SWIFT_SOURCE_ROOT/swift/utils/build-script \ $SWIFT_SOURCE_ROOT/swift/utils/build-script \
--preset=buildbot_linux \ --preset=buildbot_linux \
installable_package=$INSTALLABLE_PACKAGE \ installable_package=$INSTALLABLE_PACKAGE \
@ -126,6 +132,20 @@ sources = {
install_destdir=$SWIFT_INSTALL_DIR \ install_destdir=$SWIFT_INSTALL_DIR \
extra_cmake_options="${stdenv.lib.concatStringsSep "," cmakeFlags}"''; extra_cmake_options="${stdenv.lib.concatStringsSep "," cmakeFlags}"'';
# from llvm/4/llvm.nix
sigaltstackPatch = fetchpatch {
name = "sigaltstack.patch"; # for glibc-2.26
url = https://github.com/llvm-mirror/compiler-rt/commit/8a5e425a68d.diff;
sha256 = "0h4y5vl74qaa7dl54b1fcyqalvlpd8zban2d1jxfkxpzyi7m8ifi";
};
# https://bugs.swift.org/browse/SR-6409
sigunusedPatch = fetchpatch {
name = "sigunused.patch";
url = "https://github.com/apple/swift-llbuild/commit/303a89bc6da606c115560921a452686aa0655f5e.diff";
sha256 = "04sw7ym1grzggj1v3xrzr2ljxz8rf9rnn9n5fg1xjbwlrdagkc7m";
};
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "swift-${version_friendly}"; name = "swift-${version_friendly}";
@ -145,6 +165,8 @@ stdenv.mkDerivation rec {
rsync rsync
which which
findutils findutils
makeWrapper
gnumake
] ++ stdenv.lib.optional stdenv.needsPax paxctl; ] ++ stdenv.lib.optional stdenv.needsPax paxctl;
# TODO: Revisit what's propagated and how # TODO: Revisit what's propagated and how
@ -198,6 +220,14 @@ stdenv.mkDerivation rec {
# Just patch all the things for now, we can focus this later # Just patch all the things for now, we can focus this later
patchShebangs $SWIFT_SOURCE_ROOT patchShebangs $SWIFT_SOURCE_ROOT
# TODO eliminate use of env.
find -type f -print0 | xargs -0 sed -i \
-e 's|/usr/bin/env|${coreutils}/bin/env|g' \
-e 's|/usr/bin/make|${gnumake}/bin/make|g' \
-e 's|/bin/mkdir|${coreutils}/bin/mkdir|g' \
-e 's|/bin/cp|${coreutils}/bin/cp|g' \
-e 's|/usr/bin/file|${file}/bin/file|g'
substituteInPlace swift/stdlib/public/Platform/CMakeLists.txt \ substituteInPlace swift/stdlib/public/Platform/CMakeLists.txt \
--replace '/usr/include' "${stdenv.cc.libc.dev}/include" --replace '/usr/include' "${stdenv.cc.libc.dev}/include"
substituteInPlace swift/utils/build-script-impl \ substituteInPlace swift/utils/build-script-impl \
@ -209,6 +239,13 @@ stdenv.mkDerivation rec {
patch -p1 -d swift -i ${./patches/0002-build-presets-linux-allow-custom-install-prefix.patch} patch -p1 -d swift -i ${./patches/0002-build-presets-linux-allow-custom-install-prefix.patch}
patch -p1 -d swift -i ${./patches/0003-build-presets-linux-disable-tests.patch} patch -p1 -d swift -i ${./patches/0003-build-presets-linux-disable-tests.patch}
patch -p1 -d swift -i ${./patches/0004-build-presets-linux-plumb-extra-cmake-options.patch} patch -p1 -d swift -i ${./patches/0004-build-presets-linux-plumb-extra-cmake-options.patch}
# https://sourceware.org/glibc/wiki/Release/2.26#Removal_of_.27xlocale.h.27
patch -p1 -i ${./patches/remove_xlocale.patch}
# https://bugs.swift.org/browse/SR-4633
patch -p1 -d swift -i ${./patches/icu59.patch}
# https://bugs.swift.org/browse/SR-5779
sed -i -e 's|"-latomic"|"-Wl,-rpath,${clang.cc.gcc.lib}/lib" "-L${clang.cc.gcc.lib}/lib" "-latomic"|' swift/cmake/modules/AddSwift.cmake
substituteInPlace clang/lib/Driver/ToolChains.cpp \ substituteInPlace clang/lib/Driver/ToolChains.cpp \
--replace ' addPathIfExists(D, SysRoot + "/usr/lib", Paths);' \ --replace ' addPathIfExists(D, SysRoot + "/usr/lib", Paths);' \
@ -217,21 +254,21 @@ stdenv.mkDerivation rec {
# Workaround hardcoded dep on "libcurses" (vs "libncurses"): # Workaround hardcoded dep on "libcurses" (vs "libncurses"):
sed -i 's,curses,ncurses,' llbuild/*/*/CMakeLists.txt sed -i 's,curses,ncurses,' llbuild/*/*/CMakeLists.txt
substituteInPlace llbuild/tests/BuildSystem/Build/basic.llbuild \
--replace /usr/bin/env $(type -p env)
# This test fails on one of my machines, not sure why. # This test fails on one of my machines, not sure why.
# Disabling for now. # Disabling for now.
rm llbuild/tests/Examples/buildsystem-capi.llbuild rm llbuild/tests/Examples/buildsystem-capi.llbuild
substituteInPlace swift-corelibs-foundation/lib/script.py \
--replace /bin/cp $(type -p cp)
PREFIX=''${out/#\/} PREFIX=''${out/#\/}
substituteInPlace swift-corelibs-xctest/build_script.py \ substituteInPlace swift-corelibs-xctest/build_script.py \
--replace usr "$PREFIX" --replace usr "$PREFIX"
substituteInPlace swiftpm/Utilities/bootstrap \ substituteInPlace swiftpm/Utilities/bootstrap \
--replace "usr" "$PREFIX" --replace "usr" "$PREFIX"
'' + stdenv.lib.optionalString (stdenv ? glibc) ''
patch -p1 -d compiler-rt -i ${sigaltstackPatch}
patch -p1 -d compiler-rt -i ${./patches/sigaltstack.patch}
patch -p1 -d llbuild -i ${sigunusedPatch}
patch -p1 -i ${./patches/sigunused.patch}
''; '';
doCheck = false; doCheck = false;
@ -251,6 +288,10 @@ stdenv.mkDerivation rec {
# TODO: Use wrappers to get these on the PATH for swift tools, instead # TODO: Use wrappers to get these on the PATH for swift tools, instead
ln -s ${clang}/bin/* $out/bin/ ln -s ${clang}/bin/* $out/bin/
ln -s ${targetPackages.stdenv.cc.bintools}/bin/ar $out/bin/ar ln -s ${targetPackages.stdenv.cc.bintools}/bin/ar $out/bin/ar
wrapProgram $out/bin/swift \
--suffix C_INCLUDE_PATH : $out/lib/swift/clang/include \
--suffix CPLUS_INCLUDE_PATH : $out/lib/swift/clang/include
''; '';
# Hack to avoid TMPDIR in RPATHs. # Hack to avoid TMPDIR in RPATHs.
@ -263,7 +304,6 @@ stdenv.mkDerivation rec {
license = licenses.asl20; license = licenses.asl20;
# Swift doesn't support 32bit Linux, unknown on other platforms. # Swift doesn't support 32bit Linux, unknown on other platforms.
platforms = [ "x86_64-linux" ]; platforms = [ "x86_64-linux" ];
broken = true;
}; };
} }

View File

@ -11,13 +11,13 @@ diff --git a/utils/build-presets.ini b/utils/build-presets.ini
index e6b0af3581..1095cbaab7 100644 index e6b0af3581..1095cbaab7 100644
--- a/utils/build-presets.ini --- a/utils/build-presets.ini
+++ b/utils/build-presets.ini +++ b/utils/build-presets.ini
@@ -692,7 +692,7 @@ install-lldb @@ -708,7 +708,7 @@ install-lldb
install-llbuild install-llbuild
install-swiftpm install-swiftpm
install-xctest install-xctest
-install-prefix=/usr -install-prefix=/usr
+install-prefix=%(install_prefix)s +install-prefix=%(install_prefix)s
swift-install-components=autolink-driver;compiler;clang-builtin-headers;stdlib;swift-remote-mirror;sdk-overlay;license swift-install-components=autolink-driver;compiler;clang-builtin-headers;stdlib;swift-remote-mirror;sdk-overlay;license;sourcekit-inproc
build-swift-static-stdlib build-swift-static-stdlib
build-swift-static-sdk-overlay build-swift-static-sdk-overlay
-- --

View File

@ -0,0 +1,113 @@
--- a/stdlib/public/stubs/UnicodeNormalization.cpp
+++ b/stdlib/public/stubs/UnicodeNormalization.cpp
@@ -86,11 +86,8 @@ ASCIICollation() {
for (unsigned char c = 0; c < 128; ++c) {
UErrorCode ErrorCode = U_ZERO_ERROR;
intptr_t NumCollationElts = 0;
-#if defined(__CYGWIN__) || defined(_MSC_VER)
UChar Buffer[1];
-#else
- uint16_t Buffer[1];
-#endif
+
Buffer[0] = c;
UCollationElements *CollationIterator =
@@ -127,18 +124,9 @@ swift::_swift_stdlib_unicode_compare_utf16_utf16(const uint16_t *LeftString,
int32_t LeftLength,
const uint16_t *RightString,
int32_t RightLength) {
-#if defined(__CYGWIN__) || defined(_MSC_VER)
- // ICU UChar type is platform dependent. In Cygwin, it is defined
- // as wchar_t which size is 2. It seems that the underlying binary
- // representation is same with swift utf16 representation.
return ucol_strcoll(GetRootCollator(),
reinterpret_cast<const UChar *>(LeftString), LeftLength,
reinterpret_cast<const UChar *>(RightString), RightLength);
-#else
- return ucol_strcoll(GetRootCollator(),
- LeftString, LeftLength,
- RightString, RightLength);
-#endif
}
/// Compares the strings via the Unicode Collation Algorithm on the root locale.
@@ -156,12 +144,8 @@ swift::_swift_stdlib_unicode_compare_utf8_utf16(const unsigned char *LeftString,
UErrorCode ErrorCode = U_ZERO_ERROR;
uiter_setUTF8(&LeftIterator, reinterpret_cast<const char *>(LeftString), LeftLength);
-#if defined(__CYGWIN__) || defined(_MSC_VER)
uiter_setString(&RightIterator, reinterpret_cast<const UChar *>(RightString),
RightLength);
-#else
- uiter_setString(&RightIterator, RightString, RightLength);
-#endif
uint32_t Diff = ucol_strcollIter(GetRootCollator(),
&LeftIterator, &RightIterator, &ErrorCode);
@@ -199,14 +183,10 @@ swift::_swift_stdlib_unicode_compare_utf8_utf8(const unsigned char *LeftString,
void *swift::_swift_stdlib_unicodeCollationIterator_create(
const __swift_uint16_t *Str, __swift_uint32_t Length) {
UErrorCode ErrorCode = U_ZERO_ERROR;
-#if defined(__CYGWIN__) || defined(_MSC_VER)
UCollationElements *CollationIterator = ucol_openElements(
GetRootCollator(), reinterpret_cast<const UChar *>(Str), Length,
&ErrorCode);
-#else
- UCollationElements *CollationIterator = ucol_openElements(
- GetRootCollator(), Str, Length, &ErrorCode);
-#endif
+
if (U_FAILURE(ErrorCode)) {
swift::crash("_swift_stdlib_unicodeCollationIterator_create: ucol_openElements() failed.");
}
@@ -244,17 +224,12 @@ swift::_swift_stdlib_unicode_strToUpper(uint16_t *Destination,
const uint16_t *Source,
int32_t SourceLength) {
UErrorCode ErrorCode = U_ZERO_ERROR;
-#if defined(__CYGWIN__) || defined(_MSC_VER)
uint32_t OutputLength = u_strToUpper(reinterpret_cast<UChar *>(Destination),
DestinationCapacity,
reinterpret_cast<const UChar *>(Source),
SourceLength,
"", &ErrorCode);
-#else
- uint32_t OutputLength = u_strToUpper(Destination, DestinationCapacity,
- Source, SourceLength,
- "", &ErrorCode);
-#endif
+
if (U_FAILURE(ErrorCode) && ErrorCode != U_BUFFER_OVERFLOW_ERROR) {
swift::crash("u_strToUpper: Unexpected error uppercasing unicode string.");
}
@@ -271,17 +246,12 @@ swift::_swift_stdlib_unicode_strToLower(uint16_t *Destination,
const uint16_t *Source,
int32_t SourceLength) {
UErrorCode ErrorCode = U_ZERO_ERROR;
-#if defined(__CYGWIN__) || defined(_MSC_VER)
uint32_t OutputLength = u_strToLower(reinterpret_cast<UChar *>(Destination),
DestinationCapacity,
reinterpret_cast<const UChar *>(Source),
SourceLength,
"", &ErrorCode);
-#else
- uint32_t OutputLength = u_strToLower(Destination, DestinationCapacity,
- Source, SourceLength,
- "", &ErrorCode);
-#endif
+
if (U_FAILURE(ErrorCode) && ErrorCode != U_BUFFER_OVERFLOW_ERROR) {
swift::crash("u_strToLower: Unexpected error lowercasing unicode string.");
}
@@ -300,9 +300,9 @@
swift::__swift_stdlib_UBreakIterator *swift::__swift_stdlib_ubrk_open(
swift::__swift_stdlib_UBreakIteratorType type, const char *locale,
- const UChar *text, int32_t textLength, __swift_stdlib_UErrorCode *status) {
+ const __swift_stdlib_UChar * text, __swift_int32_t textLength, __swift_stdlib_UErrorCode *status) {
return ptr_cast<swift::__swift_stdlib_UBreakIterator>(
- ubrk_open(static_cast<UBreakIteratorType>(type), locale, text, textLength,
+ ubrk_open(static_cast<UBreakIteratorType>(type), locale, reinterpret_cast<const UChar *>(text), textLength,
ptr_cast<UErrorCode>(status)));
}

View File

@ -0,0 +1,54 @@
--- a/swift/stdlib/public/SDK/os/os_trace_blob.c
+++ b/swift/stdlib/public/SDK/os/os_trace_blob.c
@@ -14,7 +14,6 @@
#include <dispatch/dispatch.h>
#include <os/base.h>
#include <os/log.h>
-#include <xlocale.h>
#include "os_trace_blob.h"
OS_NOINLINE
--- a/swift/stdlib/public/stubs/Stubs.cpp
+++ b/swift/stdlib/public/stubs/Stubs.cpp
@@ -61,7 +61,6 @@
#define strtof_l swift_strtof_l
#define strtold_l swift_strtold_l
#else
-#include <xlocale.h>
#endif
#include <limits>
#include "llvm/ADT/StringExtras.h"
--- a/swift-corelibs-foundation/CoreFoundation/String.subproj/CFStringDefaultEncoding.h
+++ b/swift-corelibs-foundation/CoreFoundation/String.subproj/CFStringDefaultEncoding.h
@@ -20,7 +20,6 @@
#include <unistd.h>
#include <string.h>
#include <stdio.h>
-#include <xlocale.h>
CF_EXTERN_C_BEGIN
--- a/swift-corelibs-foundation/CoreFoundation/String.subproj/CFStringEncodings.c
+++ b/swift-corelibs-foundation/CoreFoundation/String.subproj/CFStringEncodings.c
@@ -24,7 +24,6 @@
#include <unistd.h>
#include <string.h>
#include <stdio.h>
-#include <xlocale.h>
#include <CoreFoundation/CFStringDefaultEncoding.h>
#endif
--- a/swift-corelibs-foundation/CoreFoundation/Base.subproj/CFInternal.h
+++ b/swift-corelibs-foundation/CoreFoundation/Base.subproj/CFInternal.h
@@ -95,7 +95,6 @@
#if DEPLOYMENT_TARGET_MACOSX || DEPLOYMENT_TARGET_EMBEDDED || DEPLOYMENT_TARGET_EMBEDDED_MINI || DEPLOYMENT_TARGET_LINUX || DEPLOYMENT_TARGET_FREEBSD
#if TARGET_OS_CYGWIN
#else
-#include <xlocale.h>
#endif
#include <unistd.h>
#include <sys/time.h>

View File

@ -0,0 +1,11 @@
--- a/lib/esan/esan_sideline_linux.cpp
+++ b/lib/esan/esan_sideline_linux.cpp
@@ -70,7 +70,7 @@ int SidelineThread::runSideline(void *Arg) {
// Set up a signal handler on an alternate stack for safety.
InternalScopedBuffer<char> StackMap(SigAltStackSize);
- struct sigaltstack SigAltStack;
+ stack_t SigAltStack;
SigAltStack.ss_sp = StackMap.data();
SigAltStack.ss_size = SigAltStackSize;
SigAltStack.ss_flags = 0;

View File

@ -0,0 +1,11 @@
--- a/swiftpm/Sources/Basic/Process.swift
+++ b/swiftpm/Sources/Basic/Process.swift
@@ -258,7 +258,7 @@ public func launch() throws {
// modify, so we have to take care about the set we use.
var mostSignals = sigset_t()
sigemptyset(&mostSignals)
- for i in 1 ..< SIGUNUSED {
+ for i in 1 ..< SIGSYS {
if i == SIGKILL || i == SIGSTOP {
continue
}

View File

@ -27,7 +27,9 @@ stdenv.mkDerivation rec {
patches = [ (fetchpatch { patches = [ (fetchpatch {
url = "https://raw.githubusercontent.com/gentoo/musl/85b6a600996bdd71162b357e9ba93d8559342432/dev-libs/boehm-gc/files/boehm-gc-7.6.0-sys_select.patch"; url = "https://raw.githubusercontent.com/gentoo/musl/85b6a600996bdd71162b357e9ba93d8559342432/dev-libs/boehm-gc/files/boehm-gc-7.6.0-sys_select.patch";
sha256 = "1gydwlklvci30f5dpp5ccw2p2qpph5y41r55wx9idamjlq66fbb3"; sha256 = "1gydwlklvci30f5dpp5ccw2p2qpph5y41r55wx9idamjlq66fbb3";
}) ]; }) ] ++
# https://github.com/ivmai/bdwgc/pull/208
lib.optional hostPlatform.isRiscV ./riscv.patch;
configureFlags = configureFlags =
[ "--enable-cplusplus" ] [ "--enable-cplusplus" ]

View File

@ -0,0 +1,53 @@
diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h
index a8e55dd2..439cc88d 100644
--- a/include/private/gcconfig.h
+++ b/include/private/gcconfig.h
@@ -650,6 +650,15 @@
# endif
# define mach_type_known
# endif
+# if defined(__riscv) && defined(LINUX)
+# if __riscv_xlen == 32
+# define RISCV32
+# define mach_type_known
+# elif __riscv_xlen == 64
+# define RISCV64
+# define mach_type_known
+# endif
+# endif
# if defined(SN_TARGET_PSP2)
# define mach_type_known
@@ -2970,6 +2979,32 @@
# endif
# endif
+# ifdef RISCV32
+# define CPP_WORDSZ 32
+# define MACH_TYPE "RISC-V 32"
+# define ALIGNMENT 4
+# ifdef LINUX
+# define OS_TYPE "LINUX"
+ extern int __data_start[];
+# define DATASTART ((ptr_t)__data_start)
+# define LINUX_STACKBOTTOM
+# define DYNAMIC_LOADING
+# endif
+# endif
+
+# ifdef RISCV64
+# define CPP_WORDSZ 64
+# define MACH_TYPE "RISC-V 64"
+# define ALIGNMENT 8
+# ifdef LINUX
+# define OS_TYPE "LINUX"
+ extern int __data_start[];
+# define DATASTART ((ptr_t)__data_start)
+# define LINUX_STACKBOTTOM
+# define DYNAMIC_LOADING
+# endif
+# endif
+
#if defined(__GLIBC__) && !defined(DONT_USE_LIBC_PRIVATES)
/* Use glibc's stack-end marker. */
# define USE_LIBC_PRIVATES

View File

@ -231,11 +231,11 @@ assert nvenc -> nvidia-video-sdk != null && nonfreeLicensing;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "ffmpeg-full-${version}"; name = "ffmpeg-full-${version}";
version = "3.4.1"; version = "3.4.2";
src = fetchurl { src = fetchurl {
url = "https://www.ffmpeg.org/releases/ffmpeg-${version}.tar.xz"; url = "https://www.ffmpeg.org/releases/ffmpeg-${version}.tar.xz";
sha256 = "1h4iz7q10wj04awr2wvmp60n7b09pfwrgwbbw9sgl7klcf52fxss"; sha256 = "0h6prjn1ijkzzhkyj8mazp0wpx7m0n9ycadjxagf9czqirbyk4ib";
}; };
prePatch = '' prePatch = ''

View File

@ -6,7 +6,7 @@
callPackage ./generic.nix (args // rec { callPackage ./generic.nix (args // rec {
version = "${branch}"; version = "${branch}";
branch = "3.4.1"; branch = "3.4.2";
sha256 = "0b2aaxx8l7g3pvs4zd3mzig44cc73savrxzfm6w0lnaa2lh3wi7k"; sha256 = "0nkq4451masmzlx3p4vprqwc0sl2iwqxbzjrngmvj29q4azp00zb";
darwinFrameworks = [ Cocoa CoreMedia ]; darwinFrameworks = [ Cocoa CoreMedia ];
}) })

View File

@ -1,14 +1,20 @@
{ stdenv, fetchurl { stdenv, fetchurl
, pkgconfig , pkgconfig
, python3 , python3Packages
, wrapGAppsHook
, atk
, dbus_libs , dbus_libs
, evemu , evemu
, frame , frame
, gdk_pixbuf
, gobjectIntrospection
, grail , grail
, gtk3
, libX11 , libX11
, libXext , libXext
, libXi , libXi
, libXtst , libXtst
, pango
, xorgserver , xorgserver
}: }:
@ -25,8 +31,23 @@ stdenv.mkDerivation rec {
NIX_CFLAGS_COMPILE = "-Wno-format -Wno-misleading-indentation -Wno-error"; NIX_CFLAGS_COMPILE = "-Wno-format -Wno-misleading-indentation -Wno-error";
nativeBuildInputs = [ pkgconfig ]; pythonPath = with python3Packages;
buildInputs = [ python3 dbus_libs evemu frame grail libX11 libXext libXi libXtst xorgserver ]; [ pygobject3 ];
nativeBuildInputs = [ pkgconfig wrapGAppsHook python3Packages.wrapPython];
buildInputs = [ atk dbus_libs evemu frame gdk_pixbuf gobjectIntrospection grail
gtk3 libX11 libXext libXi libXtst pango python3Packages.python xorgserver
];
patchPhase = ''
substituteInPlace python/geis/geis_v2.py --replace \
"ctypes.util.find_library(\"geis\")" "'$out/lib/libgeis.so'"
'';
preFixup = ''
buildPythonPath "$out $pythonPath"
gappsWrapperArgs+=(--set PYTHONPATH "$program_PYTHONPATH")
'';
meta = { meta = {
description = "A library for input gesture recognition"; description = "A library for input gesture recognition";

View File

@ -0,0 +1,101 @@
{ stdenv, callPackage
, withLinuxHeaders ? true
, installLocales ? true
, profilingLibraries ? false
, withGd ? false
}:
assert stdenv.cc.isGNU;
callPackage ./common-2.27.nix { inherit stdenv; } {
name = "glibc" + stdenv.lib.optionalString withGd "-gd";
inherit withLinuxHeaders profilingLibraries installLocales withGd;
NIX_NO_SELF_RPATH = true;
postConfigure = ''
# Hack: get rid of the `-static' flag set by the bootstrap stdenv.
# This has to be done *after* `configure' because it builds some
# test binaries.
export NIX_CFLAGS_LINK=
export NIX_LDFLAGS_BEFORE=
export NIX_DONT_SET_RPATH=1
unset CFLAGS
# Apparently --bindir is not respected.
makeFlagsArray+=("bindir=$bin/bin" "sbindir=$bin/sbin" "rootsbindir=$bin/sbin")
'';
# The stackprotector and fortify hardening flags are autodetected by glibc
# and enabled by default if supported. Setting it for every gcc invocation
# does not work.
hardeningDisable = [ "stackprotector" "fortify" ];
# When building glibc from bootstrap-tools, we need libgcc_s at RPATH for
# any program we run, because the gcc will have been placed at a new
# store path than that determined when built (as a source for the
# bootstrap-tools tarball)
# Building from a proper gcc staying in the path where it was installed,
# libgcc_s will not be at {gcc}/lib, and gcc's libgcc will be found without
# any special hack.
preInstall = ''
if [ -f ${stdenv.cc.cc}/lib/libgcc_s.so.1 ]; then
mkdir -p $out/lib
cp ${stdenv.cc.cc}/lib/libgcc_s.so.1 $out/lib/libgcc_s.so.1
# the .so It used to be a symlink, but now it is a script
cp -a ${stdenv.cc.cc}/lib/libgcc_s.so $out/lib/libgcc_s.so
fi
'';
postInstall = ''
if test -n "$installLocales"; then
make -j''${NIX_BUILD_CORES:-1} -l''${NIX_BUILD_CORES:-1} localedata/install-locales
fi
test -f $out/etc/ld.so.cache && rm $out/etc/ld.so.cache
if test -n "$linuxHeaders"; then
# Include the Linux kernel headers in Glibc, except the `scsi'
# subdirectory, which Glibc provides itself.
(cd $dev/include && \
ln -sv $(ls -d $linuxHeaders/include/* | grep -v scsi\$) .)
fi
# Fix for NIXOS-54 (ldd not working on x86_64). Make a symlink
# "lib64" to "lib".
if test -n "$is64bit"; then
ln -s lib $out/lib64
fi
# Get rid of more unnecessary stuff.
rm -rf $out/var $bin/bin/sln
# For some reason these aren't stripped otherwise and retain reference
# to bootstrap-tools; on cross-arm this stripping would break objects.
if [ -z "$crossConfig" ]; then
for i in "$out"/lib/*.a; do
[ "$i" = "$out/lib/libm.a" ] || strip -S "$i"
done
fi
# Put libraries for static linking in a separate output. Note
# that libc_nonshared.a and libpthread_nonshared.a are required
# for dynamically-linked applications.
mkdir -p $static/lib
mv $out/lib/*.a $static/lib
mv $static/lib/lib*_nonshared.a $out/lib
# Some of *.a files are linker scripts where moving broke the paths.
sed "/^GROUP/s|$out/lib/lib|$static/lib/lib|g" \
-i "$static"/lib/*.a
# Work around a Nix bug: hard links across outputs cause a build failure.
cp $bin/bin/getconf $bin/bin/getconf_
mv $bin/bin/getconf_ $bin/bin/getconf
'';
separateDebugInfo = true;
meta.description = "The GNU C Library";
}

View File

@ -0,0 +1,210 @@
/* Build configuration used to build glibc, Info files, and locale
information. */
{ stdenv, lib
, buildPlatform, hostPlatform
, buildPackages
, fetchurl
, linuxHeaders ? null
, gd ? null, libpng ? null
, bison
}:
{ name
, withLinuxHeaders ? false
, profilingLibraries ? false
, installLocales ? false
, withGd ? false
, meta
, ...
} @ args:
let
version = "2.27";
patchSuffix = "";
sha256 = "0wpwq7gsm7sd6ysidv0z575ckqdg13cr2njyfgrbgh4f65adwwji";
cross = if buildPlatform != hostPlatform then hostPlatform else null;
in
assert withLinuxHeaders -> linuxHeaders != null;
assert withGd -> gd != null && libpng != null;
stdenv.mkDerivation ({
inherit installLocales;
linuxHeaders = if withLinuxHeaders then linuxHeaders else null;
# The host/target system.
crossConfig = if cross != null then cross.config else null;
inherit (stdenv) is64bit;
enableParallelBuilding = true;
patches =
[
/* Have rpcgen(1) look for cpp(1) in $PATH. */
./rpcgen-path.patch
/* Allow NixOS and Nix to handle the locale-archive. */
./nix-locale-archive-2.27.patch
/* Don't use /etc/ld.so.cache, for non-NixOS systems. */
./dont-use-system-ld-so-cache-2.27.patch
/* Don't use /etc/ld.so.preload, but /etc/ld-nix.so.preload. */
./dont-use-system-ld-so-preload.patch
/* The command "getconf CS_PATH" returns the default search path
"/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
/* Allow running with RHEL 6 -like kernels. The patch adds an exception
for glibc to accept 2.6.32 and to tag the ELFs as 2.6.32-compatible
(otherwise the loader would refuse libc).
Note that glibc will fully work only on their heavily patched kernels
and we lose early mismatch detection on 2.6.32.
On major glibc updates we should check that the patched kernel supports
all the required features. ATM it's verified up to glibc-2.26-131.
# HOWTO: check glibc sources for changes in kernel requirements
git log -p glibc-2.25.. sysdeps/unix/sysv/linux/x86_64/kernel-features.h sysdeps/unix/sysv/linux/kernel-features.h
# get kernel sources (update the URL)
mkdir tmp && cd tmp
curl http://vault.centos.org/6.9/os/Source/SPackages/kernel-2.6.32-696.el6.src.rpm | rpm2cpio - | cpio -idmv
tar xf linux-*.bz2
# check syscall presence, for example
less linux-*?/arch/x86/kernel/syscall_table_32.S
*/
./allow-kernel-2.6.32.patch
]
++ lib.optional stdenv.isx86_64 ./fix-x64-abi.patch;
postPatch =
''
# Needed for glibc to build with the gnumake 3.82
# http://comments.gmane.org/gmane.linux.lfs.support/31227
sed -i 's/ot \$/ot:\n\ttouch $@\n$/' manual/Makefile
# nscd needs libgcc, and we don't want it dynamically linked
# because we don't want it to depend on bootstrap-tools libs.
echo "LDFLAGS-nscd += -static-libgcc" >> nscd/Makefile
'';
configureFlags =
[ "-C"
"--enable-add-ons"
"--enable-obsolete-nsl"
"--enable-obsolete-rpc"
"--sysconfdir=/etc"
"--enable-stackguard-randomization"
(if withLinuxHeaders
then "--with-headers=${linuxHeaders}/include"
else "--without-headers")
(if profilingLibraries
then "--enable-profile"
else "--disable-profile")
] ++ lib.optionals withLinuxHeaders [
"--enable-kernel=3.2.0" # can't get below with glibc >= 2.26
] ++ lib.optionals (cross != null) [
(if cross ? float && cross.float == "soft" then "--without-fp" else "--with-fp")
] ++ lib.optionals (cross != null) [
"--with-__thread"
] ++ lib.optionals (cross == null && stdenv.isArm) [
"--host=arm-linux-gnueabi"
"--build=arm-linux-gnueabi"
# To avoid linking with -lgcc_s (dynamic link)
# so the glibc does not depend on its compiler store path
"libc_cv_as_needed=no"
] ++ lib.optional withGd "--with-gd";
installFlags = [ "sysconfdir=$(out)/etc" ];
outputs = [ "out" "bin" "dev" "static" ];
depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ bison ];
buildInputs = lib.optionals withGd [ gd libpng ];
# Needed to install share/zoneinfo/zone.tab. Set to impure /bin/sh to
# prevent a retained dependency on the bootstrap tools in the stdenv-linux
# bootstrap.
BASH_SHELL = "/bin/sh";
}
// (removeAttrs args [ "withLinuxHeaders" "withGd" ]) //
{
name = name + "-${version}${patchSuffix}";
src = fetchurl {
url = "mirror://gnu/glibc/glibc-${version}.tar.xz";
inherit sha256;
};
# Remove absolute paths from `configure' & co.; build out-of-tree.
preConfigure = ''
export PWD_P=$(type -tP pwd)
for i in configure io/ftwtest-sh; do
# Can't use substituteInPlace here because replace hasn't been
# built yet in the bootstrap.
sed -i "$i" -e "s^/bin/pwd^$PWD_P^g"
done
mkdir ../build
cd ../build
configureScript="`pwd`/../$sourceRoot/configure"
${lib.optionalString (stdenv.cc.libc != null)
''makeFlags="$makeFlags BUILD_LDFLAGS=-Wl,-rpath,${stdenv.cc.libc}/lib"''
}
'' + lib.optionalString (cross != null) ''
sed -i s/-lgcc_eh//g "../$sourceRoot/Makeconfig"
cat > config.cache << "EOF"
libc_cv_forced_unwind=yes
libc_cv_c_cleanup=yes
libc_cv_gnu89_inline=yes
EOF
'';
preBuild = lib.optionalString withGd "unset NIX_DONT_SET_RPATH";
meta = {
homepage = http://www.gnu.org/software/libc/;
description = "The GNU C Library";
longDescription =
'' Any Unix-like operating system needs a C library: the library which
defines the "system calls" and other basic facilities such as
open, malloc, printf, exit...
The GNU C library is used as the C library in the GNU system and
most systems with the Linux kernel.
'';
license = lib.licenses.lgpl2Plus;
maintainers = [ lib.maintainers.eelco ];
platforms = lib.platforms.linux;
} // meta;
passthru = { inherit version; };
}
// lib.optionalAttrs (cross != null) {
preInstall = null; # clobber the native hook
dontStrip = true;
separateDebugInfo = false; # this is currently broken for crossDrv
# To avoid a dependency on the build system 'bash'.
preFixup = ''
rm -f $bin/bin/{ldd,tzselect,catchsegv,xtrace}
'';
})

View File

@ -0,0 +1,46 @@
diff -Naur glibc-2.27-orig/elf/ldconfig.c glibc-2.27/elf/ldconfig.c
--- glibc-2.27-orig/elf/ldconfig.c 2018-02-01 11:17:18.000000000 -0500
+++ glibc-2.27/elf/ldconfig.c 2018-02-17 22:43:17.232175182 -0500
@@ -51,7 +51,7 @@
#endif
#ifndef LD_SO_CONF
-# define LD_SO_CONF SYSCONFDIR "/ld.so.conf"
+# define LD_SO_CONF PREFIX "/etc/ld.so.conf"
#endif
/* Get libc version number. */
diff -Naur glibc-2.27-orig/elf/Makefile glibc-2.27/elf/Makefile
--- glibc-2.27-orig/elf/Makefile 2018-02-01 11:17:18.000000000 -0500
+++ glibc-2.27/elf/Makefile 2018-02-17 22:44:50.334006750 -0500
@@ -559,13 +559,13 @@
$(objpfx)ldconfig: $(ldconfig-modules:%=$(objpfx)%.o)
-SYSCONF-FLAGS := -D'SYSCONFDIR="$(sysconfdir)"'
-CFLAGS-ldconfig.c += $(SYSCONF-FLAGS) -D'LIBDIR="$(libdir)"' \
+PREFIX-FLAGS := -D'PREFIX="$(prefix)"'
+CFLAGS-ldconfig.c += $(PREFIX-FLAGS) -D'LIBDIR="$(libdir)"' \
-D'SLIBDIR="$(slibdir)"'
libof-ldconfig = ldconfig
-CFLAGS-dl-cache.c += $(SYSCONF-FLAGS)
-CFLAGS-cache.c += $(SYSCONF-FLAGS)
-CFLAGS-rtld.c += $(SYSCONF-FLAGS)
+CFLAGS-dl-cache.c += $(PREFIX-FLAGS)
+CFLAGS-cache.c += $(PREFIX-FLAGS)
+CFLAGS-rtld.c += $(PREFIX-FLAGS)
cpp-srcs-left := $(all-rtld-routines:=.os)
lib := rtld
diff -Naur glibc-2.27-orig/sysdeps/generic/dl-cache.h glibc-2.27/sysdeps/generic/dl-cache.h
--- glibc-2.27-orig/sysdeps/generic/dl-cache.h 2018-02-01 11:17:18.000000000 -0500
+++ glibc-2.27/sysdeps/generic/dl-cache.h 2018-02-17 22:45:20.471598816 -0500
@@ -28,7 +28,7 @@
#endif
#ifndef LD_SO_CACHE
-# define LD_SO_CACHE SYSCONFDIR "/ld.so.cache"
+# define LD_SO_CACHE PREFIX "/etc/ld.so.cache"
#endif
#ifndef add_system_dir

View File

@ -0,0 +1,118 @@
diff -Naur glibc-2.27-orig/locale/loadarchive.c glibc-2.27/locale/loadarchive.c
--- glibc-2.27-orig/locale/loadarchive.c 2018-02-01 11:17:18.000000000 -0500
+++ glibc-2.27/locale/loadarchive.c 2018-02-17 22:32:25.680169462 -0500
@@ -123,6 +123,23 @@
return MAX (namehash_end, MAX (string_end, locrectab_end));
}
+static int
+open_locale_archive (void)
+{
+ int fd = -1;
+ char *versioned_path = getenv ("LOCAL_ARCHIVE_2_27");
+ char *path = getenv ("LOCAL_ARCHIVE");
+ if (versioned_path)
+ fd = __open_nocancel (versioned_path, O_RDONLY|O_LARGEFILE|O_CLOEXEC);
+ if (path && fd < 0)
+ fd = __open_nocancel (path, O_RDONLY|O_LARGEFILE|O_CLOEXEC);
+ if (fd < 0)
+ fd = __open_nocancel (archfname, O_RDONLY|O_LARGEFILE|O_CLOEXEC);
+ if (fd < 0)
+ fd = __open_nocancel ("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE|O_CLOEXEC);
+ return fd;
+}
+
/* Find the locale *NAMEP in the locale archive, and return the
internalized data structure for its CATEGORY data. If this locale has
@@ -202,7 +219,7 @@
archmapped = &headmap;
/* The archive has never been opened. */
- fd = __open_nocancel (archfname, O_RDONLY|O_LARGEFILE|O_CLOEXEC);
+ fd = open_locale_archive ();
if (fd < 0)
/* Cannot open the archive, for whatever reason. */
return NULL;
@@ -397,8 +414,7 @@
if (fd == -1)
{
struct stat64 st;
- fd = __open_nocancel (archfname,
- O_RDONLY|O_LARGEFILE|O_CLOEXEC);
+ fd = open_locale_archive ();
if (fd == -1)
/* Cannot open the archive, for whatever reason. */
return NULL;
diff -Naur glibc-2.27-orig/locale/programs/locale.c glibc-2.27/locale/programs/locale.c
--- glibc-2.27-orig/locale/programs/locale.c 2018-02-01 11:17:18.000000000 -0500
+++ glibc-2.27/locale/programs/locale.c 2018-02-17 22:36:39.726293213 -0500
@@ -633,6 +633,24 @@
static int
+open_locale_archive (void)
+{
+ int fd = -1;
+ char *versioned_path = getenv ("LOCAL_ARCHIVE_2_27");
+ char *path = getenv ("LOCAL_ARCHIVE");
+ if (versioned_path)
+ fd = open64 (versioned_path, O_RDONLY);
+ if (path && fd < 0)
+ fd = open64 (path, O_RDONLY);
+ if (fd < 0)
+ fd = open64 (ARCHIVE_NAME, O_RDONLY);
+ if (fd < 0)
+ fd = open64 ("/usr/lib/locale/locale-archive", O_RDONLY);
+ return fd;
+}
+
+
+static int
write_archive_locales (void **all_datap, char *linebuf)
{
struct stat64 st;
@@ -644,7 +662,7 @@
int fd, ret = 0;
uint32_t cnt;
- fd = open64 (ARCHIVE_NAME, O_RDONLY);
+ fd = open_locale_archive ();
if (fd < 0)
return 0;
diff -Naur glibc-2.27-orig/locale/programs/locarchive.c glibc-2.27/locale/programs/locarchive.c
--- glibc-2.27-orig/locale/programs/locarchive.c 2018-02-01 11:17:18.000000000 -0500
+++ glibc-2.27/locale/programs/locarchive.c 2018-02-17 22:40:51.245293975 -0500
@@ -117,6 +117,22 @@
}
+static int
+open_locale_archive (const char * archivefname, int flags)
+{
+ int fd = -1;
+ char *versioned_path = getenv ("LOCAL_ARCHIVE_2_27");
+ char *path = getenv ("LOCAL_ARCHIVE");
+ if (versioned_path)
+ fd = open64 (versioned_path, flags);
+ if (path && fd < 0)
+ fd = open64 (path, flags);
+ if (fd < 0)
+ fd = open64 (archivefname, flags);
+ return fd;
+}
+
+
static void
create_archive (const char *archivefname, struct locarhandle *ah)
{
@@ -578,7 +594,7 @@
while (1)
{
/* Open the archive. We must have exclusive write access. */
- fd = open64 (archivefname, readonly ? O_RDONLY : O_RDWR);
+ fd = open_locale_archive (archivefname, readonly ? O_RDONLY : O_RDWR);
if (fd == -1)
{
/* Maybe the file does not yet exist? If we are opening

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, autoconf, automake, libtool }: { stdenv, fetchurl, autoconf, automake, libtool, hostPlatform }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "libatomic_ops-${version}"; name = "libatomic_ops-${version}";
@ -12,6 +12,9 @@ stdenv.mkDerivation rec {
sha256 ="1rif2hjscq5mh639nsnjhb90c01gnmy1sbmj6x6hsn1xmpnj95r1"; sha256 ="1rif2hjscq5mh639nsnjhb90c01gnmy1sbmj6x6hsn1xmpnj95r1";
}; };
# https://github.com/ivmai/libatomic_ops/pull/32
patches = if hostPlatform.isRiscV then [ ./riscv.patch ] else null;
nativeBuildInputs = stdenv.lib.optionals stdenv.isCygwin [ autoconf automake libtool ]; nativeBuildInputs = stdenv.lib.optionals stdenv.isCygwin [ autoconf automake libtool ];
preConfigure = stdenv.lib.optionalString stdenv.isCygwin '' preConfigure = stdenv.lib.optionalString stdenv.isCygwin ''

View File

@ -0,0 +1,40 @@
diff -Naur libatomic_ops-7.6.2-orig/src/atomic_ops/sysdeps/gcc/riscv.h libatomic_ops-7.6.2/src/atomic_ops/sysdeps/gcc/riscv.h
--- libatomic_ops-7.6.2-orig/src/atomic_ops/sysdeps/gcc/riscv.h 1969-12-31 19:00:00.000000000 -0500
+++ libatomic_ops-7.6.2/src/atomic_ops/sysdeps/gcc/riscv.h 2018-02-18 00:48:53.581721375 -0500
@@ -0,0 +1 @@
+#include "generic.h"
diff -Naur libatomic_ops-7.6.2-orig/src/atomic_ops.h libatomic_ops-7.6.2/src/atomic_ops.h
--- libatomic_ops-7.6.2-orig/src/atomic_ops.h 2017-12-24 03:31:12.000000000 -0500
+++ libatomic_ops-7.6.2/src/atomic_ops.h 2018-02-18 00:48:53.580721359 -0500
@@ -352,6 +352,9 @@
# if defined(__tile__)
# include "atomic_ops/sysdeps/gcc/tile.h"
# endif
+# if defined(__riscv)
+# include "atomic_ops/sysdeps/gcc/riscv.h"
+# endif
#endif /* __GNUC__ && !AO_USE_PTHREAD_DEFS */
#if (defined(__IBMC__) || defined(__IBMCPP__)) && !defined(__GNUC__) \
diff -Naur libatomic_ops-7.6.2-orig/src/Makefile.am libatomic_ops-7.6.2/src/Makefile.am
--- libatomic_ops-7.6.2-orig/src/Makefile.am 2017-12-24 03:31:12.000000000 -0500
+++ libatomic_ops-7.6.2/src/Makefile.am 2018-02-18 00:48:53.579721342 -0500
@@ -92,6 +92,7 @@
atomic_ops/sysdeps/gcc/mips.h \
atomic_ops/sysdeps/gcc/nios2.h \
atomic_ops/sysdeps/gcc/powerpc.h \
+ atomic_ops/sysdeps/gcc/riscv.h \
atomic_ops/sysdeps/gcc/s390.h \
atomic_ops/sysdeps/gcc/sh.h \
atomic_ops/sysdeps/gcc/sparc.h \
diff -Naur libatomic_ops-7.6.2-orig/src/Makefile.in libatomic_ops-7.6.2/src/Makefile.in
--- libatomic_ops-7.6.2-orig/src/Makefile.in 2017-12-24 03:32:23.000000000 -0500
+++ libatomic_ops-7.6.2/src/Makefile.in 2018-02-18 00:49:14.005062121 -0500
@@ -446,6 +446,7 @@
atomic_ops/sysdeps/gcc/mips.h \
atomic_ops/sysdeps/gcc/nios2.h \
atomic_ops/sysdeps/gcc/powerpc.h \
+ atomic_ops/sysdeps/gcc/riscv.h \
atomic_ops/sysdeps/gcc/s390.h \
atomic_ops/sysdeps/gcc/sh.h \
atomic_ops/sysdeps/gcc/sparc.h \

View File

@ -28,9 +28,9 @@ let inherit (stdenv.lib) optional optionals hasPrefix; in
let let
result = { result = {
# e.g. https://libav.org/releases/libav-11.11.tar.xz.sha1 # e.g. https://libav.org/releases/libav-11.11.tar.xz.sha1
libav_0_8 = libavFun "0.8.20" "0c7a2417c3a01eb74072691bb93ce802ae1be08f"; libav_0_8 = libavFun "0.8.21" "d858f65128dad0bac1a8c3a51e5cbb27a7c79b3f";
libav_11 = libavFun "11.11" "d7444fa4f135bdd7347cc962ab4b5228796b0f23"; libav_11 = libavFun "11.12" "61d5dcab5fde349834af193a572b12a5fd6a4d42";
libav_12 = libavFun "12.2" "3784b15f88076ca0ab8fb6b0377e975b83a5c9f5"; libav_12 = libavFun "12.3" "386c18c8b857f23dfcf456ce40370716130211d9";
}; };
libavFun = version : sha1 : stdenv.mkDerivation rec { libavFun = version : sha1 : stdenv.mkDerivation rec {
@ -125,7 +125,6 @@ let
license = with licenses; if enableUnfree then unfree #ToDo: redistributable or not? license = with licenses; if enableUnfree then unfree #ToDo: redistributable or not?
else if enableGPL then gpl2Plus else lgpl21Plus; else if enableGPL then gpl2Plus else lgpl21Plus;
platforms = with platforms; linux ++ darwin; platforms = with platforms; linux ++ darwin;
maintainers = [ maintainers.vcunat ];
}; };
}; # libavFun }; # libavFun

View File

@ -24,8 +24,7 @@ in stdenv.mkDerivation rec {
outputs = [ "bin" "dev" "out" "doc" "man" ]; outputs = [ "bin" "dev" "out" "doc" "man" ];
configureFlags = [ configureFlags = optional (!hostPlatform.isRiscV) "--enable-jit" ++ [
"--enable-jit"
"--enable-unicode-properties" "--enable-unicode-properties"
"--disable-cpp" "--disable-cpp"
] ]

View File

@ -101,10 +101,11 @@ let
qtxmlpatterns = callPackage ../modules/qtxmlpatterns.nix {}; qtxmlpatterns = callPackage ../modules/qtxmlpatterns.nix {};
env = callPackage ../qt-env.nix {}; env = callPackage ../qt-env.nix {};
full = env "qt-${qtbase.version}" ([ full = env "qt-full-${qtbase.version}" ([
qtcharts qtconnectivity qtdeclarative qtdoc qtgraphicaleffects qtcharts qtconnectivity qtdeclarative qtdoc qtgraphicaleffects
qtimageformats qtlocation qtmultimedia qtquickcontrols qtscript qtimageformats qtlocation qtmultimedia qtquickcontrols qtquickcontrols2
qtsensors qtserialport qtsvg qttools qttranslations qtwebsockets qtscript qtsensors qtserialport qtsvg qttools qttranslations
qtvirtualkeyboard qtwebchannel qtwebengine qtwebkit qtwebsockets
qtx11extras qtxmlpatterns qtx11extras qtxmlpatterns
] ++ optional (!stdenv.isDarwin) qtwayland ] ++ optional (!stdenv.isDarwin) qtwayland
++ optional (stdenv.isDarwin) qtmacextras); ++ optional (stdenv.isDarwin) qtmacextras);

View File

@ -113,7 +113,7 @@ let
qtxmlpatterns = callPackage ../modules/qtxmlpatterns.nix {}; qtxmlpatterns = callPackage ../modules/qtxmlpatterns.nix {};
env = callPackage ../qt-env.nix {}; env = callPackage ../qt-env.nix {};
full = env "qt-${qtbase.version}" [ full = env "qt-full-${qtbase.version}" [
qtconnectivity qtdeclarative qtdoc qtgraphicaleffects qtimageformats qtconnectivity qtdeclarative qtdoc qtgraphicaleffects qtimageformats
qtlocation qtmultimedia qtquickcontrols qtquickcontrols2 qtscript qtlocation qtmultimedia qtquickcontrols qtquickcontrols2 qtscript
qtsensors qtserialport qtsvg qttools qttranslations qtwayland qtsensors qtserialport qtsvg qttools qttranslations qtwayland

View File

@ -101,11 +101,12 @@ let
qtxmlpatterns = callPackage ../modules/qtxmlpatterns.nix {}; qtxmlpatterns = callPackage ../modules/qtxmlpatterns.nix {};
env = callPackage ../qt-env.nix {}; env = callPackage ../qt-env.nix {};
full = env "qt-${qtbase.version}" ([ full = env "qt-full-${qtbase.version}" ([
qtcharts qtconnectivity qtdeclarative qtdoc qtgraphicaleffects qtcharts qtconnectivity qtdeclarative qtdoc qtgraphicaleffects
qtimageformats qtlocation qtmultimedia qtquickcontrols qtscript qtimageformats qtlocation qtmultimedia qtquickcontrols qtquickcontrols2
qtsensors qtserialport qtsvg qttools qttranslations qtwebsockets qtscript qtsensors qtserialport qtsvg qttools qttranslations
qtx11extras qtxmlpatterns qtvirtualkeyboard qtvirtualkeyboard qtwebchannel qtwebengine qtwebkit qtwebsockets
qtx11extras qtxmlpatterns
] ++ optional (!stdenv.isDarwin) qtwayland ] ++ optional (!stdenv.isDarwin) qtwayland
++ optional (stdenv.isDarwin) qtmacextras); ++ optional (stdenv.isDarwin) qtmacextras);

View File

@ -13,9 +13,9 @@ buildEnv {
cat >"$out/bin/qt.conf" <<EOF cat >"$out/bin/qt.conf" <<EOF
[Paths] [Paths]
Prefix = $out Prefix = $out
Plugins = $qtPluginPrefix Plugins = ${qtbase.qtPluginPrefix}
Qml2Imports = $qtQmlPrefix Qml2Imports = ${qtbase.qtQmlPrefix}
Documentation = $qtDocPrefix Documentation = ${qtbase.qtDocPrefix}
EOF EOF
''; '';
} }

View File

@ -0,0 +1,24 @@
{ stdenv, fetchzip, ocaml, findlib, jbuilder, ssl, lwt }:
stdenv.mkDerivation rec {
version = "1.1.2";
name = "ocaml${ocaml.version}-lwt_ssl-${version}";
src = fetchzip {
url = "https://github.com/aantron/lwt_ssl/archive/${version}.tar.gz";
sha256 = "1q0an3djqjxv83v3iswi7m81braqx93kcrcwrxwmf6jzhdm4pn15";
};
buildInputs = [ ocaml findlib jbuilder ];
propagatedBuildInputs = [ ssl lwt ];
inherit (jbuilder) installPhase;
meta = {
homepage = "https://github.com/aantron/lwt_ssl";
description = "OpenSSL binding with concurrent I/O";
license = stdenv.lib.licenses.lgpl21;
maintainers = [ stdenv.lib.maintainers.vbgl ];
inherit (ocaml.meta) platforms;
};
}

View File

@ -3,13 +3,13 @@
, ipaddress, backports_ssl_match_hostname, docker_pycreds , ipaddress, backports_ssl_match_hostname, docker_pycreds
}: }:
buildPythonPackage rec { buildPythonPackage rec {
version = "3.0.0"; version = "2.7.0";
pname = "docker"; pname = "docker";
name = "${pname}-${version}"; name = "${pname}-${version}";
src = fetchurl { src = fetchurl {
url = "mirror://pypi/d/docker/${name}.tar.gz"; url = "mirror://pypi/d/docker/${name}.tar.gz";
sha256 = "4a1083656c6ac7615c19094d9b5e052f36e38d0b07e63d7e506c9b5b32c3abe2"; sha256 = "144248308e8ea31c4863c6d74e1b55daf97cc190b61d0fe7b7313ab920d6a76c";
}; };
propagatedBuildInputs = [ propagatedBuildInputs = [

View File

@ -0,0 +1,26 @@
{ stdenv, buildPythonPackage, fetchPypi, beautifulsoup4 }:
buildPythonPackage rec {
pname = "micawber";
version = "0.3.5";
src = fetchPypi {
inherit pname version;
sha256 = "0pnq6j8f144virhri0drgf0058x6qcxfd5yrb0ynbwr8djh326yn";
};
propagatedBuildInputs = [ beautifulsoup4 ];
meta = with stdenv.lib; {
homepage = http://micawber.readthedocs.io/en/latest/;
description = "A small library for extracting rich content from urls";
license = licenses.mit;
longDescription = ''
micawber supplies a few methods for retrieving rich metadata
about a variety of links, such as links to youtube videos.
micawber also provides functions for parsing blocks of text and html
and replacing links to videos with rich embedded content.
'';
maintainers = with maintainers; [ davidak ];
};
}

View File

@ -0,0 +1,32 @@
{ lib, buildPythonPackage, fetchurl, fetchpatch
, pytest, werkzeug, pygments
}:
buildPythonPackage rec {
name = "moinmoin-${ver}";
ver = "1.9.9";
src = fetchurl {
url = "http://static.moinmo.in/files/moin-${ver}.tar.gz";
sha256 = "197ga41qghykmir80ik17f9hjpmixslv3zjgj7bj9qvs1dvdg5s3";
};
patches = [
# Recommended to install on their download page.
(fetchpatch {
url = "https://bitbucket.org/thomaswaldmann/moin-1.9/commits/561b7a9c2bd91b61d26cd8a5f39aa36bf5c6159e/raw";
sha256 = "1nscnl9nspnrwyf3n95ig0ihzndryinq9kkghliph6h55cncfc65";
})
./fix_tests.patch
];
checkInputs = [ pytest werkzeug pygments ];
meta = with lib; {
description = "Advanced, easy to use and extensible WikiEngine";
homepage = "http://moinmo.in/";
license = licenses.gpl2Plus;
};
}

View File

@ -0,0 +1,16 @@
diff -ru3 moin-1.9.9-old/MoinMoin/conftest.py moin-1.9.9-new/MoinMoin/conftest.py
--- moin-1.9.9-old/MoinMoin/conftest.py 2016-10-31 23:44:02.000000000 +0300
+++ moin-1.9.9-new/MoinMoin/conftest.py 2018-02-18 12:13:19.551929093 +0300
@@ -22,10 +22,11 @@
import atexit
import sys
+import os
import py
-rootdir = py.magic.autopath().dirpath()
+rootdir = os.path.abspath(os.path.dirname(__file__))
moindir = rootdir.join("..")
sys.path.insert(0, str(moindir))

View File

@ -0,0 +1,24 @@
{ lib, buildPythonPackage, fetchFromGitHub, pynacl, six }:
buildPythonPackage rec {
pname = "pymacaroons-pynacl";
version = "0.9.3";
src = fetchFromGitHub {
owner = "matrix-org";
repo = "pymacaroons";
rev = "v${version}";
sha256 = "0bykjk01zdndp6gjr30x46blsn0cvxa7j0zh5g8raxwaawchjhii";
};
propagatedBuildInputs = [ pynacl six ];
# Tests require an old version of hypothesis
doCheck = false;
meta = with lib; {
description = "Macaroon library for Python";
homepage = https://github.com/matrix-org/pymacaroons;
license = licenses.mit;
};
}

View File

@ -11,11 +11,8 @@ buildPythonPackage rec {
sha256 = "0z9i1z4hjzmp23igyhvg131gikbrr947506lwfb3fayf0agwfv8f"; sha256 = "0z9i1z4hjzmp23igyhvg131gikbrr947506lwfb3fayf0agwfv8f";
}; };
#remove deadline from tests, see https://github.com/pyca/pynacl/issues/370 #set timeout to unlimited, remove deadline from tests, see https://github.com/pyca/pynacl/issues/370
preCheck = '' patches = [ ./pynacl-no-timeout-and-deadline.patch ];
sed -i 's/deadline=1500, //' tests/test_pwhash.py
sed -i 's/deadline=1500, //' tests/test_aead.py
'';
checkInputs = [ pytest coverage hypothesis ]; checkInputs = [ pytest coverage hypothesis ];
propagatedBuildInputs = [ libsodium cffi six ]; propagatedBuildInputs = [ libsodium cffi six ];

View File

@ -0,0 +1,49 @@
diff --git a/tests/test_pwhash.py b/tests/test_pwhash.py
index 9634c85..7f20316 100644
--- a/tests/test_pwhash.py
+++ b/tests/test_pwhash.py
@@ -20,7 +20,7 @@ import os
import sys
import unicodedata as ud
-from hypothesis import given, settings
+from hypothesis import given, settings, unlimited
from hypothesis.strategies import integers, text
import pytest
@@ -411,7 +411,7 @@ def test_str_verify_argon2_ref_fail(password_hash, password):
integers(min_value=1024 * 1024,
max_value=16 * 1024 * 1024)
)
-@settings(deadline=1500, max_examples=20)
+@settings(timeout=unlimited, deadline=None, max_examples=20)
def test_argon2i_str_and_verify(password, ops, mem):
_psw = password.encode('utf-8')
pw_hash = nacl.pwhash.argon2i.str(_psw, opslimit=ops, memlimit=mem)
@@ -425,7 +425,7 @@ def test_argon2i_str_and_verify(password, ops, mem):
integers(min_value=1024 * 1024,
max_value=16 * 1024 * 1024)
)
-@settings(deadline=1500, max_examples=20)
+@settings(timeout=unlimited, deadline=None, max_examples=20)
def test_argon2id_str_and_verify(password, ops, mem):
_psw = password.encode('utf-8')
pw_hash = nacl.pwhash.argon2id.str(_psw, opslimit=ops, memlimit=mem)
@@ -439,7 +439,7 @@ def test_argon2id_str_and_verify(password, ops, mem):
integers(min_value=1024 * 1024,
max_value=16 * 1024 * 1024)
)
-@settings(deadline=1500, max_examples=20)
+@settings(timeout=unlimited, deadline=None, max_examples=20)
def test_argon2i_str_and_verify_fail(password, ops, mem):
_psw = password.encode('utf-8')
pw_hash = nacl.pwhash.argon2i.str(_psw, opslimit=ops, memlimit=mem)
@@ -448,7 +448,7 @@ def test_argon2i_str_and_verify_fail(password, ops, mem):
@given(text(alphabet=PASSWD_CHARS, min_size=5, max_size=20))
-@settings(deadline=1500, max_examples=5)
+@settings(timeout=unlimited, deadline=None, max_examples=5)
def test_pwhash_str_and_verify(password):
_psw = password.encode('utf-8')

View File

@ -9,11 +9,11 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "yarl"; pname = "yarl";
version = "1.1.0"; version = "1.1.1";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "162630v7f98l27h11msk9416lqwm2mpgxh4s636594nlbfs9by3a"; sha256 = "a69dd7e262cdb265ac7d5e929d55f2f3d07baaadd158c8f19caebf8dde08dfe8";
}; };
checkInputs = [ pytest pytestrunner ]; checkInputs = [ pytest pytestrunner ];

View File

@ -31,6 +31,11 @@ stdenv.mkDerivation rec {
installFlags = [ "INSTALL_ROOT=$(out)" ] ++ optional withDocumentation "install_docs"; installFlags = [ "INSTALL_ROOT=$(out)" ] ++ optional withDocumentation "install_docs";
preConfigure = ''
substituteInPlace src/plugins/plugins.pro \
--replace '$$[QT_INSTALL_QML]/QtQuick/Controls' '${qtquickcontrols}/${qtbase.qtQmlPrefix}/QtQuick/Controls'
'';
preBuild = optional withDocumentation '' preBuild = optional withDocumentation ''
ln -s ${getLib qtbase}/$qtDocPrefix $NIX_QT5_TMP/share ln -s ${getLib qtbase}/$qtDocPrefix $NIX_QT5_TMP/share
''; '';

View File

@ -4,6 +4,8 @@ assert guileSupport -> ( pkgconfig != null && guile != null );
let let
version = "4.2.1"; version = "4.2.1";
needGlibcPatch = (stdenv.cc.libc.version or "") == "2.27";
in in
stdenv.mkDerivation { stdenv.mkDerivation {
name = "gnumake-${version}"; name = "gnumake-${version}";
@ -20,7 +22,7 @@ stdenv.mkDerivation {
# included Makefiles, don't look in /usr/include and friends. # included Makefiles, don't look in /usr/include and friends.
./impure-dirs.patch ./impure-dirs.patch
./pselect.patch ./pselect.patch
]; ] ++ stdenv.lib.optional needGlibcPatch ./glibc-2.27.patch;
nativeBuildInputs = stdenv.lib.optionals guileSupport [ pkgconfig ]; nativeBuildInputs = stdenv.lib.optionals guileSupport [ pkgconfig ];
buildInputs = stdenv.lib.optionals guileSupport [ guile ]; buildInputs = stdenv.lib.optionals guileSupport [ guile ];

View File

@ -0,0 +1,24 @@
From 48c8a116a914a325a0497721f5d8b58d5bba34d4 Mon Sep 17 00:00:00 2001
From: Paul Smith <psmith@gnu.org>
Date: Sun, 19 Nov 2017 15:09:16 -0500
Subject: * configure.ac: Support GLIBC glob interface version 2
---
configure.ac | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff -Naur a/configure b/configure
--- configure 2016-06-10 19:03:21.000000000 -0400
+++ configure 2018-02-18 04:40:32.971371555 -0500
@@ -11481,10 +11481,9 @@
#include <glob.h>
#include <fnmatch.h>
-#define GLOB_INTERFACE_VERSION 1
#if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1
# include <gnu-versions.h>
-# if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION
+# if _GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2
gnu glob
# endif
#endif

View File

@ -1,8 +1,9 @@
{ busybox }: { busybox, hostPlatform }:
# Minimal shell for use as basic /bin/sh in sandbox builds # Minimal shell for use as basic /bin/sh in sandbox builds
busybox.override { busybox.override {
useMusl = true; # musl roadmap has RISC-V support projected for 1.1.20
useMusl = !hostPlatform.isRiscV;
enableStatic = true; enableStatic = true;
enableMinimal = true; enableMinimal = true;
extraConfig = '' extraConfig = ''

View File

@ -3,13 +3,13 @@
with stdenv.lib; with stdenv.lib;
buildLinux (args // rec { buildLinux (args // rec {
version = "4.14.19"; version = "4.14.20";
# branchVersion needs to be x.y # branchVersion needs to be x.y
extraMeta.branch = concatStrings (intersperse "." (take 2 (splitString "." version))); extraMeta.branch = concatStrings (intersperse "." (take 2 (splitString "." version)));
src = fetchurl { src = fetchurl {
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
sha256 = "0gj7mq0dnb914mm4rari9z2cxbybskv1587606aq6f9nv1qp3kn5"; sha256 = "14njnspxmyzpapjzm8macrv411ss63xb39nb00xix75glqmg9dsa";
}; };
} // (args.argsOverride or {})) } // (args.argsOverride or {}))

View File

@ -3,7 +3,7 @@
with stdenv.lib; with stdenv.lib;
buildLinux (args // rec { buildLinux (args // rec {
version = "4.15.3"; version = "4.15.4";
# modDirVersion needs to be x.y.z, will automatically add .0 if needed # modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = concatStrings (intersperse "." (take 3 (splitString "." "${version}.0"))); modDirVersion = concatStrings (intersperse "." (take 3 (splitString "." "${version}.0")));
@ -13,6 +13,6 @@ buildLinux (args // rec {
src = fetchurl { src = fetchurl {
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
sha256 = "055p02in09rj95z9hc1kjh4r12ydwdcl3ds2cp4dckhlnyhnxf4g"; sha256 = "0fla9k90y6vaqvyjk81f59smcifcwickx4yr662m4whzkhd7wgd2";
}; };
} // (args.argsOverride or {})) } // (args.argsOverride or {}))

View File

@ -1,11 +1,11 @@
{ stdenv, buildPackages, hostPlatform, fetchurl, perl, buildLinux, ... } @ args: { stdenv, buildPackages, hostPlatform, fetchurl, perl, buildLinux, ... } @ args:
buildLinux (args // rec { buildLinux (args // rec {
version = "4.4.115"; version = "4.4.116";
extraMeta.branch = "4.4"; extraMeta.branch = "4.4";
src = fetchurl { src = fetchurl {
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
sha256 = "1pxm4r09402h4k8zgl0w1wm4vfvcaa3y7l36h50jr5wgi6l8rx2q"; sha256 = "18sz68gbms5rvjiy51b1dg1jlr7pwazw9fg6q5ffczk22icflvsn";
}; };
} // (args.argsOverride or {})) } // (args.argsOverride or {}))

View File

@ -1,11 +1,11 @@
{ stdenv, buildPackages, hostPlatform, fetchurl, perl, buildLinux, ... } @ args: { stdenv, buildPackages, hostPlatform, fetchurl, perl, buildLinux, ... } @ args:
buildLinux (args // rec { buildLinux (args // rec {
version = "4.9.81"; version = "4.9.82";
extraMeta.branch = "4.9"; extraMeta.branch = "4.9";
src = fetchurl { src = fetchurl {
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
sha256 = "1bjwca7m3ksab6d23a05ciphzaj6nv6qmc5n6dxrgim0yhjpmvk4"; sha256 = "105im51ax2cwfqkljfi1sqh6sap6sc76zh5l9n7fpbys04khnwab";
}; };
} // (args.argsOverride or {})) } // (args.argsOverride or {}))

View File

@ -3,9 +3,9 @@
with stdenv.lib; with stdenv.lib;
let let
version = "4.15.3"; version = "4.15.4";
revision = "a"; revision = "a";
sha256 = "1fxdllg60hwlbmjijcj7w6c3xz0rf9268f12qy45diahmydyccgc"; sha256 = "0j7nla8vjrxr82nfx8dl34qk8b56piwqbndqch9rv7plgl30hkj7";
# modVersion needs to be x.y.z, will automatically add .0 if needed # modVersion needs to be x.y.z, will automatically add .0 if needed
modVersion = concatStrings (intersperse "." (take 3 (splitString "." "${version}.0"))); modVersion = concatStrings (intersperse "." (take 3 (splitString "." "${version}.0")));

View File

@ -2,7 +2,7 @@
# Do not edit! # Do not edit!
{ {
version = "0.63.2"; version = "0.63.3";
components = { components = {
"nuimo_controller" = ps: with ps; [ ]; "nuimo_controller" = ps: with ps; [ ];
"bbb_gpio" = ps: with ps; [ ]; "bbb_gpio" = ps: with ps; [ ];

View File

@ -44,7 +44,7 @@ let
extraBuildInputs = extraPackages py.pkgs; extraBuildInputs = extraPackages py.pkgs;
# Don't forget to run parse-requirements.py after updating # Don't forget to run parse-requirements.py after updating
hassVersion = "0.63.2"; hassVersion = "0.63.3";
in with py.pkgs; buildPythonApplication rec { in with py.pkgs; buildPythonApplication rec {
pname = "homeassistant"; pname = "homeassistant";
@ -57,7 +57,7 @@ in with py.pkgs; buildPythonApplication rec {
owner = "home-assistant"; owner = "home-assistant";
repo = "home-assistant"; repo = "home-assistant";
rev = version; rev = version;
sha256 = "057xp3l3amzxbzzdqmgbmd0qk6fz29lpdbw3zcbjigjxbdi14h2l"; sha256 = "1lrdrn0x8i81vbqxziv5fgcc8ldz7x5r62kfz3nyg4g43rk3dqq8";
}; };
propagatedBuildInputs = [ propagatedBuildInputs = [

View File

@ -17,4 +17,5 @@ in with (import ../../../lib).systems.examples; {
i686-musl = make musl32; i686-musl = make musl32;
armv6l-musl = make muslpi; armv6l-musl = make muslpi;
aarch64-musl = make aarch64-multiplatform-musl; aarch64-musl = make aarch64-multiplatform-musl;
riscv64 = make riscv64;
} }

View File

@ -19,7 +19,7 @@ in with pkgs; rec {
tarMinimal = gnutar.override { acl = null; }; tarMinimal = gnutar.override { acl = null; };
busyboxMinimal = busybox.override { busyboxMinimal = busybox.override {
useMusl = true; useMusl = !targetPlatform.isRiscV;
enableStatic = true; enableStatic = true;
enableMinimal = true; enableMinimal = true;
extraConfig = '' extraConfig = ''
@ -143,7 +143,7 @@ in with pkgs; rec {
# These needed for cross but not native tools because the stdenv # These needed for cross but not native tools because the stdenv
# GCC has certain things built in statically. See # GCC has certain things built in statically. See
# pkgs/stdenv/linux/default.nix for the details. # pkgs/stdenv/linux/default.nix for the details.
cp -d ${isl_0_14.out}/lib/libisl*.so* $out/lib cp -d ${isl_0_17.out}/lib/libisl*.so* $out/lib
'' + '' '' + ''
cp -d ${bzip2.out}/lib/libbz2.so* $out/lib cp -d ${bzip2.out}/lib/libbz2.so* $out/lib

View File

@ -0,0 +1,25 @@
{ stdenv, fetchFromGitHub, autoreconfHook, libnet, libpcap }:
stdenv.mkDerivation rec {
version = "2.19";
name = "arping-${version}";
buildInputs = [ libnet libpcap ];
src = fetchFromGitHub {
owner = "ThomasHabets";
repo = "arping";
rev = "arping-${version}";
sha256 = "10gpil6ic17x8v628vhz9s98rnw1k8ci2xs56i52pr103irirczw";
};
nativeBuildInputs = [ autoreconfHook ];
meta = with stdenv.lib; {
description = "Broadcasts a who-has ARP packet on the network and prints answers";
homepage = https://github.com/ThomasHabets/arping;
license = with licenses; [ gpl2 ];
maintainers = [ maintainers.michalrus ];
platforms = platforms.unix;
};
}

View File

@ -0,0 +1,71 @@
{ lib
, stdenv
, fetchurl
, runCommand
, makeWrapper
, buildFHSUserEnv
, libselinux
, xorg
# Conda installs its packages and environments under this directory
, installationPath ? "~/.conda"
# Conda manages most pkgs itself, but expects a few to be on the system.
, condaDeps ? [ stdenv.cc xorg.libSM xorg.libICE xorg.libXrender libselinux ]
# Any extra nixpkgs you'd like available in the FHS env for Conda to use
, extraPkgs ? [ ]
}:
# How to use this package?
#
# First-time setup: this nixpkg downloads the conda installer and provides a FHS
# env in which it can run. On first use, the user will need to install conda to
# the installPath using the installer:
# $ nix-env -iA conda
# $ conda-shell
# $ conda-install
#
# Under normal usage, simply call `conda-shell` to activate the FHS env,
# and then use conda commands as normal:
# $ conda-shell
# $ conda install spyder
let
version = "4.3.31";
src = fetchurl {
url = "https://repo.continuum.io/miniconda/Miniconda3-${version}-Linux-x86_64.sh";
sha256 = "1rklq81s9v7xz1q0ha99w2sl6kyc5vhk6b21cza0jr3b8cgz0lam";
};
conda = runCommand "conda-install" { buildInputs = [ makeWrapper ]; }
''
mkdir -p $out/bin
cp ${src} $out/bin/miniconda-installer.sh
chmod +x $out/bin/miniconda-installer.sh
makeWrapper \
$out/bin/miniconda-installer.sh \
$out/bin/conda-install \
--add-flags "-p ${installationPath}" \
--add-flags "-b"
'';
in
buildFHSUserEnv {
name = "conda-shell";
targetPkgs = pkgs: (builtins.concatLists [ [ conda ] condaDeps extraPkgs]);
profile = ''
# Add conda to PATH
export PATH=${installationPath}/bin:$PATH
# Paths for gcc if compiling some C sources with pip
export NIX_CFLAGS_COMPILE="-I${installationPath}/include"
export NIX_CFLAGS_LINK="-L${installationPath}lib"
# Some other required environment variables
export FONTCONFIG_FILE=/etc/fonts/fonts.conf
export QTCOMPOSE=${xorg.libX11}/share/X11/locale
'';
meta = {
description = "Conda is a package manager for Python";
homepage = https://conda.io/;
platforms = lib.platforms.linux;
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ jluttine bhipple ];
};
}

View File

@ -30,7 +30,7 @@ let
buildInputs = [ curl openssl sqlite xz bzip2 ] buildInputs = [ curl openssl sqlite xz bzip2 ]
++ lib.optional (stdenv.isLinux || stdenv.isDarwin) libsodium ++ lib.optional (stdenv.isLinux || stdenv.isDarwin) libsodium
++ lib.optionals fromGit [ brotli ] # Since 1.12 ++ lib.optionals fromGit [ brotli ] # Since 1.12
++ lib.optional stdenv.isLinux libseccomp ++ lib.optional (stdenv.isLinux && !hostPlatform.isRiscV) libseccomp
++ lib.optional ((stdenv.isLinux || stdenv.isDarwin) && is20) ++ lib.optional ((stdenv.isLinux || stdenv.isDarwin) && is20)
(aws-sdk-cpp.override { (aws-sdk-cpp.override {
apis = ["s3"]; apis = ["s3"];
@ -55,7 +55,9 @@ let
] ]
++ lib.optional ( ++ lib.optional (
hostPlatform != buildPlatform && hostPlatform ? nix && hostPlatform.nix ? system hostPlatform != buildPlatform && hostPlatform ? nix && hostPlatform.nix ? system
) ''--with-system=${hostPlatform.nix.system}''; ) ''--with-system=${hostPlatform.nix.system}''
# RISC-V support in progress https://github.com/seccomp/libseccomp/pull/50
++ lib.optional hostPlatform.isRiscV "--disable-seccomp-sandboxing";
makeFlags = "profiledir=$(out)/etc/profile.d"; makeFlags = "profiledir=$(out)/etc/profile.d";
@ -124,12 +126,12 @@ in rec {
nixUnstable = (lib.lowPrio (common rec { nixUnstable = (lib.lowPrio (common rec {
name = "nix-2.0${suffix}"; name = "nix-2.0${suffix}";
suffix = "pre5950_3a5a241b"; suffix = "pre5951_690ac7c9";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "NixOS"; owner = "NixOS";
repo = "nix"; repo = "nix";
rev = "3a5a241b3209f14f8801b902ba20b5cb0666c9df"; rev = "690ac7c90b5bf3c599e210c53365c7d229c8b0ff";
sha256 = "0cwjyhgyfzi2dz561nj897zhkbyx6lzi49avcyia2pr4498jcl6k"; sha256 = "1yn2p38kp1i67makbawr1rhdiwihgnvk2zwrz0gvf6q65mj2k89c";
}; };
fromGit = true; fromGit = true;
})) // { perl-bindings = perl-bindings { nix = nixUnstable; }; }; })) // { perl-bindings = perl-bindings { nix = nixUnstable; }; };

View File

@ -0,0 +1,30 @@
{ stdenv, lib, fetchFromGitHub, makeWrapper, unzip, catdoc }:
stdenv.mkDerivation {
name = "catdocx-20170102";
src = fetchFromGitHub {
owner = "jncraton";
repo = "catdocx";
rev = "04fa0416ec1f116d4996685e219f0856d99767cb";
sha256 = "1sxiqhkvdqn300ygfgxdry2dj2cqzjhkzw13c6349gg5vxfypcjh";
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
mkdir -p $out/libexec $out/bin
cp catdocx.sh $out/libexec
chmod +x $out/libexec/catdocx.sh
wrapProgram $out/libexec/catdocx.sh --prefix PATH : "${lib.makeBinPath [ unzip catdoc ]}"
ln -s $out/libexec/catdocx.sh $out/bin/catdocx
'';
meta = with stdenv.lib; {
description = "Extracts plain text from docx files";
homepage = https://github.com/jncraton/catdocx;
license = with licenses; [ bsd3 ];
maintainers = [ maintainers.michalrus ];
platforms = platforms.all;
};
}

View File

@ -931,6 +931,8 @@ with pkgs;
catdoc = callPackage ../tools/text/catdoc { }; catdoc = callPackage ../tools/text/catdoc { };
catdocx = callPackage ../tools/text/catdocx { };
catclock = callPackage ../applications/misc/catclock { }; catclock = callPackage ../applications/misc/catclock { };
cde = callPackage ../tools/package-management/cde { }; cde = callPackage ../tools/package-management/cde { };
@ -1368,6 +1370,8 @@ with pkgs;
appdata-tools = callPackage ../tools/misc/appdata-tools { }; appdata-tools = callPackage ../tools/misc/appdata-tools { };
arping = callPackage ../tools/networking/arping { };
asciidoc = callPackage ../tools/typesetting/asciidoc { asciidoc = callPackage ../tools/typesetting/asciidoc {
inherit (python2Packages) matplotlib numpy aafigure recursivePthLoader; inherit (python2Packages) matplotlib numpy aafigure recursivePthLoader;
w3m = w3m-batch; w3m = w3m-batch;
@ -1677,6 +1681,8 @@ with pkgs;
checkbashisms = callPackage ../development/tools/misc/checkbashisms { }; checkbashisms = callPackage ../development/tools/misc/checkbashisms { };
ckb = libsForQt5.callPackage ../tools/misc/ckb { };
clamav = callPackage ../tools/security/clamav { }; clamav = callPackage ../tools/security/clamav { };
clex = callPackage ../tools/misc/clex { }; clex = callPackage ../tools/misc/clex { };
@ -1699,10 +1705,10 @@ with pkgs;
cloud-utils = callPackage ../tools/misc/cloud-utils { }; cloud-utils = callPackage ../tools/misc/cloud-utils { };
ckb = libsForQt5.callPackage ../tools/misc/ckb { };
compass = callPackage ../development/tools/compass { }; compass = callPackage ../development/tools/compass { };
conda = callPackage ../tools/package-management/conda { };
convmv = callPackage ../tools/misc/convmv { }; convmv = callPackage ../tools/misc/convmv { };
convoy = callPackage ../tools/filesystems/convoy { }; convoy = callPackage ../tools/filesystems/convoy { };
@ -5872,7 +5878,7 @@ with pkgs;
inherit noSysDirs; inherit noSysDirs;
# PGO seems to speed up compilation by gcc by ~10%, see #445 discussion # PGO seems to speed up compilation by gcc by ~10%, see #445 discussion
profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64)); profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64));
isl = if !stdenv.isDarwin then isl_0_14 else null; isl = if !stdenv.isDarwin then isl_0_17 else null;
# just for stage static # just for stage static
crossStageStatic = true; crossStageStatic = true;
@ -8745,6 +8751,9 @@ with pkgs;
glibc = callPackage ../development/libraries/glibc { glibc = callPackage ../development/libraries/glibc {
installLocales = config.glibc.locales or false; installLocales = config.glibc.locales or false;
}; };
glibc_2_27 = callPackage ../development/libraries/glibc/2.27.nix {
installLocales = config.glibc.locales or false;
};
glibc_memusage = callPackage ../development/libraries/glibc { glibc_memusage = callPackage ../development/libraries/glibc {
installLocales = false; installLocales = false;
@ -8752,7 +8761,11 @@ with pkgs;
}; };
# Being redundant to avoid cycles on boot. TODO: find a better way # Being redundant to avoid cycles on boot. TODO: find a better way
glibcCross = callPackage ../development/libraries/glibc { glibcCross = let
expr = if hostPlatform.isRiscV
then ../development/libraries/glibc/2.27.nix
else ../development/libraries/glibc;
in callPackage expr {
installLocales = config.glibc.locales or false; installLocales = config.glibc.locales or false;
stdenv = crossLibcStdenv; stdenv = crossLibcStdenv;
}; };
@ -12944,7 +12957,7 @@ with pkgs;
inherit (callPackages ../os-specific/linux/kernel-headers { }) inherit (callPackages ../os-specific/linux/kernel-headers { })
linuxHeaders_4_4 linuxHeaders_4_15; linuxHeaders_4_4 linuxHeaders_4_15;
linuxHeaders = if hostPlatform.isMusl then linuxHeaders_4_15 else linuxHeaders_4_4; linuxHeaders = if hostPlatform.isMusl || hostPlatform.isRiscV then linuxHeaders_4_15 else linuxHeaders_4_4;
kernelPatches = callPackage ../os-specific/linux/kernel/patches.nix { }; kernelPatches = callPackage ../os-specific/linux/kernel/patches.nix { };
@ -16915,6 +16928,8 @@ with pkgs;
inherit (darwin.stubs) rez setfile; inherit (darwin.stubs) rez setfile;
}; };
qemu-riscv = callPackage ../applications/virtualization/qemu/riscv.nix {};
qgis = callPackage ../applications/gis/qgis {}; qgis = callPackage ../applications/gis/qgis {};
qgroundcontrol = libsForQt5.callPackage ../applications/science/robotics/qgroundcontrol { }; qgroundcontrol = libsForQt5.callPackage ../applications/science/robotics/qgroundcontrol { };

View File

@ -375,6 +375,10 @@ let
lwt = lwt3; lwt = lwt3;
}; };
lwt_ssl = callPackage ../development/ocaml-modules/lwt_ssl {
lwt = lwt3;
};
macaque = callPackage ../development/ocaml-modules/macaque { }; macaque = callPackage ../development/ocaml-modules/macaque { };
magic-mime = callPackage ../development/ocaml-modules/magic-mime { }; magic-mime = callPackage ../development/ocaml-modules/magic-mime { };

View File

@ -10139,6 +10139,8 @@ in {
}; };
}; };
micawber = callPackage ../development/python-modules/micawber { };
minimock = buildPythonPackage rec { minimock = buildPythonPackage rec {
version = "1.2.8"; version = "1.2.8";
name = "minimock-${version}"; name = "minimock-${version}";
@ -10372,24 +10374,8 @@ in {
}; };
}; };
moinmoin = buildPythonPackage (rec { # Needed here because moinmoin is loaded as a Python library.
name = "moinmoin-${ver}"; moinmoin = callPackage ../development/python-modules/moinmoin { };
disabled = isPy3k;
ver = "1.9.8";
src = pkgs.fetchurl {
url = "http://static.moinmo.in/files/moin-${ver}.tar.gz";
sha256 = "19hi16iy75lpx9ch799djc4hr4gai5rmvi542n29x6zhikysfjx7";
};
meta = {
description = "Advanced, easy to use and extensible WikiEngine";
homepage = http://moinmo.in/;
license = licenses.gpl2Plus;
};
});
moretools = callPackage ../development/python-modules/moretools { }; moretools = callPackage ../development/python-modules/moretools { };
@ -19960,18 +19946,7 @@ EOF
propagatedBuildInputs = with self; []; propagatedBuildInputs = with self; [];
}; };
pymacaroons-pynacl = buildPythonPackage rec { pymacaroons-pynacl = callPackage ../development/python-modules/pymacaroons-pynacl { };
name = "pymacaroons-pynacl-${version}";
version = "0.9.3";
src = pkgs.fetchgit {
url = "https://github.com/matrix-org/pymacaroons.git";
rev = "refs/tags/v${version}";
sha256 = "0bykjk01zdndp6gjr30x46blsn0cvxa7j0zh5g8raxwaawchjhii";
};
propagatedBuildInputs = with self; [ pynacl six ];
};
pynacl = callPackage ../development/python-modules/pynacl { }; pynacl = callPackage ../development/python-modules/pynacl { };