From 42ff593555c9f74429441082a898b7d42bd5b287 Mon Sep 17 00:00:00 2001 From: John Ramsden Date: Sun, 7 May 2017 16:05:53 -0700 Subject: [PATCH 01/42] nylas-mail: 2.0.31 Added new email client Nylas-Mail. --- .../mailreaders/nylas-mail/default.nix | 134 ++++++++++++++++++ pkgs/top-level/all-packages.nix | 7 +- 2 files changed, 140 insertions(+), 1 deletion(-) create mode 100644 pkgs/applications/networking/mailreaders/nylas-mail/default.nix diff --git a/pkgs/applications/networking/mailreaders/nylas-mail/default.nix b/pkgs/applications/networking/mailreaders/nylas-mail/default.nix new file mode 100644 index 00000000000..6914dbdb7bf --- /dev/null +++ b/pkgs/applications/networking/mailreaders/nylas-mail/default.nix @@ -0,0 +1,134 @@ +{ config +, stdenv +, pkgs +, fetchurl +, dpkg +, lib +, gnome2 +, libgnome_keyring +, desktop_file_utils +, python2 +, nodejs +, libnotify +, alsaLib +, atk +, glib +, pango +, gdk_pixbuf +, cairo +, freetype +, fontconfig +, dbus +, nss +, nspr +, cups +, expat +, wget +, udev +, xorg +, libgcrypt +, makeWrapper +, gcc-unwrapped +, coreutils +}: + +stdenv.mkDerivation rec { + name = "${pkgname}-${version}"; + pkgname = "nylas-mail"; + version = "2.0.31"; + subVersion = "e675deb"; + + src = fetchurl { + url = "https://edgehill.s3-us-west-2.amazonaws.com/${version}-${subVersion}/linux-deb/x64/NylasMail.deb"; + sha256 = "b036956174f998bd4a2662a1f59cb4a302465b3ed06c487de88ff2721e372f6e"; + }; + + # Build dependencies + propagatedBuildInputs = [ + gnome2.gtk + gnome2.GConf + libgnome_keyring + desktop_file_utils + python2 + nodejs + libnotify + alsaLib + atk + glib + pango + gdk_pixbuf + cairo + freetype + fontconfig + dbus + nss + nspr + cups + expat + wget + udev + gcc-unwrapped + coreutils + xorg.libXScrnSaver + xorg.libXi + xorg.libXtst + xorg.libXcursor + xorg.libXdamage + xorg.libXrandr + xorg.libXcomposite + xorg.libXext + xorg.libXfixes + xorg.libXrender + xorg.libX11 + xorg.libxkbfile + ]; + + # Runtime dependencies + buildInputs = [ makeWrapper gnome2.gnome_keyring ]; + + phases = [ "unpackPhase" ]; + + unpackPhase = '' + mkdir -p $out + + ${dpkg}/bin/dpkg-deb -x $src unpacked + mv unpacked/usr/* $out/ + + # Fix path in desktop file + substituteInPlace $out/share/applications/nylas-mail.desktop \ + --replace /usr/bin/nylas-mail $out/bin/nylas-mail + + # Patch librariess + noderp=$(patchelf --print-rpath $out/share/nylas-mail/libnode.so) + patchelf --set-rpath $noderp:$out/lib:${stdenv.cc.cc.lib}/lib:${xorg.libxkbfile.out}/lib:${lib.makeLibraryPath propagatedBuildInputs } \ + $out/share/nylas-mail/libnode.so + + ffrp=$(patchelf --print-rpath $out/share/nylas-mail/libffmpeg.so) + patchelf --set-rpath $ffrp:$out/lib:${stdenv.cc.cc.lib}/lib:${lib.makeLibraryPath propagatedBuildInputs } \ + $out/share/nylas-mail/libffmpeg.so + + # Patch binaries + binrp=$(patchelf --print-rpath $out/share/nylas-mail/nylas) + patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ + --set-rpath $binrp:$out/lib:${stdenv.cc.cc.lib}/lib:${lib.makeLibraryPath propagatedBuildInputs } \ + $out/share/nylas-mail/nylas + + wrapProgram $out/share/nylas-mail/nylas --set LD_LIBRARY_PATH "${xorg.libxkbfile}/lib:${pkgs.gnome3.libgnome_keyring}/lib"; + + # Fix path to bash so apm can install plugins. + substituteInPlace $out/share/nylas-mail/resources/apm/bin/apm \ + --replace /bin/bash ${stdenv.shell} + + wrapProgram $out/share/nylas-mail/resources/apm/bin/apm \ + --set PATH "${coreutils}/bin" + patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ + --set-rpath ${gcc-unwrapped.lib}/lib \ + $out/share/nylas-mail/resources/apm/bin/node + ''; + + meta = { + description = "Nylas Mail is an open-source mail client built on the modern web with Electron, React, and Flux. It is designed to be extensible, so it's easy to create new experiences and workflows around email."; + license = stdenv.lib.licenses.gpl3; + homepage = https://nylas.com; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bebd1058e97..0913505b277 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1022,8 +1022,11 @@ with pkgs; mpdris2 = callPackage ../tools/audio/mpdris2 { }; + nfdump = callPackage ../tools/networking/nfdump { }; + onboard = callPackage ../applications/misc/onboard { }; + playerctl = callPackage ../tools/audio/playerctl { }; socklog = callPackage ../tools/system/socklog { }; @@ -15910,6 +15913,8 @@ with pkgs; thinkingRock = callPackage ../applications/misc/thinking-rock { }; + nylas-mail = callPackage ../applications/networking/mailreaders/nylas-mail { }; + thunderbird = callPackage ../applications/networking/mailreaders/thunderbird { inherit (gnome2) libIDL; libpng = libpng_apng; @@ -17011,7 +17016,7 @@ with pkgs; quake3pointrelease = callPackage ../games/quake3/content/pointrelease.nix { }; quakespasm = callPackage ../games/quakespasm { }; - + ioquake3 = callPackage ../games/quake3/ioquake { }; quantumminigolf = callPackage ../games/quantumminigolf {}; From 2ba83bd2dcb645e91fe9b5db0afcfaf39ad1fa92 Mon Sep 17 00:00:00 2001 From: John Ramsden Date: Tue, 9 May 2017 14:37:02 -0700 Subject: [PATCH 02/42] Removed onboard package from all-packages.. Onboard was left in accidentally. --- pkgs/top-level/all-packages.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0913505b277..6c95a907864 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1022,11 +1022,8 @@ with pkgs; mpdris2 = callPackage ../tools/audio/mpdris2 { }; - nfdump = callPackage ../tools/networking/nfdump { }; - onboard = callPackage ../applications/misc/onboard { }; - playerctl = callPackage ../tools/audio/playerctl { }; socklog = callPackage ../tools/system/socklog { }; From 14f4b21fe526fe0c3069a48b6c2350da79d5c027 Mon Sep 17 00:00:00 2001 From: John Ramsden Date: Wed, 10 May 2017 17:17:33 -0700 Subject: [PATCH 03/42] Added self as maintainer. --- lib/maintainers.nix | 1 + pkgs/applications/networking/mailreaders/nylas-mail/default.nix | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/maintainers.nix b/lib/maintainers.nix index a9d44984e5d..611d5c38ddb 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -249,6 +249,7 @@ joelmo = "Joel Moberg "; joelteon = "Joel Taylor "; johbo = "Johannes Bornhold "; + johnramsden = "John Ramsden " joko = "Ioannis Koutras "; jonafato = "Jon Banafato "; jpbernardy = "Jean-Philippe Bernardy "; diff --git a/pkgs/applications/networking/mailreaders/nylas-mail/default.nix b/pkgs/applications/networking/mailreaders/nylas-mail/default.nix index 6914dbdb7bf..6e3c1accbaf 100644 --- a/pkgs/applications/networking/mailreaders/nylas-mail/default.nix +++ b/pkgs/applications/networking/mailreaders/nylas-mail/default.nix @@ -129,6 +129,7 @@ stdenv.mkDerivation rec { meta = { description = "Nylas Mail is an open-source mail client built on the modern web with Electron, React, and Flux. It is designed to be extensible, so it's easy to create new experiences and workflows around email."; license = stdenv.lib.licenses.gpl3; + maintainers = with maintainers; [ johnramsden ]; homepage = https://nylas.com; }; } From ca95b4fdbd1435e42bc6e72d52dc3ea4b98dc533 Mon Sep 17 00:00:00 2001 From: John Ramsden Date: Wed, 10 May 2017 19:21:00 -0700 Subject: [PATCH 04/42] Missing semicolon. --- lib/maintainers.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/maintainers.nix b/lib/maintainers.nix index 611d5c38ddb..69c5e4452e5 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -249,7 +249,7 @@ joelmo = "Joel Moberg "; joelteon = "Joel Taylor "; johbo = "Johannes Bornhold "; - johnramsden = "John Ramsden " + johnramsden = "John Ramsden "; joko = "Ioannis Koutras "; jonafato = "Jon Banafato "; jpbernardy = "Jean-Philippe Bernardy "; From 1be1ba542154722e9cd9da4186dc631a8c06f36e Mon Sep 17 00:00:00 2001 From: John Ramsden Date: Wed, 10 May 2017 19:47:40 -0700 Subject: [PATCH 05/42] Add longDescription with note about keyring. --- .../networking/mailreaders/nylas-mail/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/mailreaders/nylas-mail/default.nix b/pkgs/applications/networking/mailreaders/nylas-mail/default.nix index 6e3c1accbaf..a0083bd01a8 100644 --- a/pkgs/applications/networking/mailreaders/nylas-mail/default.nix +++ b/pkgs/applications/networking/mailreaders/nylas-mail/default.nix @@ -126,9 +126,12 @@ stdenv.mkDerivation rec { $out/share/nylas-mail/resources/apm/bin/node ''; - meta = { - description = "Nylas Mail is an open-source mail client built on the modern web with Electron, React, and Flux. It is designed to be extensible, so it's easy to create new experiences and workflows around email."; - license = stdenv.lib.licenses.gpl3; + meta = with stdenv.lib; { + description = "pen-source mail client built on the modern web with Electron, React, and Flux"; + longDescription = '' + Nylas Mail is an open-source mail client built on the modern web with Electron, React, and Flux. It is designed to be extensible, so it's easy to create new experiences and workflows around email. Nylas-Mail requires gnome3 keyring. It can be enabled with "services.gnome3.gnome-keyring.enable = true;". + ''; + license = licenses.gpl3; maintainers = with maintainers; [ johnramsden ]; homepage = https://nylas.com; }; From 1f10c1112a6bfc4219e4a388be385be514ab1e70 Mon Sep 17 00:00:00 2001 From: John Ramsden Date: Wed, 10 May 2017 20:13:50 -0700 Subject: [PATCH 06/42] Fixed spelling in description and added info on keyring. --- .../networking/mailreaders/nylas-mail/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/mailreaders/nylas-mail/default.nix b/pkgs/applications/networking/mailreaders/nylas-mail/default.nix index a0083bd01a8..7c3ee456f25 100644 --- a/pkgs/applications/networking/mailreaders/nylas-mail/default.nix +++ b/pkgs/applications/networking/mailreaders/nylas-mail/default.nix @@ -127,9 +127,9 @@ stdenv.mkDerivation rec { ''; meta = with stdenv.lib; { - description = "pen-source mail client built on the modern web with Electron, React, and Flux"; + description = "Open-source mail client built on the modern web with Electron, React, and Flux"; longDescription = '' - Nylas Mail is an open-source mail client built on the modern web with Electron, React, and Flux. It is designed to be extensible, so it's easy to create new experiences and workflows around email. Nylas-Mail requires gnome3 keyring. It can be enabled with "services.gnome3.gnome-keyring.enable = true;". + Nylas Mail is an open-source mail client built on the modern web with Electron, React, and Flux. It is designed to be extensible, so it's easy to create new experiences and workflows around email. To run nylas-mail, an additional manual step is required. Make sure to have services.gnome3.gnome-keyring.enable = true; in your configuration.nix before running nylas-mail. If you happen to miss this step, you should remove ~/.nylas-mail and "~/.config/Nylas Mail" for a blank setup". ''; license = licenses.gpl3; maintainers = with maintainers; [ johnramsden ]; From a195c0418ff67a0a5b82f52ab2753807616b72fe Mon Sep 17 00:00:00 2001 From: Volth Date: Sat, 27 May 2017 12:39:42 +0000 Subject: [PATCH 07/42] wxGTK30: 3.0.2 -> 3.0.3.1 --- .../libraries/wxwidgets/3.0/default.nix | 36 +++++++++++-------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/pkgs/development/libraries/wxwidgets/3.0/default.nix b/pkgs/development/libraries/wxwidgets/3.0/default.nix index 5b1e0fc067c..a84069e62b9 100644 --- a/pkgs/development/libraries/wxwidgets/3.0/default.nix +++ b/pkgs/development/libraries/wxwidgets/3.0/default.nix @@ -1,46 +1,52 @@ -{ stdenv, fetchurl, fetchpatch, pkgconfig, gtk2, libXinerama, libSM, libXxf86vm +{ stdenv, fetchFromGitHub, fetchpatch, pkgconfig, gtk2, gtk3, libXinerama, libSM, libXxf86vm , xf86vidmodeproto , gstreamer, gst-plugins-base, GConf, setfile , withMesa ? true, mesa_glu ? null, mesa_noglu ? null , compat24 ? false, compat26 ? true, unicode ? true -, withWebKit ? false, webkitgtk2 ? null +, withGtk2 ? true +, withWebKit ? false, webkitgtk2 ? null, webkitgtk216x ? null , AGL ? null, Carbon ? null, Cocoa ? null, Kernel ? null, QTKit ? null }: assert withMesa -> mesa_glu != null && mesa_noglu != null; -assert withWebKit -> webkitgtk2 != null; +assert withWebKit -> (if withGtk2 then webkitgtk2 else webkitgtk216x) != null; with stdenv.lib; let - version = "3.0.2"; + version = "3.0.3.1"; in stdenv.mkDerivation { name = "wxwidgets-${version}"; - src = fetchurl { - url = "mirror://sourceforge/wxwindows/wxWidgets-${version}.tar.bz2"; - sha256 = "0paq27brw4lv8kspxh9iklpa415mxi8zc117vbbbhfjgapf7js1l"; + src = fetchFromGitHub { + owner = "wxWidgets"; + repo = "wxWidgets"; + rev = "v${version}"; + sha256 = "1b90in65k1ij6kyk41knxs86i6hx5lkz30gpvzdvh0cbjagv5asq"; }; buildInputs = - [ gtk2 libXinerama libSM libXxf86vm xf86vidmodeproto gstreamer + [ (if withGtk2 then gtk2 else gtk3) libXinerama libSM libXxf86vm xf86vidmodeproto gstreamer gst-plugins-base GConf ] ++ optional withMesa mesa_glu - ++ optional withWebKit webkitgtk2 + ++ optional withWebKit (if withGtk2 then webkitgtk2 else webkitgtk216x) ++ optionals stdenv.isDarwin [ setfile Carbon Cocoa Kernel QTKit ]; nativeBuildInputs = [ pkgconfig ]; propagatedBuildInputs = optional stdenv.isDarwin AGL; - patches = [ (fetchpatch { - url = "https://raw.githubusercontent.com/jessehager/MINGW-packages/af6ece963d8157dd3fbc710bcc190647c4924c63/mingw-w64-wxwidgets/wxWidgets-3.0.2-gcc6-abs.patch"; - sha256 = "0100pg0z7i6cjyysf2k3330pmqmdaxgc9hz6kxnfvc31dynjcq3h"; - }) ]; + patches = [ + # "Add support for WebKit2GTK+ in wxWebView". Will be in 3.0.4 + (fetchpatch { + url = "https://github.com/wxWidgets/wxWidgets/commit/ec6e54bc893fb7516731ca9c71e0d0bbc5ae9ff7.patch"; + sha256 = "0gxd83xajm7gdv9rdzyvqwa2p5nz29nr23i0zx2dgfpsvz2qjp3q"; + }) + ]; configureFlags = - [ "--enable-gtk2" "--disable-precomp-headers" "--enable-mediactrl" + [ "--disable-precomp-headers" "--enable-mediactrl" (if compat24 then "--enable-compat24" else "--disable-compat24") (if compat26 then "--enable-compat26" else "--disable-compat26") ] ++ optional unicode "--enable-unicode" @@ -72,7 +78,7 @@ stdenv.mkDerivation { passthru = { inherit compat24 compat26 unicode; - gtk = gtk2; + gtk = if withGtk2 then gtk2 else gtk3; }; enableParallelBuilding = true; From bb8759f9286856292e52f02735f45994f6be90bf Mon Sep 17 00:00:00 2001 From: Volth Date: Sun, 28 May 2017 10:09:14 +0000 Subject: [PATCH 08/42] no need to patch if old wxWebView is used --- pkgs/development/libraries/wxwidgets/3.0/default.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/wxwidgets/3.0/default.nix b/pkgs/development/libraries/wxwidgets/3.0/default.nix index a84069e62b9..0de8d270182 100644 --- a/pkgs/development/libraries/wxwidgets/3.0/default.nix +++ b/pkgs/development/libraries/wxwidgets/3.0/default.nix @@ -37,13 +37,12 @@ stdenv.mkDerivation { propagatedBuildInputs = optional stdenv.isDarwin AGL; - patches = [ + patches = # "Add support for WebKit2GTK+ in wxWebView". Will be in 3.0.4 - (fetchpatch { + optional (!withGtk2) (fetchpatch { url = "https://github.com/wxWidgets/wxWidgets/commit/ec6e54bc893fb7516731ca9c71e0d0bbc5ae9ff7.patch"; sha256 = "0gxd83xajm7gdv9rdzyvqwa2p5nz29nr23i0zx2dgfpsvz2qjp3q"; - }) - ]; + }); configureFlags = [ "--disable-precomp-headers" "--enable-mediactrl" From 580f7b47a3aa4a09a5096c74b53e254961f65f51 Mon Sep 17 00:00:00 2001 From: John Ramsden Date: Thu, 1 Jun 2017 00:06:20 -0700 Subject: [PATCH 09/42] Update version to 2.0.32-fec7941 and apply proposed changes. --- .../mailreaders/nylas-mail/default.nix | 211 +++++++++--------- 1 file changed, 105 insertions(+), 106 deletions(-) diff --git a/pkgs/applications/networking/mailreaders/nylas-mail/default.nix b/pkgs/applications/networking/mailreaders/nylas-mail/default.nix index 7c3ee456f25..47f633c7cfc 100644 --- a/pkgs/applications/networking/mailreaders/nylas-mail/default.nix +++ b/pkgs/applications/networking/mailreaders/nylas-mail/default.nix @@ -1,94 +1,93 @@ -{ config -, stdenv -, pkgs -, fetchurl -, dpkg -, lib -, gnome2 -, libgnome_keyring -, desktop_file_utils -, python2 -, nodejs -, libnotify +{ dpkg, fetchurl, lib, pkgs, stdenv, config , alsaLib , atk -, glib -, pango -, gdk_pixbuf , cairo -, freetype -, fontconfig -, dbus -, nss -, nspr -, cups -, expat -, wget -, udev -, xorg -, libgcrypt -, makeWrapper -, gcc-unwrapped , coreutils +, cups +, dbus +, desktop_file_utils +, expat +, fontconfig +, freetype +, gcc-unwrapped +, gdk_pixbuf +, glib +, gnome2 +, libgcrypt +, libgnome_keyring +, libnotify +, makeWrapper +, nodejs +, nspr +, nss +, pango +, python2 +, udev +, wget +, xorg }: stdenv.mkDerivation rec { - name = "${pkgname}-${version}"; - pkgname = "nylas-mail"; - version = "2.0.31"; - subVersion = "e675deb"; + name = "${pkgname}-${version}"; + pkgname = "nylas-mail"; + version = "2.0.32"; + subVersion = "fec7941"; - src = fetchurl { - url = "https://edgehill.s3-us-west-2.amazonaws.com/${version}-${subVersion}/linux-deb/x64/NylasMail.deb"; - sha256 = "b036956174f998bd4a2662a1f59cb4a302465b3ed06c487de88ff2721e372f6e"; - }; + src = + if stdenv.system == "x86_64-linux" then + fetchurl { + url = "https://edgehill.s3-us-west-2.amazonaws.com/${version}-${subVersion}/linux-deb/x64/NylasMail.deb"; + sha256 = "40060aa1dc3b5187b8ed4a07b9de3427e3c5a291df98c2c82395647fa2aa4ada"; + } + else + throw "NylasMail is not supported on ${stdenv.system}"; - # Build dependencies - propagatedBuildInputs = [ - gnome2.gtk - gnome2.GConf - libgnome_keyring - desktop_file_utils - python2 - nodejs - libnotify - alsaLib - atk - glib - pango - gdk_pixbuf - cairo - freetype - fontconfig - dbus - nss - nspr - cups - expat - wget - udev - gcc-unwrapped - coreutils - xorg.libXScrnSaver - xorg.libXi - xorg.libXtst - xorg.libXcursor - xorg.libXdamage - xorg.libXrandr - xorg.libXcomposite - xorg.libXext - xorg.libXfixes - xorg.libXrender - xorg.libX11 - xorg.libxkbfile - ]; + # Build dependencies + propagatedBuildInputs = [ + alsaLib + atk + cairo + coreutils + cups + dbus + desktop_file_utils + expat + fontconfig + freetype + gcc-unwrapped + gdk_pixbuf + glib + gnome2.GConf + gnome2.gtk + libgnome_keyring + libnotify + nodejs + nspr + nss + pango + python2 + udev + wget + xorg.libX11 + xorg.libXScrnSaver + xorg.libXcomposite + xorg.libXcursor + xorg.libXdamage + xorg.libXext + xorg.libXfixes + xorg.libXi + xorg.libXrandr + xorg.libXrender + xorg.libXtst + xorg.libxkbfile + ]; - # Runtime dependencies - buildInputs = [ makeWrapper gnome2.gnome_keyring ]; + # Runtime dependencies + buildInputs = [ makeWrapper gnome2.gnome_keyring ]; - phases = [ "unpackPhase" ]; + phases = [ "unpackPhase" ]; - unpackPhase = '' + unpackPhase = '' mkdir -p $out ${dpkg}/bin/dpkg-deb -x $src unpacked @@ -96,43 +95,43 @@ stdenv.mkDerivation rec { # Fix path in desktop file substituteInPlace $out/share/applications/nylas-mail.desktop \ - --replace /usr/bin/nylas-mail $out/bin/nylas-mail + --replace /usr/bin/nylas-mail $out/bin/nylas-mail - # Patch librariess - noderp=$(patchelf --print-rpath $out/share/nylas-mail/libnode.so) - patchelf --set-rpath $noderp:$out/lib:${stdenv.cc.cc.lib}/lib:${xorg.libxkbfile.out}/lib:${lib.makeLibraryPath propagatedBuildInputs } \ - $out/share/nylas-mail/libnode.so + # Patch librariess + noderp=$(patchelf --print-rpath $out/share/nylas-mail/libnode.so) + patchelf --set-rpath $noderp:$out/lib:${stdenv.cc.cc.lib}/lib:${xorg.libxkbfile.out}/lib:${lib.makeLibraryPath propagatedBuildInputs } \ + $out/share/nylas-mail/libnode.so - ffrp=$(patchelf --print-rpath $out/share/nylas-mail/libffmpeg.so) - patchelf --set-rpath $ffrp:$out/lib:${stdenv.cc.cc.lib}/lib:${lib.makeLibraryPath propagatedBuildInputs } \ - $out/share/nylas-mail/libffmpeg.so + ffrp=$(patchelf --print-rpath $out/share/nylas-mail/libffmpeg.so) + patchelf --set-rpath $ffrp:$out/lib:${stdenv.cc.cc.lib}/lib:${lib.makeLibraryPath propagatedBuildInputs } \ + $out/share/nylas-mail/libffmpeg.so - # Patch binaries - binrp=$(patchelf --print-rpath $out/share/nylas-mail/nylas) - patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath $binrp:$out/lib:${stdenv.cc.cc.lib}/lib:${lib.makeLibraryPath propagatedBuildInputs } \ - $out/share/nylas-mail/nylas + # Patch binaries + binrp=$(patchelf --print-rpath $out/share/nylas-mail/nylas) + patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ + --set-rpath $binrp:$out/lib:${stdenv.cc.cc.lib}/lib:${lib.makeLibraryPath propagatedBuildInputs } \ + $out/share/nylas-mail/nylas wrapProgram $out/share/nylas-mail/nylas --set LD_LIBRARY_PATH "${xorg.libxkbfile}/lib:${pkgs.gnome3.libgnome_keyring}/lib"; # Fix path to bash so apm can install plugins. substituteInPlace $out/share/nylas-mail/resources/apm/bin/apm \ - --replace /bin/bash ${stdenv.shell} + --replace /bin/bash ${stdenv.shell} wrapProgram $out/share/nylas-mail/resources/apm/bin/apm \ - --set PATH "${coreutils}/bin" + --set PATH "${coreutils}/bin" patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath ${gcc-unwrapped.lib}/lib \ - $out/share/nylas-mail/resources/apm/bin/node - ''; + --set-rpath ${gcc-unwrapped.lib}/lib $out/share/nylas-mail/resources/apm/bin/node + ''; - meta = with stdenv.lib; { - description = "Open-source mail client built on the modern web with Electron, React, and Flux"; - longDescription = '' - Nylas Mail is an open-source mail client built on the modern web with Electron, React, and Flux. It is designed to be extensible, so it's easy to create new experiences and workflows around email. To run nylas-mail, an additional manual step is required. Make sure to have services.gnome3.gnome-keyring.enable = true; in your configuration.nix before running nylas-mail. If you happen to miss this step, you should remove ~/.nylas-mail and "~/.config/Nylas Mail" for a blank setup". - ''; - license = licenses.gpl3; - maintainers = with maintainers; [ johnramsden ]; - homepage = https://nylas.com; - }; + meta = with stdenv.lib; { + description = "Open-source mail client built on the modern web with Electron, React, and Flux"; + longDescription = '' + Nylas Mail is an open-source mail client built on the modern web with Electron, React, and Flux. It is designed to be extensible, so it's easy to create new experiences and workflows around email. To run nylas-mail, an additional manual step is required. Make sure to have services.gnome3.gnome-keyring.enable = true; in your configuration.nix before running nylas-mail. If you happen to miss this step, you should remove ~/.nylas-mail and "~/.config/Nylas Mail" for a blank setup". + ''; + license = licenses.gpl3; + maintainers = with maintainers; [ johnramsden ]; + homepage = https://nylas.com; + platforms = [ "x86_64-linux" ]; + }; } From 32b2aa48916775828e2bd560a59b9e5ead1c2535 Mon Sep 17 00:00:00 2001 From: Kranium Gikos Mendoza Date: Fri, 26 May 2017 23:08:32 +1000 Subject: [PATCH 10/42] zabbix-cli: init at 1.6.1 --- pkgs/tools/misc/zabbix-cli/default.nix | 24 ++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 pkgs/tools/misc/zabbix-cli/default.nix diff --git a/pkgs/tools/misc/zabbix-cli/default.nix b/pkgs/tools/misc/zabbix-cli/default.nix new file mode 100644 index 00000000000..77c06ea1911 --- /dev/null +++ b/pkgs/tools/misc/zabbix-cli/default.nix @@ -0,0 +1,24 @@ +{ fetchFromGitHub, lib, python2Packages }: +let + pythonPackages = python2Packages; + +in pythonPackages.buildPythonApplication rec { + name = "zabbix-cli-${version}"; + version = "1.6.1"; + + propagatedBuildInputs = with pythonPackages; [ argparse requests ]; + + src = fetchFromGitHub { + owner = "usit-gd"; + repo = "zabbix-cli"; + rev = version; + sha256 = "17ip3s8ifgj264zwxrr857wk02xmzmlsjrr613mdhkgdwizqbcs3"; + }; + + meta = with lib; { + description = "Command-line interface for Zabbix"; + homepage = src.meta.homepage; + license = [ licenses.gpl3 ]; + maintainers = [ maintainers.womfoo ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d80777adc54..98a233587cc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1695,6 +1695,8 @@ with pkgs; mcrcon = callPackage ../tools/networking/mcrcon {}; + zabbix-cli = callPackage ../tools/misc/zabbix-cli { }; + ### DEVELOPMENT / EMSCRIPTEN buildEmscriptenPackage = callPackage ../development/em-modules/generic { }; From 69ecd62a955d8ddd640b2ebb94d451ce3318be7a Mon Sep 17 00:00:00 2001 From: John Ramsden Date: Tue, 27 Jun 2017 16:19:49 -0700 Subject: [PATCH 11/42] Switched from phases to buildCommand, and moved makeWrapper to nativeBuildInputs as reccomended. --- .../networking/mailreaders/nylas-mail/default.nix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/networking/mailreaders/nylas-mail/default.nix b/pkgs/applications/networking/mailreaders/nylas-mail/default.nix index 47f633c7cfc..9073899fd6c 100644 --- a/pkgs/applications/networking/mailreaders/nylas-mail/default.nix +++ b/pkgs/applications/networking/mailreaders/nylas-mail/default.nix @@ -42,7 +42,6 @@ stdenv.mkDerivation rec { else throw "NylasMail is not supported on ${stdenv.system}"; - # Build dependencies propagatedBuildInputs = [ alsaLib atk @@ -82,12 +81,12 @@ stdenv.mkDerivation rec { xorg.libxkbfile ]; - # Runtime dependencies - buildInputs = [ makeWrapper gnome2.gnome_keyring ]; - phases = [ "unpackPhase" ]; + buildInputs = [ gnome2.gnome_keyring ]; - unpackPhase = '' + nativeBuildInputs = [ makeWrapper ]; + + buildCommand = '' mkdir -p $out ${dpkg}/bin/dpkg-deb -x $src unpacked From fef784d09f915f86a1c4f88bbffa063cdde0b200 Mon Sep 17 00:00:00 2001 From: rht Date: Fri, 17 Mar 2017 12:53:11 +0300 Subject: [PATCH 12/42] zcash: reinit at 1.0.8 --- pkgs/applications/altcoins/default.nix | 6 +++ pkgs/applications/altcoins/zcash/default.nix | 49 +++++++++++++++++++ .../altcoins/zcash/librustzcash/default.nix | 30 ++++++++++++ .../altcoins/zcash/libsnark/ate-pairing.nix | 29 +++++++++++ .../altcoins/zcash/libsnark/default.nix | 45 +++++++++++++++++ .../altcoins/zcash/libsnark/mie.nix | 27 ++++++++++ .../altcoins/zcash/libsnark/xbyak.nix | 28 +++++++++++ pkgs/development/libraries/db/db-6.2.nix | 8 +++ pkgs/top-level/all-packages.nix | 1 + 9 files changed, 223 insertions(+) create mode 100644 pkgs/applications/altcoins/zcash/default.nix create mode 100644 pkgs/applications/altcoins/zcash/librustzcash/default.nix create mode 100644 pkgs/applications/altcoins/zcash/libsnark/ate-pairing.nix create mode 100644 pkgs/applications/altcoins/zcash/libsnark/default.nix create mode 100644 pkgs/applications/altcoins/zcash/libsnark/mie.nix create mode 100644 pkgs/applications/altcoins/zcash/libsnark/xbyak.nix create mode 100644 pkgs/development/libraries/db/db-6.2.nix diff --git a/pkgs/applications/altcoins/default.nix b/pkgs/applications/altcoins/default.nix index 1fcfd5f2b60..22da4ed50b4 100644 --- a/pkgs/applications/altcoins/default.nix +++ b/pkgs/applications/altcoins/default.nix @@ -43,4 +43,10 @@ rec { primecoind = callPackage ./primecoin.nix { withGui = false; }; stellar-core = callPackage ./stellar-core.nix { }; + + zcash = callPackage ./zcash { + withGui = false; + openssl = pkgs.openssl_1_1_0; + boost = pkgs.boost163; + }; } diff --git a/pkgs/applications/altcoins/zcash/default.nix b/pkgs/applications/altcoins/zcash/default.nix new file mode 100644 index 00000000000..0146bad6f86 --- /dev/null +++ b/pkgs/applications/altcoins/zcash/default.nix @@ -0,0 +1,49 @@ +{ stdenv, libsodium, fetchFromGitHub, wget, pkgconfig, autoreconfHook, openssl, db62, boost +, zlib, gtest, gmock, miniupnpc, callPackage, gmp, qt4, utillinux, protobuf, qrencode, libevent +, withGui }: + +let libsnark = callPackage ./libsnark { inherit boost openssl; }; + librustzcash = callPackage ./librustzcash {}; +in +with stdenv.lib; +stdenv.mkDerivation rec{ + + name = "zcash" + (toString (optional (!withGui) "d")) + "-" + version; + version = "1.0.8"; + + src = fetchFromGitHub { + owner = "zcash"; + repo = "zcash"; + rev = "f630519d865ce22a6cf72a29785f2a876902f8e1"; + sha256 = "1zjxg3dp0amjfs67469yp9b223v9hx29lkxid9wz2ivxj3paq7bv"; + }; + + enableParallelBuilding = true; + + buildInputs = [ pkgconfig gtest gmock gmp libsnark autoreconfHook openssl wget db62 boost zlib + miniupnpc protobuf libevent libsodium librustzcash ] + ++ optionals stdenv.isLinux [ utillinux ] + ++ optionals withGui [ qt4 qrencode ]; + + configureFlags = [ "LIBSNARK_INCDIR=${libsnark}/include/libsnark" + "--with-boost-libdir=${boost.out}/lib" + ] ++ optionals withGui [ "--with-gui=qt4" ]; + + patchPhase = '' + sed -i"" '/^\[LIBSNARK_INCDIR/d' configure.ac + sed -i"" 's,-lboost_system-mt,-lboost_system,' configure.ac + sed -i"" 's,-fvisibility=hidden,,g' src/Makefile.am + ''; + + postInstall = '' + cp zcutil/fetch-params.sh $out/bin/zcash-fetch-params + ''; + + meta = { + description = "Peer-to-peer, anonymous electronic cash system"; + homepage = "https://z.cash/"; + maintainers = with maintainers; [ rht ]; + license = licenses.mit; + platforms = platforms.unix; + }; +} diff --git a/pkgs/applications/altcoins/zcash/librustzcash/default.nix b/pkgs/applications/altcoins/zcash/librustzcash/default.nix new file mode 100644 index 00000000000..4ce9a279d91 --- /dev/null +++ b/pkgs/applications/altcoins/zcash/librustzcash/default.nix @@ -0,0 +1,30 @@ +{ stdenv, fetchFromGitHub, rustPlatform }: + +rustPlatform.buildRustPackage rec { + name = "librustzcash-unstable-${version}"; + version = "2017-03-17"; + + src = fetchFromGitHub { + owner = "zcash"; + repo = "librustzcash"; + rev = "91348647a86201a9482ad4ad68398152dc3d635e"; + sha256 = "02l1f46frpvw1r6k1wfh77mrsnmsdvifqx0vnscxz4xgb9ia9d1c"; + }; + + depsSha256 = "02qx8zdhmj7rmhqqq5q9428x9mlrjxxcnn4yhnygz9gfgvada2hx"; + + installPhase = '' + mkdir -p $out/lib + cp target/release/librustzcash.a $out/lib/ + mkdir -p $out/include + cp include/librustzcash.h $out/include/ + ''; + + meta = with stdenv.lib; { + description = "Rust-language assets for Zcash"; + homepage = "https://github.com/zcash/librustzcash"; + maintainers = with maintainers; [ rht ]; + license = with licenses; [ mit asl20 ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/applications/altcoins/zcash/libsnark/ate-pairing.nix b/pkgs/applications/altcoins/zcash/libsnark/ate-pairing.nix new file mode 100644 index 00000000000..c5a824cd17d --- /dev/null +++ b/pkgs/applications/altcoins/zcash/libsnark/ate-pairing.nix @@ -0,0 +1,29 @@ +{ stdenv, xbyak, gmp, fetchFromGitHub }: + +stdenv.mkDerivation rec { + name = "ate-pairing-unstable-${version}"; + version = "2016-05-03"; + + src = fetchFromGitHub { + owner = "herumi"; + repo = "ate-pairing"; + rev = "dcb9da999b1113f90b115bccb6f4b57ddf3a8452"; + sha256 = "0jr6r1cma414k8mhsyp7n8hqaqxi7zklsp6820a095sbb3zajckh"; + }; + + buildInputs = [ gmp xbyak ]; + + installPhase = '' + mkdir -p $out + cp -r lib $out + cp -r include $out + ''; + + meta = with stdenv.lib; { + description = "Optimal Ate Pairing over Barreto-Naehrig Curves"; + homepage = "https://github.com/herumi/ate-pairing"; + maintainers = with maintainers; [ rht ]; + license = licenses.bsd3; + platforms = platforms.unix; + }; +} diff --git a/pkgs/applications/altcoins/zcash/libsnark/default.nix b/pkgs/applications/altcoins/zcash/libsnark/default.nix new file mode 100644 index 00000000000..9dd3f6886c8 --- /dev/null +++ b/pkgs/applications/altcoins/zcash/libsnark/default.nix @@ -0,0 +1,45 @@ +{ stdenv, libsodium, callPackage, boost, zlib, openssl, gmp, procps, fetchFromGitHub }: + +let atePairing = callPackage ./ate-pairing.nix { inherit xbyak; }; + mie = callPackage ./mie.nix { }; + xbyak = callPackage ./xbyak.nix {}; +in +stdenv.mkDerivation rec{ + name = "libsnark-unstable-${version}"; + version = "2017-02-09"; + + src = fetchFromGitHub { + owner = "zcash"; + repo = "libsnark"; + rev = "9ada3f84ab484c57b2247c2f41091fd6a0916573"; + sha256 = "0vhslcb9rwqab9szavyn856z4h9w1syiamfcixqmj0s908zzlaaq"; + }; + + buildInputs = [ libsodium atePairing mie xbyak zlib openssl boost gmp ]; + + makeFlags = [ + "PREFIX=$(out)" + "CURVE=ALT_BN128" + "NO_SUPERCOP=1" + "STATIC=1" + ]; + + buildPhase = '' + CXXFLAGS="-fPIC -DBINARY_OUTPUT -DNO_PT_COMPRESSION=1" \ + make lib \ + CURVE=ALT_BN128 \ + MULTICORE=1 \ + STATIC=1 \ + NO_PROCPS=1 \ + NO_GTEST=1 \ + FEATUREFLAGS=-DMONTGOMERY_OUTPUT \ + ''; + + meta = with stdenv.lib; { + description = "a C++ library for zkSNARK proofs"; + homepage = "https://github.com/zcash/libsnark"; + maintainers = with maintainers; [ rht ]; + license = licenses.mit; + platforms = platforms.unix; + }; +} diff --git a/pkgs/applications/altcoins/zcash/libsnark/mie.nix b/pkgs/applications/altcoins/zcash/libsnark/mie.nix new file mode 100644 index 00000000000..c92c113a27a --- /dev/null +++ b/pkgs/applications/altcoins/zcash/libsnark/mie.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchFromGitHub }: + +stdenv.mkDerivation rec { + name = "mie-unstable-${version}"; + version = "2016-05-10"; + + src = fetchFromGitHub { + owner = "herumi"; + repo = "mie"; + rev = "704b625b7770a8e1eab26ac65d1fed14c2fcf090"; + sha256 = "144bpmgfs2m4qqv7a2mccgi1aq5jmlr25gnk78ryq09z8cyv88y2"; + }; + + phases = ["unpackPhase" "installPhase"]; + + installPhase = '' + mkdir -p $out + cp -r include $out + ''; + + meta = with stdenv.lib; { + homepage = "https://github.com/herumi/mie"; + maintainers = with maintainers; [ rht ]; + license = licenses.bsd3; + platforms = platforms.unix; + }; +} diff --git a/pkgs/applications/altcoins/zcash/libsnark/xbyak.nix b/pkgs/applications/altcoins/zcash/libsnark/xbyak.nix new file mode 100644 index 00000000000..c0b36ab9344 --- /dev/null +++ b/pkgs/applications/altcoins/zcash/libsnark/xbyak.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchFromGitHub }: + +stdenv.mkDerivation rec { + name = "xbyak-unstable-${version}"; + version = "2016-05-03"; + + src = fetchFromGitHub { + owner = "herumi"; + repo = "xbyak"; + rev = "b6133a02dd6b7116bea31d0e6b7142bf97f071aa"; + sha256 = "1rc2nx8kj2lj13whxb9chhh79f4hmjjj4j1hpqsd0lbdb60jikrn"; + }; + + phases = ["unpackPhase" "installPhase"]; + + installPhase = '' + mkdir -p $out/include + cp -r xbyak $out/include + ''; + + meta = with stdenv.lib; { + description = "JIT assembler for x86, x64"; + homepage = "https://github.com/herumi/xbyak"; + maintainers = with maintainers; [ rht ]; + license = licenses.bsd3; + platforms = platforms.unix; + }; +} diff --git a/pkgs/development/libraries/db/db-6.2.nix b/pkgs/development/libraries/db/db-6.2.nix new file mode 100644 index 00000000000..f897e3744af --- /dev/null +++ b/pkgs/development/libraries/db/db-6.2.nix @@ -0,0 +1,8 @@ +{ stdenv, fetchurl, ... } @ args: + +import ./generic.nix (args // rec { + version = "6.2.23"; + sha256 = "1isxx4jfmnh913jzhp8hhfngbk6dsg46f4kjpvvc56maj64jqqa7"; + license = stdenv.lib.licenses.agpl3; + extraPatches = [ ./clang-6.0.patch ]; +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ff58787a286..0feb48d6b17 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7499,6 +7499,7 @@ with pkgs; db53 = callPackage ../development/libraries/db/db-5.3.nix { }; db6 = db60; db60 = callPackage ../development/libraries/db/db-6.0.nix { }; + db62 = callPackage ../development/libraries/db/db-6.2.nix { }; dbus = callPackage ../development/libraries/dbus { }; dbus_cplusplus = callPackage ../development/libraries/dbus-cplusplus { }; From 3fddb48020aab9934752b1f19e5c35d7d3881a05 Mon Sep 17 00:00:00 2001 From: John Ramsden Date: Wed, 28 Jun 2017 15:56:41 -0700 Subject: [PATCH 13/42] Add Nylas mail module. Still needs keyring configuration --- nixos/modules/programs/nylas-mail.nix | 43 +++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 nixos/modules/programs/nylas-mail.nix diff --git a/nixos/modules/programs/nylas-mail.nix b/nixos/modules/programs/nylas-mail.nix new file mode 100644 index 00000000000..d1427d89024 --- /dev/null +++ b/nixos/modules/programs/nylas-mail.nix @@ -0,0 +1,43 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.services.nylas-mail; + defaultUser = "nylas-mail"; +in { + ###### interface + options = { + services.nylas-mail = { + + enable = mkEnableOption '' + nylas-mail - Open-source mail client built on the modern web with Electron, React, and Flux + ''; + + gnome3-keyring = mkOption { + type = types.bool; + default = true; + description = "Enable gnome3 keyring for nylas-mail."; + }; + + package = mkOption { + type = types.package; + default = pkgs.nylas-mail; + defaultText = "pkgs.nylas-mail"; + example = literalExample "pkgs.nylas-mail"; + description = '' + nylas-mail package to use. + ''; + }; + }; + }; + + + ###### implementation + + config = mkIf cfg.enable { + + + + }; +} From 9f4c3b2efd02447ffb403678e880cd3340aaaa48 Mon Sep 17 00:00:00 2001 From: John Ramsden Date: Wed, 28 Jun 2017 16:13:10 -0700 Subject: [PATCH 14/42] Add keyring enable option and add Nylas to systemPackages --- nixos/modules/programs/nylas-mail.nix | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/nixos/modules/programs/nylas-mail.nix b/nixos/modules/programs/nylas-mail.nix index d1427d89024..fc18a9a4760 100644 --- a/nixos/modules/programs/nylas-mail.nix +++ b/nixos/modules/programs/nylas-mail.nix @@ -19,16 +19,6 @@ in { default = true; description = "Enable gnome3 keyring for nylas-mail."; }; - - package = mkOption { - type = types.package; - default = pkgs.nylas-mail; - defaultText = "pkgs.nylas-mail"; - example = literalExample "pkgs.nylas-mail"; - description = '' - nylas-mail package to use. - ''; - }; }; }; @@ -37,7 +27,11 @@ in { config = mkIf cfg.enable { + environment.systemPackages = [pkgs.nylas-mail]; + services.gnome3.gnome-keyring = mkIf cfg.gnome3-keyring { + enable = true; + }; }; } From 8181b075bac51fbce46a7b4d52e339b429f1250a Mon Sep 17 00:00:00 2001 From: John Ramsden Date: Wed, 28 Jun 2017 22:29:49 -0700 Subject: [PATCH 15/42] Quoted NIX_CC --- .../networking/mailreaders/nylas-mail/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/mailreaders/nylas-mail/default.nix b/pkgs/applications/networking/mailreaders/nylas-mail/default.nix index 9073899fd6c..b9d4be3e380 100644 --- a/pkgs/applications/networking/mailreaders/nylas-mail/default.nix +++ b/pkgs/applications/networking/mailreaders/nylas-mail/default.nix @@ -107,7 +107,7 @@ stdenv.mkDerivation rec { # Patch binaries binrp=$(patchelf --print-rpath $out/share/nylas-mail/nylas) - patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ + patchelf --interpreter $(cat "$NIX_CC"/nix-support/dynamic-linker) \ --set-rpath $binrp:$out/lib:${stdenv.cc.cc.lib}/lib:${lib.makeLibraryPath propagatedBuildInputs } \ $out/share/nylas-mail/nylas @@ -119,7 +119,7 @@ stdenv.mkDerivation rec { wrapProgram $out/share/nylas-mail/resources/apm/bin/apm \ --set PATH "${coreutils}/bin" - patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ + patchelf --interpreter $(cat "$NIX_CC"/nix-support/dynamic-linker) \ --set-rpath ${gcc-unwrapped.lib}/lib $out/share/nylas-mail/resources/apm/bin/node ''; From 80bc82206ef27f5e39f9b12fc925a9b976645a5c Mon Sep 17 00:00:00 2001 From: Roman Kuznetsov Date: Mon, 24 Apr 2017 21:20:59 +0200 Subject: [PATCH 16/42] Scaffold mono50 package --- pkgs/development/compilers/mono/5.0.nix | 7 ++ .../development/compilers/mono/generic-5x.nix | 90 +++++++++++++++++++ .../mono/pkgconfig-before-gac-5x.patch | 65 ++++++++++++++ pkgs/top-level/all-packages.nix | 5 ++ 4 files changed, 167 insertions(+) create mode 100644 pkgs/development/compilers/mono/5.0.nix create mode 100644 pkgs/development/compilers/mono/generic-5x.nix create mode 100644 pkgs/development/compilers/mono/pkgconfig-before-gac-5x.patch diff --git a/pkgs/development/compilers/mono/5.0.nix b/pkgs/development/compilers/mono/5.0.nix new file mode 100644 index 00000000000..662cb71c7f0 --- /dev/null +++ b/pkgs/development/compilers/mono/5.0.nix @@ -0,0 +1,7 @@ +{ stdenv, callPackage, Foundation, libobjc }: + +callPackage ./generic-5x.nix (rec { + inherit Foundation libobjc; + version = "5.0.0.48"; + sha256 = "13n20wmijkhd7vm41lzz1n774rna67d94prl33bz1lly0idsciq0"; +}) diff --git a/pkgs/development/compilers/mono/generic-5x.nix b/pkgs/development/compilers/mono/generic-5x.nix new file mode 100644 index 00000000000..aa3ba368b61 --- /dev/null +++ b/pkgs/development/compilers/mono/generic-5x.nix @@ -0,0 +1,90 @@ +{ stdenv, fetchurl, bison, pkgconfig, glib, gettext, perl, libgdiplus, libX11, callPackage, ncurses, zlib, withLLVM ? false, cacert, Foundation, libobjc, python, version, sha256, cmake, autoconf, libtool, automake, gcc }: + +let + llvm = callPackage ./llvm.nix { }; +in +stdenv.mkDerivation rec { + name = "mono-${version}"; + + src = fetchurl { + inherit sha256; + url = "https://download.mono-project.com/sources/mono/${name}.tar.bz2"; + }; + + buildInputs = + [ bison pkgconfig glib gettext perl libgdiplus libX11 ncurses zlib python cmake autoconf libtool automake gcc + ] + ++ (stdenv.lib.optionals stdenv.isDarwin [ Foundation libobjc ]); + + propagatedBuildInputs = [glib]; + + NIX_LDFLAGS = if stdenv.isDarwin then "" else "-lgcc_s" ; + + # To overcome the bug https://bugzilla.novell.com/show_bug.cgi?id=644723 + dontDisableStatic = true; + + # In fact I think this line does not help at all to what I + # wanted to achieve: have mono to find libgdiplus automatically + configureFlags = [ + "--x-includes=${libX11.dev}/include" + "--x-libraries=${libX11.out}/lib" + "--with-libgdiplus=${libgdiplus}/lib/libgdiplus.so" + ] + ++ stdenv.lib.optionals withLLVM [ + "--enable-llvm" + "--enable-llvmloaded" + "--with-llvm=${llvm}" + ]; + + # Attempt to fix this error when running "mcs --version": + # The file /nix/store/xxx-mono-2.4.2.1/lib/mscorlib.dll is an invalid CIL image + dontStrip = true; + + # Parallel building doesn't work, as shows http://hydra.nixos.org/build/2983601 + enableParallelBuilding = false; + + # We want pkg-config to take priority over the dlls in the Mono framework and the GAC + # because we control pkg-config + patches = [ ./pkgconfig-before-gac-5x.patch ]; + + # Patch all the necessary scripts. Also, if we're using LLVM, we fix the default + # LLVM path to point into the Mono LLVM build, since it's private anyway. + preBuild = '' + makeFlagsArray=(INSTALL=`type -tp install`) + patchShebangs ./ + substituteInPlace mcs/class/corlib/System/Environment.cs --replace /usr/share "$out/share" + '' + stdenv.lib.optionalString withLLVM '' + substituteInPlace mono/mini/aot-compiler.c --replace "llvm_path = g_strdup (\"\")" "llvm_path = g_strdup (\"${llvm}/bin/\")" + echo 11111 + ''; + + # Fix mono DLLMap so it can find libX11 and gdiplus to run winforms apps + # Other items in the DLLMap may need to be pointed to their store locations, I don't think this is exhaustive + # http://www.mono-project.com/Config_DllMap + postBuild = '' + find . -name 'config' -type f | xargs \ + sed -i -e "s@libX11.so.6@${libX11.out}/lib/libX11.so.6@g" \ + -e "s@/.*libgdiplus.so@${libgdiplus}/lib/libgdiplus.so@g" \ + ''; + + # Without this, any Mono application attempting to open an SSL connection will throw with + # The authentication or decryption has failed. + # ---> Mono.Security.Protocol.Tls.TlsException: Invalid certificate received from server. + postInstall = '' + echo "Updating Mono key store" + $out/bin/cert-sync ${cacert}/etc/ssl/certs/ca-bundle.crt + '' + # According to [1], gmcs is just mcs + # [1] https://github.com/mono/mono/blob/master/scripts/gmcs.in + + '' + ln -s $out/bin/mcs $out/bin/gmcs + ''; + + meta = { + homepage = http://mono-project.com/; + description = "Cross platform, open source .NET development framework"; + platforms = with stdenv.lib.platforms; darwin ++ linux; + maintainers = with stdenv.lib.maintainers; [ viric thoughtpolice obadz vrthra ]; + license = stdenv.lib.licenses.free; # Combination of LGPL/X11/GPL ? + }; +} diff --git a/pkgs/development/compilers/mono/pkgconfig-before-gac-5x.patch b/pkgs/development/compilers/mono/pkgconfig-before-gac-5x.patch new file mode 100644 index 00000000000..1b9c59402bf --- /dev/null +++ b/pkgs/development/compilers/mono/pkgconfig-before-gac-5x.patch @@ -0,0 +1,65 @@ +diff -Naur mono-5.0.0/mcs/tools/xbuild/data/3.5/Microsoft.Common.targets.old mono-5.0.0/mcs/tools/xbuild/data/3.5/Microsoft.Common.targets +--- mono-5.0.0/mcs/tools/xbuild/data/3.5/Microsoft.Common.targets.old 2017-04-24 23:45:18.348116305 +0200 ++++ mono-5.0.0/mcs/tools/xbuild/data/3.5/Microsoft.Common.targets 2017-04-24 23:45:11.407051755 +0200 +@@ -167,8 +167,8 @@ + $(ReferencePath); + @(AdditionalReferencePath); + {HintPathFromItem}; +- {TargetFrameworkDirectory}; + {PkgConfig}; ++ {TargetFrameworkDirectory}; + {GAC}; + {RawFileName}; + $(OutDir) +diff -Naur mono-5.0.0/mcs/tools/xbuild/data/4.0/Microsoft.Common.targets.old mono-5.0.0/mcs/tools/xbuild/data/4.0/Microsoft.Common.targets +--- mono-5.0.0/mcs/tools/xbuild/data/4.0/Microsoft.Common.targets.old 2017-04-24 23:49:53.019616196 +0200 ++++ mono-5.0.0/mcs/tools/xbuild/data/4.0/Microsoft.Common.targets 2017-04-24 23:50:05.709729585 +0200 +@@ -232,8 +232,8 @@ + $(ReferencePath); + @(AdditionalReferencePath); + {HintPathFromItem}; +- {TargetFrameworkDirectory}; + {PkgConfig}; ++ {TargetFrameworkDirectory}; + {GAC}; + {RawFileName}; + $(OutDir) +diff -Naur mono-5.0.0/mcs/tools/xbuild/data/2.0/Microsoft.Common.targets.old mono-5.0.0/mcs/tools/xbuild/data/2.0/Microsoft.Common.targets +--- mono-5.0.0/mcs/tools/xbuild/data/2.0/Microsoft.Common.targets.old 2017-04-24 23:52:33.200037047 +0200 ++++ mono-5.0.0/mcs/tools/xbuild/data/2.0/Microsoft.Common.targets 2017-04-24 23:52:43.281125802 +0200 +@@ -139,8 +139,8 @@ + $(ReferencePath); + @(AdditionalReferencePath); + {HintPathFromItem}; +- {TargetFrameworkDirectory}; + {PkgConfig}; ++ {TargetFrameworkDirectory}; + {GAC}; + {RawFileName}; + $(OutDir) +diff -Naur mono-5.0.0/mcs/tools/xbuild/data/14.0/Microsoft.Common.targets.old mono-5.0.0/mcs/tools/xbuild/data/14.0/Microsoft.Common.targets +--- mono-5.0.0/mcs/tools/xbuild/data/14.0/Microsoft.Common.targets.old 2017-04-24 23:54:02.585821594 +0200 ++++ mono-5.0.0/mcs/tools/xbuild/data/14.0/Microsoft.Common.targets 2017-04-24 23:54:09.313880438 +0200 +@@ -234,8 +234,8 @@ + $(ReferencePath); + @(AdditionalReferencePath); + {HintPathFromItem}; +- {TargetFrameworkDirectory}; + {PkgConfig}; ++ {TargetFrameworkDirectory}; + {GAC}; + {RawFileName}; + $(OutDir) +diff -Naur mono-5.0.0/mcs/tools/xbuild/data/12.0/Microsoft.Common.targets.old mono-5.0.0/mcs/tools/xbuild/data/12.0/Microsoft.Common.targets +--- mono-5.0.0/mcs/tools/xbuild/data/12.0/Microsoft.Common.targets.old 2017-04-24 23:55:46.244895155 +0200 ++++ mono-5.0.0/mcs/tools/xbuild/data/12.0/Microsoft.Common.targets 2017-04-24 23:55:51.998961342 +0200 +@@ -232,8 +232,8 @@ + $(ReferencePath); + @(AdditionalReferencePath); + {HintPathFromItem}; +- {TargetFrameworkDirectory}; + {PkgConfig}; ++ {TargetFrameworkDirectory}; + {GAC}; + {RawFileName}; + $(OutDir) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 16582677904..f3384e3c506 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5742,6 +5742,11 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) Foundation; }); + mono50 = lowPrio (callPackage ../development/compilers/mono/5.0.nix { + inherit (darwin) libobjc; + inherit (darwin.apple_sdk.frameworks) Foundation; + }); + monoDLLFixer = callPackage ../build-support/mono-dll-fixer { }; mozart-binary = callPackage ../development/compilers/mozart/binary.nix { }; From 87c93fb8ee28444d085e8b29364834e0f78a37a9 Mon Sep 17 00:00:00 2001 From: Roman Kuznetsov Date: Wed, 26 Apr 2017 08:41:53 +0200 Subject: [PATCH 17/42] Use proper generic-cmake --- pkgs/development/compilers/mono/5.0.nix | 2 +- .../mono/{generic-5x.nix => generic-cmake.nix} | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) rename pkgs/development/compilers/mono/{generic-5x.nix => generic-cmake.nix} (89%) diff --git a/pkgs/development/compilers/mono/5.0.nix b/pkgs/development/compilers/mono/5.0.nix index 662cb71c7f0..e51bbc0c308 100644 --- a/pkgs/development/compilers/mono/5.0.nix +++ b/pkgs/development/compilers/mono/5.0.nix @@ -1,6 +1,6 @@ { stdenv, callPackage, Foundation, libobjc }: -callPackage ./generic-5x.nix (rec { +callPackage ./generic-cmake.nix (rec { inherit Foundation libobjc; version = "5.0.0.48"; sha256 = "13n20wmijkhd7vm41lzz1n774rna67d94prl33bz1lly0idsciq0"; diff --git a/pkgs/development/compilers/mono/generic-5x.nix b/pkgs/development/compilers/mono/generic-cmake.nix similarity index 89% rename from pkgs/development/compilers/mono/generic-5x.nix rename to pkgs/development/compilers/mono/generic-cmake.nix index aa3ba368b61..71cafe2cca2 100644 --- a/pkgs/development/compilers/mono/generic-5x.nix +++ b/pkgs/development/compilers/mono/generic-cmake.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, bison, pkgconfig, glib, gettext, perl, libgdiplus, libX11, callPackage, ncurses, zlib, withLLVM ? false, cacert, Foundation, libobjc, python, version, sha256, cmake, autoconf, libtool, automake, gcc }: +{ stdenv, fetchurl, bison, pkgconfig, glib, gettext, perl, libgdiplus, libX11, callPackage, ncurses, zlib, withLLVM ? false, cacert, Foundation, libobjc, python, version, sha256, autoconf, libtool, automake, cmake, which }: let llvm = callPackage ./llvm.nix { }; @@ -8,11 +8,11 @@ stdenv.mkDerivation rec { src = fetchurl { inherit sha256; - url = "https://download.mono-project.com/sources/mono/${name}.tar.bz2"; + url = "http://download.mono-project.com/sources/mono/${name}.tar.bz2"; }; buildInputs = - [ bison pkgconfig glib gettext perl libgdiplus libX11 ncurses zlib python cmake autoconf libtool automake gcc + [ bison pkgconfig glib gettext perl libgdiplus libX11 ncurses zlib python autoconf libtool automake cmake which ] ++ (stdenv.lib.optionals stdenv.isDarwin [ Foundation libobjc ]); @@ -36,6 +36,11 @@ stdenv.mkDerivation rec { "--with-llvm=${llvm}" ]; + configurePhase = '' + substituteInPlace ./autogen.sh --replace "/usr/bin/env sh" "/bin/sh" + ./autogen.sh --prefix $out + ''; + # Attempt to fix this error when running "mcs --version": # The file /nix/store/xxx-mono-2.4.2.1/lib/mscorlib.dll is an invalid CIL image dontStrip = true; @@ -45,7 +50,7 @@ stdenv.mkDerivation rec { # We want pkg-config to take priority over the dlls in the Mono framework and the GAC # because we control pkg-config - patches = [ ./pkgconfig-before-gac-5x.patch ]; + patches = [ ./pkgconfig-before-gac.patch ]; # Patch all the necessary scripts. Also, if we're using LLVM, we fix the default # LLVM path to point into the Mono LLVM build, since it's private anyway. @@ -55,7 +60,6 @@ stdenv.mkDerivation rec { substituteInPlace mcs/class/corlib/System/Environment.cs --replace /usr/share "$out/share" '' + stdenv.lib.optionalString withLLVM '' substituteInPlace mono/mini/aot-compiler.c --replace "llvm_path = g_strdup (\"\")" "llvm_path = g_strdup (\"${llvm}/bin/\")" - echo 11111 ''; # Fix mono DLLMap so it can find libX11 and gdiplus to run winforms apps From bdc99c82f08856dca0bb83a10bea49078b24fe1e Mon Sep 17 00:00:00 2001 From: Roman Kuznetsov Date: Sat, 1 Jul 2017 23:13:52 +0200 Subject: [PATCH 18/42] Use ${stdenv.shell} instead of hardcoded /bin/sh --- pkgs/development/compilers/mono/generic-cmake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/compilers/mono/generic-cmake.nix b/pkgs/development/compilers/mono/generic-cmake.nix index 71cafe2cca2..ab232f07d1b 100644 --- a/pkgs/development/compilers/mono/generic-cmake.nix +++ b/pkgs/development/compilers/mono/generic-cmake.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { ]; configurePhase = '' - substituteInPlace ./autogen.sh --replace "/usr/bin/env sh" "/bin/sh" + substituteInPlace ./autogen.sh --replace "/usr/bin/env sh" "${stdenv.shell}" ./autogen.sh --prefix $out ''; From 4e025437d7f21cfd220a5a9161093a660ad8edc8 Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Mon, 3 Jul 2017 20:24:33 +0200 Subject: [PATCH 19/42] atop: don't chmod u+s, otherwise Nix build fails --- pkgs/os-specific/linux/atop/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/os-specific/linux/atop/default.nix b/pkgs/os-specific/linux/atop/default.nix index 790ab51c80d..ea4f44f52bb 100644 --- a/pkgs/os-specific/linux/atop/default.nix +++ b/pkgs/os-specific/linux/atop/default.nix @@ -25,6 +25,7 @@ stdenv.mkDerivation rec { sed -e "/touch.*LOGPATH/s@touch@echo should have created @" -i Makefile sed -e 's/chown/true/g' -i Makefile sed -e '/chkconfig/d' -i Makefile + sed -e 's/chmod 04711/chmod 0711/g' -i Makefile ''; preInstall = '' From 57a0224a426f1623e4cc2559b1a0f3169f67c561 Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Tue, 4 Jul 2017 21:48:59 +0200 Subject: [PATCH 20/42] nix: short TMPDIR for tests on Darwin This fixes test failures due to overly long nix-daemon socket paths. --- pkgs/tools/package-management/nix/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix index 45dfd52dba1..a90f38ccc09 100644 --- a/pkgs/tools/package-management/nix/default.nix +++ b/pkgs/tools/package-management/nix/default.nix @@ -79,6 +79,9 @@ let doInstallCheck = true; + # socket path becomes too long otherwise + preInstallCheck = lib.optional stdenv.isDarwin "export TMPDIR=/tmp"; + separateDebugInfo = stdenv.isLinux; crossAttrs = { From 730a394e755102fadfb7b378ad7297c695944601 Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Wed, 5 Jul 2017 10:21:51 +0000 Subject: [PATCH 21/42] Fix hologram server with go versions > 1.4, no fix yet upstream. (cherry picked from commit cbfb35a145287f9c18c801ffaf4f36967f1bd563) --- pkgs/tools/security/hologram/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/tools/security/hologram/default.nix b/pkgs/tools/security/hologram/default.nix index abdcd5d2d3e..911c1b12562 100644 --- a/pkgs/tools/security/hologram/default.nix +++ b/pkgs/tools/security/hologram/default.nix @@ -15,6 +15,10 @@ buildGoPackage rec { goDeps = ./deps.nix; + preConfigure = '' + sed -i 's|cacheTimeout != 3600|cacheTimeout != 0|' cmd/hologram-server/main.go + ''; + meta = with stdenv.lib; { homepage = https://github.com/AdRoll/hologram/; description = "Easy, painless AWS credentials on developer laptops."; From 55208cc2e18bf40a76e6c9ae7c16108d80fed666 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pa=C5=82ka?= Date: Fri, 12 May 2017 06:34:38 +0000 Subject: [PATCH 22/42] pvgrub_image: add package Add a package containing a pvgrub image for xen generated from grub2 --- pkgs/tools/misc/grub/2.0x.nix | 5 ++- .../pvgrub_image/configs/grub-bootstrap.cfg | 1 + .../misc/grub/pvgrub_image/configs/grub.cfg | 10 +++++ pkgs/tools/misc/grub/pvgrub_image/default.nix | 42 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 6 +++ 5 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 pkgs/tools/misc/grub/pvgrub_image/configs/grub-bootstrap.cfg create mode 100644 pkgs/tools/misc/grub/pvgrub_image/configs/grub.cfg create mode 100644 pkgs/tools/misc/grub/pvgrub_image/default.nix diff --git a/pkgs/tools/misc/grub/2.0x.nix b/pkgs/tools/misc/grub/2.0x.nix index 7a70f2bdbff..2bbeea8133e 100644 --- a/pkgs/tools/misc/grub/2.0x.nix +++ b/pkgs/tools/misc/grub/2.0x.nix @@ -3,6 +3,7 @@ , zfs ? null , efiSupport ? false , zfsSupport ? true +, xenSupport ? false }: with stdenv.lib; @@ -46,6 +47,7 @@ in ( assert efiSupport -> canEfi; assert zfsSupport -> zfs != null; +assert !(efiSupport && xenSupport); stdenv.mkDerivation rec { name = "grub-${version}"; @@ -98,7 +100,8 @@ stdenv.mkDerivation rec { patches = [ ./fix-bash-completion.patch ]; configureFlags = optional zfsSupport "--enable-libzfs" - ++ optionals efiSupport [ "--with-platform=efi" "--target=${efiSystemsBuild.${stdenv.system}.target}" "--program-prefix=" ]; + ++ optionals efiSupport [ "--with-platform=efi" "--target=${efiSystemsBuild.${stdenv.system}.target}" "--program-prefix=" ] + ++ optionals xenSupport [ "--with-platform=xen" "--target=${efiSystemsBuild.${stdenv.system}.target}"]; # save target that grub is compiled for grubTarget = if efiSupport diff --git a/pkgs/tools/misc/grub/pvgrub_image/configs/grub-bootstrap.cfg b/pkgs/tools/misc/grub/pvgrub_image/configs/grub-bootstrap.cfg new file mode 100644 index 00000000000..e9883149ab5 --- /dev/null +++ b/pkgs/tools/misc/grub/pvgrub_image/configs/grub-bootstrap.cfg @@ -0,0 +1 @@ +normal (memdisk)/grub.cfg diff --git a/pkgs/tools/misc/grub/pvgrub_image/configs/grub.cfg b/pkgs/tools/misc/grub/pvgrub_image/configs/grub.cfg new file mode 100644 index 00000000000..69115b7101c --- /dev/null +++ b/pkgs/tools/misc/grub/pvgrub_image/configs/grub.cfg @@ -0,0 +1,10 @@ +# The parentheses around ${root} here to match Grub's config file syntax +if search -s -f /boot/grub/grub.cfg ; then + echo "Reading (${root})/boot/grub/grub.cfg" + configfile /boot/grub/grub.cfg +fi + +if search -s -f /grub/grub.cfg ; then + echo "Reading (${root})/grub/grub.cfg" + configfile /grub/grub.cfg +fi diff --git a/pkgs/tools/misc/grub/pvgrub_image/default.nix b/pkgs/tools/misc/grub/pvgrub_image/default.nix new file mode 100644 index 00000000000..ee6e5065f40 --- /dev/null +++ b/pkgs/tools/misc/grub/pvgrub_image/default.nix @@ -0,0 +1,42 @@ +{ stdenv, grub2_xen }: + +with stdenv.lib; +let + efiSystemsBuild = { + "i686-linux".target = "i386"; + "x86_64-linux".target = "x86_64"; + "aarch64-linux".target = "aarch64"; + }; + +in ( + +stdenv.mkDerivation rec { + name = "pvgrub-image"; + + configs = ./configs; + + buildInputs = [ grub2_xen ]; + + buildCommand = '' + cp "${configs}"/* . + tar -cf memdisk.tar grub.cfg + # We include all modules except all_video.mod as otherwise grub will fail printing "no symbol table" + # if we include it. + grub-mkimage -O "${efiSystemsBuild.${stdenv.system}.target}-xen" -c grub-bootstrap.cfg \ + -m memdisk.tar -o "grub-${efiSystemsBuild.${stdenv.system}.target}-xen.bin" \ + $(ls "${grub2_xen}/lib/grub/${efiSystemsBuild.${stdenv.system}.target}-xen/" |grep 'mod''$'|grep -v '^all_video\.mod''$') + mkdir -p "$out/lib/grub-xen" + cp "grub-${efiSystemsBuild.${stdenv.system}.target}-xen.bin" $out/lib/grub-xen/ + ''; + + meta = with stdenv.lib; { + description = "PvGrub image for use for booting PV Xen guests"; + + longDescription = + '' This package provides a PvGrub image for booting Para-Virtualized (PV) + Xen guests + ''; + + platforms = platforms.gnu; + }; +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cd27aa51cd2..cadd799af3c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2258,6 +2258,12 @@ with pkgs; zfsSupport = false; }; + grub2_xen = callPackage ../tools/misc/grub/2.0x.nix { + xenSupport = true; + }; + + grub2_pvgrub_image = callPackage ../tools/misc/grub/pvgrub_image { }; + grub4dos = callPackage ../tools/misc/grub4dos { stdenv = stdenv_32bit; }; From 8210d86041ec189a5d0a1eb5f69e85fee742ab02 Mon Sep 17 00:00:00 2001 From: nonsequitur Date: Wed, 5 Jul 2017 13:15:02 +0200 Subject: [PATCH 23/42] Release notes: Fix syntax in code sample --- nixos/doc/manual/release-notes/rl-1703.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/doc/manual/release-notes/rl-1703.xml b/nixos/doc/manual/release-notes/rl-1703.xml index 28c573e6d23..6147b983013 100644 --- a/nixos/doc/manual/release-notes/rl-1703.xml +++ b/nixos/doc/manual/release-notes/rl-1703.xml @@ -315,7 +315,7 @@ following incompatible changes: let pkgs = import <nixpkgs> {}; in - import pkgs.path { overlays = [(self: super: ...)] } + import pkgs.path { overlays = [(self: super: ...)]; } From a1ec03a22333019ea20ff84a54980419816f0732 Mon Sep 17 00:00:00 2001 From: Philipp Hausmann Date: Wed, 5 Jul 2017 16:12:50 +0200 Subject: [PATCH 24/42] hdf4: Make szip dependency optional. --- pkgs/tools/misc/hdf4/default.nix | 9 +++++---- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/misc/hdf4/default.nix b/pkgs/tools/misc/hdf4/default.nix index a227030f0bc..bc8ea769e8b 100644 --- a/pkgs/tools/misc/hdf4/default.nix +++ b/pkgs/tools/misc/hdf4/default.nix @@ -2,8 +2,8 @@ , fetchurl , cmake , libjpeg -, szip , zlib +, szip ? null }: stdenv.mkDerivation rec { @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { zlib ]; - preConfigure = "export SZIP_INSTALL=${szip}"; + preConfigure = stdenv.lib.optionalString (szip != null) "export SZIP_INSTALL=${szip}"; cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" @@ -31,11 +31,12 @@ stdenv.mkDerivation rec { "-DHDF4_BUILD_WITH_INSTALL_NAME=OFF" "-DHDF4_ENABLE_JPEG_LIB_SUPPORT=ON" "-DHDF4_ENABLE_NETCDF=OFF" - "-DHDF4_ENABLE_SZIP_ENCODING=ON" - "-DHDF4_ENABLE_SZIP_SUPPORT=ON" "-DHDF4_ENABLE_Z_LIB_SUPPORT=ON" "-DHDF4_BUILD_FORTRAN=OFF" "-DJPEG_DIR=${libjpeg}" + ] ++ stdenv.lib.optionals (szip != null) [ + "-DHDF4_ENABLE_SZIP_ENCODING=ON" + "-DHDF4_ENABLE_SZIP_SUPPORT=ON" ]; doCheck = true; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 56bd308b6bd..ee9cd76605f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2363,7 +2363,9 @@ with pkgs; hddtemp = callPackage ../tools/misc/hddtemp { }; - hdf4 = callPackage ../tools/misc/hdf4 { }; + hdf4 = callPackage ../tools/misc/hdf4 { + szip = null; + }; hdf5 = callPackage ../tools/misc/hdf5 { gfortran = null; From 322582d7038118bb94244610054b2687bcaadb7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Wed, 5 Jul 2017 17:37:39 +0200 Subject: [PATCH 25/42] libav: maintenance 11.9 -> 11.10 --- pkgs/development/libraries/libav/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libav/default.nix b/pkgs/development/libraries/libav/default.nix index 3d4fbab3e42..28d435fbb9c 100644 --- a/pkgs/development/libraries/libav/default.nix +++ b/pkgs/development/libraries/libav/default.nix @@ -28,7 +28,7 @@ let inherit (stdenv.lib) optional optionals hasPrefix; in let result = { libav_0_8 = libavFun "0.8.20" "0c7a2417c3a01eb74072691bb93ce802ae1be08f"; - libav_11 = libavFun "11.9" "36ed1329099676ff3c970576e03c6a21f2da2e15"; + libav_11 = libavFun "11.10" "38db6721ca8423682e4d614c170eccc33ba32e00"; libav_12 = libavFun "12" "4ecde7274621c82a6882b7614d907b28de25cc4e"; }; From e33c7fa4c1261f3963d8aa478334d896f2ef9a86 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Wed, 14 Jun 2017 16:43:16 -0700 Subject: [PATCH 26/42] blackmagic init at 1.6.1 --- .../tools/misc/blackmagic/default.nix | 59 +++++++++++++++++++ .../tools/misc/blackmagic/helper.sh | 49 +++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 110 insertions(+) create mode 100644 pkgs/development/tools/misc/blackmagic/default.nix create mode 100755 pkgs/development/tools/misc/blackmagic/helper.sh diff --git a/pkgs/development/tools/misc/blackmagic/default.nix b/pkgs/development/tools/misc/blackmagic/default.nix new file mode 100644 index 00000000000..ab84cb37656 --- /dev/null +++ b/pkgs/development/tools/misc/blackmagic/default.nix @@ -0,0 +1,59 @@ +{ stdenv, lib, fetchFromGitHub +, gcc-arm-embedded, bash, libftdi +, python, pythonPackages +}: + +with lib; + +stdenv.mkDerivation rec { + name = "blackmagic-${version}"; + version = "1.6.1"; + + src = fetchFromGitHub { + owner = "blacksphere"; + repo = "blackmagic"; + rev = "d3a8f27fdbf952194e8fc5ce9b2fc9bcef7c545c"; + sha256 = "0c3l7cfqag3g7zrfn4mmikkx7076hb1r856ybhhdh0f6zji2j6jx"; + fetchSubmodules = true; + }; + + buildInputs = [ + gcc-arm-embedded + libftdi + python + pythonPackages.intelhex + ]; + + postPatch = '' + # Prevent calling out to `git' to generate a version number: + substituteInPlace src/Makefile \ + --replace '`git describe --always --dirty`' '${version}' + + # Fix scripts that generate headers: + for f in $(find scripts libopencm3/scripts -type f); do + patchShebangs "$f" + done + ''; + + buildPhase = "${stdenv.shell} ${./helper.sh}"; + installPhase = ":"; # buildPhase does this. + + meta = { + description = "In-application debugger for ARM Cortex microcontrollers"; + longDescription = '' + The Black Magic Probe is a modern, in-application debugging tool + for embedded microprocessors. It allows you to see what is going + on "inside" an application running on an embedded microprocessor + while it executes. + + This package builds the firmware for all supported platforms, + placing them in separate directories under the firmware + directory. It also places the FTDI version of the blackmagic + executable in the bin directory. + ''; + homepage = https://github.com/blacksphere/blackmagic; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ pjones ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/development/tools/misc/blackmagic/helper.sh b/pkgs/development/tools/misc/blackmagic/helper.sh new file mode 100755 index 00000000000..b4c7558885b --- /dev/null +++ b/pkgs/development/tools/misc/blackmagic/helper.sh @@ -0,0 +1,49 @@ +################################################################################ +# Build all of the platforms manually since the `all_platforms' target +# doesn't preserve all of the build outputs and overrides CFLAGS. +set -e +set -u + +################################################################################ +# Prevent a warning from shellcheck: +out=${out:-/tmp} + +################################################################################ +export CFLAGS=$NIX_CFLAGS_COMPILE + +################################################################################ +PRODUCTS="blackmagic.bin blackmagic.hex blackmagic_dfu.bin blackmagic_dfu.hex" + +################################################################################ +make_platform() { + echo "Building for hardware platform $1" + + make clean + make PROBE_HOST="$1" + + if [ "$1" = libftdi ]; then + mkdir -p "$out/bin" + install -m 0555 blackmagic "$out/bin" + fi + + for f in $PRODUCTS; do + if [ -r "$f" ]; then + mkdir -p "$out/firmware/$1" + install -m 0444 "$f" "$out/firmware/$1" + fi + done + +} + +################################################################################ +# Start by building libopencm3: +make -C libopencm3 + +################################################################################ +# And now all of the platforms: +cd src + +for platform in platforms/*/Makefile.inc; do + probe=$(basename "$(dirname "$platform")") + make_platform "$probe" +done diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ff58787a286..35421c8434c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6500,6 +6500,8 @@ with pkgs; bison3 = callPackage ../development/tools/parsing/bison/3.x.nix { }; bison = bison3; + blackmagic = callPackage ../development/tools/misc/blackmagic { }; + bloaty = callPackage ../development/tools/bloaty { }; bossa = callPackage ../development/tools/misc/bossa { From 00f0f7e9f60924881b8d2382c96f525df95857c2 Mon Sep 17 00:00:00 2001 From: Tim Steinbach Date: Wed, 5 Jul 2017 12:49:56 -0400 Subject: [PATCH 27/42] linux: 4.11.8 -> 4.11.9 --- pkgs/os-specific/linux/kernel/linux-4.11.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-4.11.nix b/pkgs/os-specific/linux/kernel/linux-4.11.nix index afdb1427e85..51151b449a4 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.11.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.11.nix @@ -1,12 +1,12 @@ { stdenv, hostPlatform, fetchurl, perl, buildLinux, ... } @ args: import ./generic.nix (args // rec { - version = "4.11.8"; + version = "4.11.9"; extraMeta.branch = "4.11"; src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "1f4x4wym6kr57zhjpmvj9p7z2j43zcvpyvkh2nnhsb4yxg5qszcf"; + sha256 = "0q60690hmqhz2x3v6qyjq7lhp2j99dcldvd46myc9ggp78d93j1z"; }; kernelPatches = args.kernelPatches; From 05bd289ff83caafbc8c9f976182d634151738965 Mon Sep 17 00:00:00 2001 From: Tim Steinbach Date: Wed, 5 Jul 2017 12:52:05 -0400 Subject: [PATCH 28/42] linux: 4.9.35 -> 4.9.36 --- pkgs/os-specific/linux/kernel/linux-4.9.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-4.9.nix b/pkgs/os-specific/linux/kernel/linux-4.9.nix index f1bdb3c2cb9..dcd5694ebbc 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.9.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.9.nix @@ -1,12 +1,12 @@ { stdenv, hostPlatform, fetchurl, perl, buildLinux, ... } @ args: import ./generic.nix (args // rec { - version = "4.9.35"; + version = "4.9.36"; extraMeta.branch = "4.9"; src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "0dklbr686ygvpbjs6chra9vycfvp8xjgkvapai14lglzsx72749l"; + sha256 = "1x615q5fl17fqr8h0552l7lzrpmn1n9azmsrnq9xhf980imfj0d0"; }; kernelPatches = args.kernelPatches; From a04afd1594d23fcc66c3f432afe273a077011388 Mon Sep 17 00:00:00 2001 From: Tim Steinbach Date: Wed, 5 Jul 2017 12:54:56 -0400 Subject: [PATCH 29/42] linux: 4.4.75 -> 4.4.76 --- pkgs/os-specific/linux/kernel/linux-4.4.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-4.4.nix b/pkgs/os-specific/linux/kernel/linux-4.4.nix index 8c05fdc711b..5ac5a52c0a5 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.4.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.4.nix @@ -1,12 +1,12 @@ { stdenv, hostPlatform, fetchurl, perl, buildLinux, ... } @ args: import ./generic.nix (args // rec { - version = "4.4.75"; + version = "4.4.76"; extraMeta.branch = "4.4"; src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "0l3rklx1957czsddg3jb5xw5rvw8bf58s4yrkswikphv7j5crzjg"; + sha256 = "180mngyar7ky2aiaszmgfqpfvwi0kxcym8j3ifflzggwqjkgrrki"; }; kernelPatches = args.kernelPatches; From e1b29dd6d6a9d3f17fdc60ea5d47b16746c16606 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Wed, 5 Jul 2017 18:59:59 +0200 Subject: [PATCH 30/42] firmwareLinuxNonfree: 2017-04-16 -> 2017-07-05 Fixes #27129. --- .../linux/firmware/firmware-linux-nonfree/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/firmware/firmware-linux-nonfree/default.nix b/pkgs/os-specific/linux/firmware/firmware-linux-nonfree/default.nix index b81c8f257b8..2f4689beea4 100644 --- a/pkgs/os-specific/linux/firmware/firmware-linux-nonfree/default.nix +++ b/pkgs/os-specific/linux/firmware/firmware-linux-nonfree/default.nix @@ -2,7 +2,7 @@ stdenv.mkDerivation rec { name = "firmware-linux-nonfree-${version}"; - version = "2017-04-16"; + version = "2017-07-05"; # This repo is built by merging the latest versions of # http://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/ @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { owner = "fpletz"; repo = "linux-firmware"; rev = version; - sha256 = "0ar29vjjpsw7r7pqqa8b0jxx03k230cn7x8fkqi23bj68bd9x5pc"; + sha256 = "0vlk043y7c32g4d9hz93j64x372qqrwsq65mh8s5s5xrvamja2if"; }; preInstall = '' From c71989022e858ba3c638f0449c9c51e6654cd6ae Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Wed, 5 Jul 2017 19:04:17 +0200 Subject: [PATCH 31/42] nginxMainline: 1.13.1 -> 1.13.2 --- pkgs/servers/http/nginx/mainline.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/http/nginx/mainline.nix b/pkgs/servers/http/nginx/mainline.nix index a24eedce7c7..959e9d4ebf8 100644 --- a/pkgs/servers/http/nginx/mainline.nix +++ b/pkgs/servers/http/nginx/mainline.nix @@ -1,6 +1,6 @@ { callPackage, ... }@args: callPackage ./generic.nix (args // { - version = "1.13.1"; - sha256 = "0xk7gcsgwhz047h54adn8crnkrkr7g1z79w8ik34v6k0lrr6r1d5"; + version = "1.13.2"; + sha256 = "0w4vj6hl23z9kdw09v7jzq3c1593i4fhwmrz6qx2g7cq2i6j6zyp"; }) From f9a2866508c1133ea54d4174feb8a76b689eb616 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 5 Jul 2017 17:28:44 +0000 Subject: [PATCH 32/42] maude: set available on all Unix platforms --- pkgs/development/interpreters/maude/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/maude/default.nix b/pkgs/development/interpreters/maude/default.nix index a977e0801a8..17e545d95a7 100644 --- a/pkgs/development/interpreters/maude/default.nix +++ b/pkgs/development/interpreters/maude/default.nix @@ -61,7 +61,7 @@ stdenv.mkDerivation rec { rewriting logic computation. ''; - platforms = stdenv.lib.platforms.linux; + platforms = stdenv.lib.platforms.unix; maintainers = [ stdenv.lib.maintainers.peti ]; }; } From 18e3799cd1fcce8a1b37e182e65e3edc4c0f0a0e Mon Sep 17 00:00:00 2001 From: Volth Date: Tue, 4 Jul 2017 21:39:37 +0000 Subject: [PATCH 33/42] ocamlPackages.{benchmark,obuild,ptmap,rope}: init at 1.4, 0.1.8, 2.0.1, 0.5 --- .../ocaml-modules/benchmark/default.nix | 24 +++++++++++++ .../ocaml-modules/ptmap/default.nix | 34 +++++++++++++++++++ .../ocaml-modules/rope/default.nix | 24 +++++++++++++ .../tools/ocaml/obuild/default.nix | 31 +++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ pkgs/top-level/ocaml-packages.nix | 6 ++++ 6 files changed, 121 insertions(+) create mode 100644 pkgs/development/ocaml-modules/benchmark/default.nix create mode 100644 pkgs/development/ocaml-modules/ptmap/default.nix create mode 100644 pkgs/development/ocaml-modules/rope/default.nix create mode 100644 pkgs/development/tools/ocaml/obuild/default.nix diff --git a/pkgs/development/ocaml-modules/benchmark/default.nix b/pkgs/development/ocaml-modules/benchmark/default.nix new file mode 100644 index 00000000000..de2010275ef --- /dev/null +++ b/pkgs/development/ocaml-modules/benchmark/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, ocaml_pcre }: + +let version = "1.4"; in + +stdenv.mkDerivation { + name = "ocaml${ocaml.version}-benchmark-${version}"; + + src = fetchzip { + url = "https://github.com/Chris00/ocaml-benchmark/releases/download/${version}/benchmark-${version}.tar.gz"; + sha256 = "16wi8ld7c3mq77ylpgbnj8qqqqimyzwxs47v06vyrwpma5pab5xa"; + }; + + buildInputs = [ ocaml findlib ocamlbuild ocaml_pcre ]; + + createFindlibDestdir = true; + + meta = { + homepage = http://ocaml-benchmark.forge.ocamlcore.org/; + platforms = ocaml.meta.platforms or []; + description = "Benchmark running times of code"; + license = stdenv.lib.licenses.lgpl21; + maintainers = with stdenv.lib.maintainers; [ volth ]; + }; +} diff --git a/pkgs/development/ocaml-modules/ptmap/default.nix b/pkgs/development/ocaml-modules/ptmap/default.nix new file mode 100644 index 00000000000..aa44fe3d009 --- /dev/null +++ b/pkgs/development/ocaml-modules/ptmap/default.nix @@ -0,0 +1,34 @@ +{ stdenv, fetchzip, ocaml, findlib, obuild }: + +let version = "2.0.1"; in + +stdenv.mkDerivation { + name = "ocaml${ocaml.version}-ptmap-${version}"; + + src = fetchzip { + url = "https://github.com/UnixJunkie/ptmap/archive/v${version}.tar.gz"; + sha256 = "09ib4q5amkac2yy0hr7yn1n1j6y10v08chh82qc70wl7s473if15"; + }; + + buildInputs = [ ocaml findlib obuild ]; + + createFindlibDestdir = true; + + buildPhase = '' + substituteInPlace ptmap.obuild --replace 'build-deps: qcheck' "" + obuild configure + obuild build lib-ptmap + ''; + + installPhase = '' + obuild install --destdir $out/lib/ocaml/${ocaml.version}/site-lib + ''; + + meta = { + homepage = https://www.lri.fr/~filliatr/software.en.html; + platforms = ocaml.meta.platforms or []; + description = "Maps over integers implemented as Patricia trees"; + license = stdenv.lib.licenses.lgpl21; + maintainers = with stdenv.lib.maintainers; [ volth ]; + }; +} diff --git a/pkgs/development/ocaml-modules/rope/default.nix b/pkgs/development/ocaml-modules/rope/default.nix new file mode 100644 index 00000000000..a62c321a4e8 --- /dev/null +++ b/pkgs/development/ocaml-modules/rope/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, benchmark }: + +let version = "0.5"; in + +stdenv.mkDerivation { + name = "ocaml${ocaml.version}-rope-${version}"; + + src = fetchzip { + url = "https://forge.ocamlcore.org/frs/download.php/1156/rope-${version}.tar.gz"; + sha256 = "1i8kzg19jrapl30mq8m91vy09z0r0dl4bnpw24ga96w8pxqf9qhd"; + }; + + buildInputs = [ ocaml findlib ocamlbuild benchmark ]; + + createFindlibDestdir = true; + + meta = { + homepage = http://rope.forge.ocamlcore.org/; + platforms = ocaml.meta.platforms or []; + description = ''Ropes ("heavyweight strings") in OCaml''; + license = stdenv.lib.licenses.lgpl21; + maintainers = with stdenv.lib.maintainers; [ volth ]; + }; +} diff --git a/pkgs/development/tools/ocaml/obuild/default.nix b/pkgs/development/tools/ocaml/obuild/default.nix new file mode 100644 index 00000000000..b4df6f660a6 --- /dev/null +++ b/pkgs/development/tools/ocaml/obuild/default.nix @@ -0,0 +1,31 @@ +{ stdenv, fetchzip, ocamlPackages }: + +let version = "0.1.8"; in + +stdenv.mkDerivation { + name = "obuild-${version}"; + + src = fetchzip { + url = "https://github.com/ocaml-obuild/obuild/archive/obuild-v${version}.tar.gz"; + sha256 = "1q1k2qqd08j1zakvydgvwgwpyn0ll7rs65gap0pvg3amnh5cp3wd"; + }; + + buildInputs = with ocamlPackages; [ ocaml findlib ]; + + buildPhase = '' + ./bootstrap + ''; + + installPhase = '' + mkdir -p $out/bin + cp dist/build/obuild/obuild dist/build/obuild-from-oasis/obuild-from-oasis dist/build/obuild-simple/obuild-simple $out/bin/ + ''; + + meta = { + homepage = https://github.com/ocaml-obuild/obuild; + platforms = ocamlPackages.ocaml.meta.platforms or []; + description = "Simple package build system for OCaml"; + license = stdenv.lib.licenses.lgpl21; + maintainers = with stdenv.lib.maintainers; [ volth ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7364d47d990..4dfe9f28b82 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6993,6 +6993,8 @@ with pkgs; noweb = callPackage ../development/tools/literate-programming/noweb { }; nuweb = callPackage ../development/tools/literate-programming/nuweb { tex = texlive.combined.scheme-small; }; + obuild = callPackage ../development/tools/ocaml/obuild { }; + omake = callPackage ../development/tools/ocaml/omake { inherit (ocamlPackages_4_02) ocaml; }; diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 1c611610817..fea8fe05bab 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -114,6 +114,8 @@ let }; camlimages = camlimages_4_1; + benchmark = callPackage ../development/ocaml-modules/benchmark { }; + biniou = callPackage ../development/ocaml-modules/biniou { }; bin_prot_p4 = callPackage ../development/ocaml-modules/bin_prot { }; @@ -551,6 +553,8 @@ let ppx_tools_versioned = callPackage ../development/ocaml-modules/ppx_tools_versioned { }; + ptmap = callPackage ../development/ocaml-modules/ptmap { }; + pycaml = callPackage ../development/ocaml-modules/pycaml { }; qcheck = callPackage ../development/ocaml-modules/qcheck { }; @@ -561,6 +565,8 @@ let reason = callPackage ../development/compilers/reason { }; + rope = callPackage ../development/ocaml-modules/rope { }; + rresult = callPackage ../development/ocaml-modules/rresult { }; safepass = callPackage ../development/ocaml-modules/safepass { }; From 8f106ead47d2b8512ab510e12a98cf8ba1e5e127 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 5 Jul 2017 18:02:18 +0000 Subject: [PATCH 34/42] julia_05: disable tests on Darwin --- pkgs/development/compilers/julia/0.5.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/compilers/julia/0.5.nix b/pkgs/development/compilers/julia/0.5.nix index 1ee4dea51e3..6e379091703 100644 --- a/pkgs/development/compilers/julia/0.5.nix +++ b/pkgs/development/compilers/julia/0.5.nix @@ -155,7 +155,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - doCheck = true; + doCheck = !stdenv.isDarwin; checkTarget = "testall"; # Julia's tests require read/write access to $HOME preCheck = '' From 2521af87ad0ce3fbf4a22891a68a507a1c197844 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 5 Jul 2017 18:05:09 +0000 Subject: [PATCH 35/42] obuild: remove dependency on findlib --- pkgs/development/tools/ocaml/obuild/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/ocaml/obuild/default.nix b/pkgs/development/tools/ocaml/obuild/default.nix index b4df6f660a6..0b5295654d3 100644 --- a/pkgs/development/tools/ocaml/obuild/default.nix +++ b/pkgs/development/tools/ocaml/obuild/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchzip, ocamlPackages }: +{ stdenv, fetchzip, ocaml }: let version = "0.1.8"; in @@ -10,7 +10,7 @@ stdenv.mkDerivation { sha256 = "1q1k2qqd08j1zakvydgvwgwpyn0ll7rs65gap0pvg3amnh5cp3wd"; }; - buildInputs = with ocamlPackages; [ ocaml findlib ]; + buildInputs = [ ocaml ]; buildPhase = '' ./bootstrap @@ -23,7 +23,7 @@ stdenv.mkDerivation { meta = { homepage = https://github.com/ocaml-obuild/obuild; - platforms = ocamlPackages.ocaml.meta.platforms or []; + platforms = ocaml.meta.platforms or []; description = "Simple package build system for OCaml"; license = stdenv.lib.licenses.lgpl21; maintainers = with stdenv.lib.maintainers; [ volth ]; From a63732f9b22f4687c647b2837afd0742640efb8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Wed, 5 Jul 2017 20:21:51 +0200 Subject: [PATCH 36/42] Kwallet: Fixes bug that dbus could not find the kwallet service --- .../libraries/kde-frameworks/kwallet-dbus.patch | 9 +++++++++ pkgs/development/libraries/kde-frameworks/kwallet.nix | 1 + 2 files changed, 10 insertions(+) create mode 100644 pkgs/development/libraries/kde-frameworks/kwallet-dbus.patch diff --git a/pkgs/development/libraries/kde-frameworks/kwallet-dbus.patch b/pkgs/development/libraries/kde-frameworks/kwallet-dbus.patch new file mode 100644 index 00000000000..00f3d8baedf --- /dev/null +++ b/pkgs/development/libraries/kde-frameworks/kwallet-dbus.patch @@ -0,0 +1,9 @@ +diff --git a/src/runtime/kwalletd/org.kde.kwalletd5.service.in b/src/runtime/kwalletd/org.kde.kwalletd5.service.in +index 76eb90e..7a78e83 100644 +--- a/src/runtime/kwalletd/org.kde.kwalletd5.service.in ++++ b/src/runtime/kwalletd/org.kde.kwalletd5.service.in +@@ -1,3 +1,3 @@ + [D-BUS Service] + Name=org.kde.kwalletd5 +-Exec=@CMAKE_INSTALL_PREFIX@/bin/kwalletd5 ++Exec=@CMAKE_INSTALL_BINDIR@/kwalletd5 diff --git a/pkgs/development/libraries/kde-frameworks/kwallet.nix b/pkgs/development/libraries/kde-frameworks/kwallet.nix index fca0dedd083..ece915071ad 100644 --- a/pkgs/development/libraries/kde-frameworks/kwallet.nix +++ b/pkgs/development/libraries/kde-frameworks/kwallet.nix @@ -15,4 +15,5 @@ mkDerivation { knotifications kservice kwidgetsaddons kwindowsystem libgcrypt qgpgme ]; propagatedBuildInputs = [ qtbase ]; + patches = [ ./kwallet-dbus.patch ]; } From 6fd51f96fe99409d67a08a3eaad34108f6ab1b04 Mon Sep 17 00:00:00 2001 From: Joe Hermaszewski Date: Sat, 1 Jul 2017 15:25:20 +0100 Subject: [PATCH 37/42] qbs: init at 1.8 --- .../tools/build-managers/qbs/default.nix | 41 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 43 insertions(+) create mode 100644 pkgs/development/tools/build-managers/qbs/default.nix diff --git a/pkgs/development/tools/build-managers/qbs/default.nix b/pkgs/development/tools/build-managers/qbs/default.nix new file mode 100644 index 00000000000..dc2d545a765 --- /dev/null +++ b/pkgs/development/tools/build-managers/qbs/default.nix @@ -0,0 +1,41 @@ +{ stdenv, qt5, fetchFromGitHub }: + +stdenv.mkDerivation rec { + name = "qbs-${version}"; + + version = "1.8"; + + src = fetchFromGitHub { + owner = "qt-labs"; + repo = "qbs"; + rev = "fa9c21d6908e0dad805113f570ac883c1dc5067a"; + sha256 = "1manriz75rav1vldkk829yk1la9md4m872l5ykl9m982i9801d9g"; + }; + + enableParallelBuilding = true; + + buildInputs = with qt5; [ + qtbase + qtscript + ]; + + installFlags = [ "INSTALL_ROOT=$(out)" ]; + + buildPhase = '' + # From http://doc.qt.io/qbs/building.html + qmake -r qbs.pro + make + ''; + + postInstall = '' + mv $out/usr/local/* "$out" + ''; + + meta = with stdenv.lib; { + description = "A tool that helps simplify the build process for developing projects across multiple platforms"; + license = licenses.lgpl21; + maintainers = with maintainers; [ expipiplus1 ]; + inherit version; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 39aeecfcdbb..7224abfeb4f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9430,6 +9430,8 @@ with pkgs; re2 = callPackage ../development/libraries/re2 { }; + qbs = callPackage ../development/tools/build-managers/qbs { }; + qca2 = callPackage ../development/libraries/qca2 { qt = qt4; }; qca2-qt5 = callPackage ../development/libraries/qca2 { qt = qt5.qtbase; }; From 407324faa9b1a4a0641cb1146cc910328210ab6e Mon Sep 17 00:00:00 2001 From: John Ramsden Date: Wed, 5 Jul 2017 16:28:01 -0700 Subject: [PATCH 38/42] Rename nylas-mail to nylas-mail-bin. Change pkg in module, and name in pkg. --- nixos/modules/programs/nylas-mail.nix | 2 +- .../mailreaders/{nylas-mail => nylas-mail-bin}/default.nix | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename pkgs/applications/networking/mailreaders/{nylas-mail => nylas-mail-bin}/default.nix (90%) diff --git a/nixos/modules/programs/nylas-mail.nix b/nixos/modules/programs/nylas-mail.nix index fc18a9a4760..9a6cf755f2a 100644 --- a/nixos/modules/programs/nylas-mail.nix +++ b/nixos/modules/programs/nylas-mail.nix @@ -27,7 +27,7 @@ in { config = mkIf cfg.enable { - environment.systemPackages = [pkgs.nylas-mail]; + environment.systemPackages = [ pkgs.nylas-mail-bin ]; services.gnome3.gnome-keyring = mkIf cfg.gnome3-keyring { enable = true; diff --git a/pkgs/applications/networking/mailreaders/nylas-mail/default.nix b/pkgs/applications/networking/mailreaders/nylas-mail-bin/default.nix similarity index 90% rename from pkgs/applications/networking/mailreaders/nylas-mail/default.nix rename to pkgs/applications/networking/mailreaders/nylas-mail-bin/default.nix index b9d4be3e380..4c768325fee 100644 --- a/pkgs/applications/networking/mailreaders/nylas-mail/default.nix +++ b/pkgs/applications/networking/mailreaders/nylas-mail-bin/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { name = "${pkgname}-${version}"; - pkgname = "nylas-mail"; + pkgname = "nylas-mail-bin"; version = "2.0.32"; subVersion = "fec7941"; @@ -126,7 +126,7 @@ stdenv.mkDerivation rec { meta = with stdenv.lib; { description = "Open-source mail client built on the modern web with Electron, React, and Flux"; longDescription = '' - Nylas Mail is an open-source mail client built on the modern web with Electron, React, and Flux. It is designed to be extensible, so it's easy to create new experiences and workflows around email. To run nylas-mail, an additional manual step is required. Make sure to have services.gnome3.gnome-keyring.enable = true; in your configuration.nix before running nylas-mail. If you happen to miss this step, you should remove ~/.nylas-mail and "~/.config/Nylas Mail" for a blank setup". + Nylas Mail is an open-source mail client built on the modern web with Electron, React, and Flux. It is designed to be extensible, so it's easy to create new experiences and workflows around email. Nylas Mail can be enabled with it's requirements by enabling 'services.nylas-mail.enable=true'. Alternatively, make sure to have services.gnome3.gnome-keyring.enable = true; in your configuration.nix before running nylas-mail. If you happen to miss this step, you should remove ~/.nylas-mail and "~/.config/Nylas Mail" for a blank setup". ''; license = licenses.gpl3; maintainers = with maintainers; [ johnramsden ]; From c38207983a04c3a6a17ce77e854ce2ffde207283 Mon Sep 17 00:00:00 2001 From: John Ramsden Date: Wed, 5 Jul 2017 16:54:30 -0700 Subject: [PATCH 39/42] Missed the attribute name in all-packages.nix during rename. --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6c95a907864..8b2193a45ac 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15910,7 +15910,7 @@ with pkgs; thinkingRock = callPackage ../applications/misc/thinking-rock { }; - nylas-mail = callPackage ../applications/networking/mailreaders/nylas-mail { }; + nylas-mail-bin = callPackage ../applications/networking/mailreaders/nylas-mail-bin { }; thunderbird = callPackage ../applications/networking/mailreaders/thunderbird { inherit (gnome2) libIDL; From bcdfbad836a04cda074124635861d46e11ad9646 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Thu, 6 Jul 2017 07:04:13 +0200 Subject: [PATCH 40/42] lambda-mod-zsh-theme: 2017-05-21 -> 2017-07-05 --- pkgs/shells/lambda-mod-zsh-theme/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/shells/lambda-mod-zsh-theme/default.nix b/pkgs/shells/lambda-mod-zsh-theme/default.nix index b1b17bef29d..8e2a0950d19 100644 --- a/pkgs/shells/lambda-mod-zsh-theme/default.nix +++ b/pkgs/shells/lambda-mod-zsh-theme/default.nix @@ -1,13 +1,13 @@ { stdenv, fetchFromGitHub }: stdenv.mkDerivation { - name = "lambda-mod-zsh-theme-unstable-2017-05-21"; + name = "lambda-mod-zsh-theme-unstable-2017-07-05"; src = fetchFromGitHub { owner = "halfo"; repo = "lambda-mod-zsh-theme"; - sha256 = "1410ryc22i20na5ypa1q6f106lkjj8n1qfjmb77q4rspi0ydaiy4"; - rev = "6fa277361ec2c84e612b5b6d876797ebe72102a5"; + sha256 = "03kdhifxsnfbly6hqpr1h6kf52kyhdbh82nvwkkyrz1lw2cxl89n"; + rev = "ba7d5fea16db91fc8de887e69250f4e501b1e36d"; }; buildPhases = [ "unpackPhase" "installPhase" ]; From 74f55017d26bb0931184bbcb54630000ce5ee107 Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Thu, 6 Jul 2017 11:13:29 +0000 Subject: [PATCH 41/42] Update nixops to 1.5.1 (cherry picked from commit 1b57bf274ae5c76e91b2b264d8aa8bfcecb72102) --- pkgs/tools/package-management/nixops/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/package-management/nixops/default.nix b/pkgs/tools/package-management/nixops/default.nix index 820bcbb9a35..1467faac8e3 100644 --- a/pkgs/tools/package-management/nixops/default.nix +++ b/pkgs/tools/package-management/nixops/default.nix @@ -1,9 +1,9 @@ { callPackage, fetchurl }: callPackage ./generic.nix (rec { - version = "1.5"; + version = "1.5.1"; src = fetchurl { url = "http://nixos.org/releases/nixops/nixops-${version}/nixops-${version}.tar.bz2"; - sha256 = "0z4pzc55wjab8v4bkrff94f8qp1g9ydgxxpl2dvy5130bg1s52wd"; + sha256 = "0pba9c8ya4hvqmg458p74g69hb06lh0f5bsgw7dsi8pjrcb0624g"; }; }) From 8fcc92fc692b4ec7511530068cf0ab1e5d757082 Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Thu, 6 Jul 2017 04:06:10 +0200 Subject: [PATCH 42/42] glibc: fix unaligned __tls_get_addr issue --- pkgs/development/libraries/glibc/common.nix | 3 +- .../libraries/glibc/fix-x64-abi.patch | 35 +++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/libraries/glibc/fix-x64-abi.patch diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix index 647a34e95db..1b53acf12b1 100644 --- a/pkgs/development/libraries/glibc/common.nix +++ b/pkgs/development/libraries/glibc/common.nix @@ -68,7 +68,8 @@ stdenv.mkDerivation ({ ++ lib.optionals stdenv.isi686 [ ./fix-i686-memchr.patch ./i686-fix-vectorized-strcspn.patch - ]; + ] + ++ lib.optional stdenv.isx86_64 ./fix-x64-abi.patch; postPatch = # Needed for glibc to build with the gnumake 3.82 diff --git a/pkgs/development/libraries/glibc/fix-x64-abi.patch b/pkgs/development/libraries/glibc/fix-x64-abi.patch new file mode 100644 index 00000000000..1d60dcd7988 --- /dev/null +++ b/pkgs/development/libraries/glibc/fix-x64-abi.patch @@ -0,0 +1,35 @@ +From 3288c6da64add3b4561b8c10fff522027caea01c Mon Sep 17 00:00:00 2001 +From: Nicholas Miell +Date: Sat, 17 Jun 2017 18:21:07 -0700 +Subject: [PATCH] Align the stack on entry to __tls_get_addr() + +Old versions of gcc (4 & 5) didn't align the stack according to the +AMD64 psABI when calling __tls_get_addr(). Apparently new versions of +gcc (7) got much more aggressive about vectorizing and generating MOVAPS +instructions, which means old binaries built with the buggy versions of +gcc are much more likely to crash when using versions of glibc built +using gcc 7. + +For example, a large number of Linux games built using the Unity game +engine and available for purchase on Steam. +--- + elf/dl-tls.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/elf/dl-tls.c b/elf/dl-tls.c +index 5aba33b3fa..3f3cb917de 100644 +--- a/elf/dl-tls.c ++++ b/elf/dl-tls.c +@@ -827,6 +827,10 @@ rtld_hidden_proto (__tls_get_addr) + rtld_hidden_def (__tls_get_addr) + #endif + ++#ifdef __x86_64__ ++/* Old versions of gcc didn't align the stack. */ ++__attribute__((force_align_arg_pointer)) ++#endif + /* The generic dynamic and local dynamic model cannot be used in + statically linked applications. */ + void * +-- +2.13.0