Skip to content

Commit

Permalink
Merge branch 'ericson2314-cross-master' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
Ericson2314 committed Jan 16, 2018
2 parents 990ff97 + 5d8b359 commit 5a754e7
Show file tree
Hide file tree
Showing 40 changed files with 724 additions and 518 deletions.
20 changes: 15 additions & 5 deletions lib/customisation.nix
Expand Up @@ -36,7 +36,7 @@ rec {
overrideDerivation = drv: f:
let
newDrv = derivation (drv.drvAttrs // (f drv));
in addPassthru newDrv (
in lib.flip (extendDerivation true) newDrv (
{ meta = drv.meta or {};
passthru = if drv ? passthru then drv.passthru else {};
}
Expand Down Expand Up @@ -131,8 +131,8 @@ rec {


/* Add attributes to each output of a derivation without changing
the derivation itself. */
addPassthru = drv: passthru:
the derivation itself and check a given condition when evaluating. */
extendDerivation = condition: passthru: drv:
let
outputs = drv.outputs or [ "out" ];

Expand All @@ -142,13 +142,23 @@ rec {
outputToAttrListElement = outputName:
{ name = outputName;
value = commonAttrs // {
inherit (drv.${outputName}) outPath drvPath type outputName;
inherit (drv.${outputName}) type outputName;
drvPath = assert condition; drv.${outputName}.drvPath;
outPath = assert condition; drv.${outputName}.outPath;
};
};

outputsList = map outputToAttrListElement outputs;
in commonAttrs // { outputUnspecified = true; };
in commonAttrs // {
outputUnspecified = true;
drvPath = assert condition; drv.drvPath;
outPath = assert condition; drv.outPath;
};

/* Add attributes to each output of a derivation without changing
the derivation itself. */
addPassthru = lib.warn "`addPassthru` is deprecated, replace with `extendDerivation true`"
(extendDerivation true);

/* Strip a derivation of all non-essential attributes, returning
only those needed by hydra-eval-jobs. Also strictly evaluate the
Expand Down
3 changes: 2 additions & 1 deletion lib/default.nix
Expand Up @@ -87,7 +87,8 @@ let
inherit (stringsWithDeps) textClosureList textClosureMap
noDepEntry fullDepEntry packEntry stringAfter;
inherit (customisation) overrideDerivation makeOverridable
callPackageWith callPackagesWith addPassthru hydraJob makeScope;
callPackageWith callPackagesWith extendDerivation addPassthru
hydraJob makeScope;
inherit (meta) addMetaAttrs dontDistribute setName updateName
appendToName mapDerivationAttrset lowPrio lowPrioSet hiPrio
hiPrioSet;
Expand Down
1 change: 1 addition & 0 deletions lib/maintainers.nix
Expand Up @@ -60,6 +60,7 @@
arobyn = "Alexei Robyn <shados@shados.net>";
artuuge = "Artur E. Ruuge <artuuge@gmail.com>";
ashalkhakov = "Artyom Shalkhakov <artyom.shalkhakov@gmail.com>";
ashgillman = "Ashley Gillman <gillmanash@gmail.com>";
aske = "Kirill Boltaev <aske@fmap.me>";
asppsa = "Alastair Pharo <asppsa@gmail.com>";
astsmtl = "Alexander Tsamutali <astsmtl@yandex.ru>";
Expand Down
14 changes: 13 additions & 1 deletion maintainers/scripts/rebuild-amount.sh
@@ -1,9 +1,16 @@
#!/usr/bin/env bash
set -e

# --print: avoid dependency on environment
optPrint=
if [ "$1" == "--print" ]; then
optPrint=true
shift
fi

if [ "$#" != 1 ] && [ "$#" != 2 ]; then
cat <<-EOF
Usage: $0 commit-spec [commit-spec]
Usage: $0 [--print] commit-spec [commit-spec]
You need to be in a git-controlled nixpkgs tree.
The current state of the tree will be used if the second commit is missing.
EOF
Expand Down Expand Up @@ -113,3 +120,8 @@ newPkgs "${tree[1]}" "${tree[2]}" '--argstr system "x86_64-linux"' > "$newlist"
sed -n 's/\([^. ]*\.\)*\([^. ]*\) .*$/\2/p' < "$newlist" \
| sort | uniq -c

if [ -n "$optPrint" ]; then
echo
cat "$newlist"
fi

7 changes: 6 additions & 1 deletion nixos/doc/manual/release-notes/rl-1803.xml
Expand Up @@ -113,7 +113,7 @@ following incompatible changes:</para>
</listitem>
<listitem>
<para>
<literal>cc-wrapper</literal>has been split in two; there is now also a <literal>bintools-wrapper</literal>.
<literal>cc-wrapper</literal> has been split in two; there is now also a <literal>bintools-wrapper</literal>.
The most commonly used files in <filename>nix-support</filename> are now split between the two wrappers.
Some commonly used ones, like <filename>nix-support/dynamic-linker</filename>, are duplicated for backwards compatability, even though they rightly belong only in <literal>bintools-wrapper</literal>.
Other more obscure ones are just moved.
Expand All @@ -131,6 +131,11 @@ following incompatible changes:</para>
Other types dependencies should be unaffected.
</para>
</listitem>
<listitem>
<para>
<literal>lib.addPassthru</literal> is removed. Use <literal>lib.extendDerivation true</literal> instead. <emphasis role="strong">TODO: actually remove it before branching 18.03 off.</emphasis>
</para>
</listitem>
<listitem>
<para>
The <literal>memcached</literal> service no longer accept dynamic socket
Expand Down
6 changes: 3 additions & 3 deletions pkgs/applications/editors/eclipse/plugins.nix
Expand Up @@ -192,12 +192,12 @@ rec {

checkstyle = buildEclipseUpdateSite rec {
name = "checkstyle-${version}";
version = "8.5.1.201712211522";
version = "8.7.0.201801131309";

src = fetchzip {
stripRoot = false;
url = "mirror://sourceforge/project/eclipse-cs/Eclipse%20Checkstyle%20Plug-in/8.5.1/net.sf.eclipsecs-updatesite_${version}.zip";
sha256 = "0nid4a4qib9vx34ddry7sylj20p2d47dd0vn4zqqmj5dgqx1a1ab";
url = "mirror://sourceforge/project/eclipse-cs/Eclipse%20Checkstyle%20Plug-in/8.7.0/net.sf.eclipsecs-updatesite_${version}.zip";
sha256 = "07fymk705x4mwq7vh2i6frsf67jql4bzrkdzhb4n74zb0g1dib60";
};

meta = with stdenv.lib; {
Expand Down
46 changes: 24 additions & 22 deletions pkgs/applications/editors/rstudio/default.nix
@@ -1,10 +1,10 @@
{ stdenv, fetchurl, fetchpatch, makeDesktopItem, cmake, boost, zlib, openssl
, R, qtbase, qtwebkit, qtwebchannel, libuuid, hunspellDicts, unzip, ant, jdk
, gnumake, makeWrapper, pandoc
{ stdenv, fetchurl, fetchFromGitHub, makeDesktopItem, cmake, boost
, zlib, openssl, R, qtbase, qtwebkit, qtwebchannel, libuuid, hunspellDicts
, unzip, ant, jdk, gnumake, makeWrapper, pandoc
}:

let
version = "1.1.383";
version = "1.1.414";
ginVer = "1.5";
gwtVer = "2.7.0";
in
Expand All @@ -15,19 +15,15 @@ stdenv.mkDerivation rec {

buildInputs = [ boost zlib openssl R qtbase qtwebkit qtwebchannel libuuid ];

src = fetchurl {
url = "https://github.com/rstudio/rstudio/archive/v${version}.tar.gz";
sha256 = "06680l9amq03b4jarmzfr605bijhb79fip9rk464zab6hgwqbp3f";
src = fetchFromGitHub {
owner = "rstudio";
repo = "rstudio";
rev = "v${version}";
sha256 = "1rr2zkv53r8swhq5d745jpp0ivxpsizzh7srf34isqpkn5pgx3v8";
};

# Hack RStudio to only use the input R.
patches = [
./r-location.patch
(fetchpatch {
url = https://aur.archlinux.org/cgit/aur.git/plain/socketproxy-openssl.patch?h=rstudio-desktop-git;
sha256 = "0ywq9rk14s5961l6hvd3cw70jsm73r16h0bsh4yp52vams7cwy9d";
})
];
patches = [ ./r-location.patch ];
postPatch = "substituteInPlace src/cpp/core/r_util/REnvironmentPosix.cpp --replace '@R@' ${R}";

inherit ginVer;
Expand All @@ -49,14 +45,18 @@ stdenv.mkDerivation rec {
sha256 = "0wbcqb9rbfqqvvhqr1pbqax75wp8ydqdyhp91fbqfqp26xzjv6lk";
};

rmarkdownSrc = fetchurl {
url = "https://github.com/rstudio/rmarkdown/archive/95b8b1fa64f78ca99f225a67fff9817103be56.zip";
sha256 = "12fa65qr04rwsprkmyl651mkaqcbn1znwsmcjg4qsk9n5nxg0fah";
rmarkdownSrc = fetchFromGitHub {
owner = "rstudio";
repo = "rmarkdown";
rev = "v1.8";
sha256 = "1blqxdr1vp2z5wd52nmf8hq36sdd4s2pyms441dqj50v35f8girb";
};

rsconnectSrc = fetchurl {
url = "https://github.com/rstudio/rsconnect/archive/425f3767b3142bc6b81c9eb62c4722f1eedc9781.zip";
sha256 = "1sgf9dj9wfk4c6n5p1jc45386pf0nj2alg2j9qx09av3can1dy9p";
rsconnectSrc = fetchFromGitHub {
owner = "rstudio";
repo = "rsconnect";
rev = "953c945779dd180c1bfe68f41c173c13ec3e222d";
sha256 = "1yxwd9v4mvddh7m5rbljicmssw7glh1lhin7a9f01vxxa92vpj7z";
};

rstudiolibclang = fetchurl {
Expand Down Expand Up @@ -88,8 +88,10 @@ stdenv.mkDerivation rec {
done
unzip $mathJaxSrc -d dependencies/common/mathjax-26
unzip $rmarkdownSrc -d dependencies/common/rmarkdown
unzip $rsconnectSrc -d dependencies/common/rsconnect
mkdir -p dependencies/common/rmarkdown
ln -s $rmarkdownSrc dependencies/common/rmarkdown/
mkdir -p dependencies/common/rsconnect
ln -s $rsconnectSrc dependencies/common/rsconnect/
mkdir -p dependencies/common/libclang/3.5
unzip $rstudiolibclang -d dependencies/common/libclang/3.5
mkdir -p dependencies/common/libclang/builtin-headers
Expand Down
15 changes: 14 additions & 1 deletion pkgs/applications/networking/apache-directory-studio/default.nix
@@ -1,9 +1,20 @@
{ stdenv, fetchurl, xorg, jre, makeWrapper }:
{ stdenv, fetchurl, xorg, jre, makeWrapper, makeDesktopItem }:

let
rpath = stdenv.lib.makeLibraryPath (with xorg; [
libXtst
]);

desktopItem = makeDesktopItem {
name = "apache-directory-studio";
exec = "ApacheDirectoryStudio";
icon = "apache-directory-studio";
comment = "Eclipse-based LDAP browser and directory client";
desktopName = "Apache Directory Studio";
genericName = "Apache Directory Studio";
categories = "Java;Network";
};

in
stdenv.mkDerivation rec {
name = "apache-directory-studio-${version}";
Expand Down Expand Up @@ -36,6 +47,8 @@ stdenv.mkDerivation rec {
"$out/bin/ApacheDirectoryStudio" \
--prefix PATH : "${jre}/bin" \
--prefix LD_LIBRARY_PATH : "${rpath}"
install -D icon.xpm "$out/share/pixmaps/apache-directory-studio.xpm"
install -D -t "$out/share/applications" ${desktopItem}/share/applications/*
'';

meta = with stdenv.lib; {
Expand Down
Expand Up @@ -13,6 +13,8 @@ stdenv.mkDerivation rec {
sha256 = "05z9kvd7gwr59ic7hnmbayhwyyqd41xxz01cvdlcgplk3z7zlwg5";
};

patches = [ ./tls-0.9.0.patch ];

buildInputs = with ocamlPackages; [
ocaml ocamlbuild findlib topkg ppx_sexp_conv
erm_xmpp_0_3 tls nocrypto x509 ocaml_lwt otr astring
Expand Down
@@ -0,0 +1,29 @@
diff --git a/cli/cli_config.ml b/cli/cli_config.ml
index 991ee77..59a0edb 100644
--- a/cli/cli_config.ml
+++ b/cli/cli_config.ml
@@ -207,7 +207,9 @@ let configure term () =
ask above "CA file: " (fun x -> x) (fun x -> if Sys.file_exists x then `Ok x else `Invalid) term >>= fun trust_anchor ->
Lwt_unix.access trust_anchor [ Unix.F_OK ; Unix.R_OK ] >>= fun () ->
X509_lwt.certs_of_pem trust_anchor >>= fun tas ->
- (match X509.Validation.valid_cas ~time:(Unix.time ()) tas with
+ let time = match Ptime.of_float_s (Unix.time ())
+ with Some time -> time | None -> assert false in
+ (match X509.Validation.valid_cas ~time tas with
| [] -> Lwt.fail (Invalid_argument "trust anchor file is empty!")
| _ -> Lwt.return (`Trust_anchor trust_anchor))
| Some fp -> Lwt.return (`Fingerprint fp) ) >>= fun authenticator ->
diff --git a/cli/cli_state.ml b/cli/cli_state.ml
index d5db502..91540c9 100644
--- a/cli/cli_state.ml
+++ b/cli/cli_state.ml
@@ -262,7 +262,8 @@ module Connect = struct
(match config.Xconfig.authenticator with
| `Trust_anchor x -> X509_lwt.authenticator (`Ca_file x)
| `Fingerprint fp ->
- let time = Unix.gettimeofday () in
+ let time = match Ptime.of_float_s (Unix.gettimeofday ())
+ with Some time -> time | None -> assert false in
let fp =
Nocrypto.Uncommon.Cs.of_hex
(String.map (function ':' -> ' ' | x -> x) fp)
12 changes: 11 additions & 1 deletion pkgs/applications/networking/p2p/transmission/default.nix
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, intltool, file, wrapGAppsHook
{ stdenv, fetchurl, fetchpatch, pkgconfig, intltool, file, wrapGAppsHook
, openssl, curl, libevent, inotify-tools, systemd, zlib
, enableGTK3 ? false, gtk3
, enableSystemd ? stdenv.isLinux
Expand Down Expand Up @@ -27,6 +27,16 @@ stdenv.mkDerivation rec {
++ optionals enableSystemd [ systemd ]
++ optionals stdenv.isLinux [ inotify-tools ];

patches = [
(fetchpatch {
# See https://github.com/transmission/transmission/pull/468
# Patch from: https://github.com/transmission/transmission/pull/468#issuecomment-357098126
name = "transmission-fix-dns-rebinding-vuln.patch";
url = https://github.com/transmission/transmission/files/1624507/transmission-fix-dns-rebinding-vuln.patch.txt;
sha256 = "1p9m20kp4kdyp5jjr3yp5px627n8cfa29mg5n3wzsdfv0qzk9gy4";
})
];

postPatch = ''
substituteInPlace ./configure \
--replace "libsystemd-daemon" "libsystemd" \
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/networking/sniffers/wireshark/default.nix
Expand Up @@ -12,15 +12,15 @@ assert withQt -> !withGtk && qt5 != null;
with stdenv.lib;

let
version = "2.4.3";
version = "2.4.4";
variant = if withGtk then "gtk" else if withQt then "qt" else "cli";

in stdenv.mkDerivation {
name = "wireshark-${variant}-${version}";

src = fetchurl {
url = "http://www.wireshark.org/download/src/all-versions/wireshark-${version}.tar.xz";
sha256 = "0bpiby916k3k8bm7q8b1dflva6zs0a4ircskrck0d538dfcrb50q";
sha256 = "0n3g28hrhifnchlz4av0blq4ykm4zaxwwxbzdm9wsba27677b6h4";
};

cmakeFlags = [
Expand Down
17 changes: 11 additions & 6 deletions pkgs/applications/office/mendeley/default.nix
Expand Up @@ -31,6 +31,8 @@
# will leave entries on your system after uninstalling mendeley.
# (they can be removed by running '$out/bin/install-mendeley-link-handler.sh -u')
, autorunLinkHandler ? true
# Update script
, writeScript
}:

assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
Expand All @@ -43,14 +45,14 @@ let
then "i386"
else "amd64";

shortVersion = "1.17.12-stable";
shortVersion = "1.17.13-stable";

version = "${shortVersion}_${arch}";

url = "http://desktop-download.mendeley.com/download/apt/pool/main/m/mendeleydesktop/mendeleydesktop_${version}.deb";
sha256 = if stdenv.system == arch32
then "09n910ny8k103g1v8m19f9n827l2y0kmz79cwgy95k6acf2rkc2x"
else "11z65mj1a2rw6cwfarl8r1vzpcz4ww5mgvd5fyv31l60mbmnqkap";
then "0q4x62k00whmq8lskphpcxc610cvclxzcr5k0v7pxjxs9sx5yx43"
else "01ylyily1hip35z0d4qkdpbzp5yn4r015psc5773xsqlgrnlwjm3";

deps = [
qtbase
Expand Down Expand Up @@ -133,11 +135,14 @@ stdenv.mkDerivation {
dontStrip = true;
dontPatchElf = true;

meta = {
updateScript = import ./update.nix { inherit writeScript; };

meta = with stdenv.lib; {
homepage = http://www.mendeley.com;
description = "A reference manager and academic social network";
license = stdenv.lib.licenses.unfree;
platforms = stdenv.lib.platforms.linux;
license = licenses.unfree;
platforms = platforms.linux;
maintainers = with maintainers; [ dtzWill ];
};

}

0 comments on commit 5a754e7

Please sign in to comment.