From ab22a0803996c40eee80aa0f81d151090ab15b01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Czy=C5=BC?= Date: Sat, 11 Feb 2017 04:57:57 +0000 Subject: [PATCH 01/20] test all postgresql versions, test server restart (#1735) --- nixos/release.nix | 2 +- nixos/tests/postgresql.nix | 70 ++++++++++++++++++++++++-------------- 2 files changed, 46 insertions(+), 26 deletions(-) diff --git a/nixos/release.nix b/nixos/release.nix index 0f298188c6c..a8c7d9fd0c3 100644 --- a/nixos/release.nix +++ b/nixos/release.nix @@ -286,7 +286,7 @@ in rec { tests.openssh = callTest tests/openssh.nix {}; #tests.panamax = hydraJob (import tests/panamax.nix { system = "x86_64-linux"; }); tests.peerflix = callTest tests/peerflix.nix {}; - tests.postgresql = callTest tests/postgresql.nix {}; + tests.postgresql = callSubTests tests/postgresql.nix {}; tests.printing = callTest tests/printing.nix {}; tests.proxy = callTest tests/proxy.nix {}; tests.pumpio = callTest tests/pump.io.nix {}; diff --git a/nixos/tests/postgresql.nix b/nixos/tests/postgresql.nix index f17384b44ba..1f4f43a2666 100644 --- a/nixos/tests/postgresql.nix +++ b/nixos/tests/postgresql.nix @@ -1,26 +1,46 @@ -import ./make-test.nix ({ pkgs, ...} : { - name = "postgresql"; - meta = with pkgs.stdenv.lib.maintainers; { - maintainers = [ zagy ]; - }; - - nodes = { - master = - { pkgs, config, ... }: - - { - services.postgresql.enable = true; - services.postgresql.initialScript = pkgs.writeText "postgresql-init.sql" - '' - CREATE ROLE postgres WITH superuser login createdb; - ''; - }; - }; - - testScript = '' - startAll; - $master->waitForUnit("postgresql"); - $master->sleep(10); # Hopefully this is long enough!! - $master->succeed("echo 'select 1' | sudo -u postgres psql"); +{ system ? builtins.currentSystem }: +with import ../lib/testing.nix { inherit system; }; +with pkgs.lib; +let + postgresql-versions = pkgs.callPackages ../../pkgs/servers/sql/postgresql { }; + test-sql = pkgs.writeText "postgresql-test" '' + CREATE EXTENSION pgcrypto; -- just to check if lib loading works + CREATE TABLE sth ( + id int + ); + INSERT INTO sth (id) VALUES (1); + INSERT INTO sth (id) VALUES (1); + INSERT INTO sth (id) VALUES (1); + INSERT INTO sth (id) VALUES (1); + INSERT INTO sth (id) VALUES (1); ''; -}) + make-postgresql-test = postgresql-name: postgresql-package: { + name = postgresql-name; + meta = with pkgs.stdenv.lib.maintainers; { + maintainers = [ zagy ]; + }; + + machine = {pkgs, config, ...}: + { + services.postgresql.package=postgresql-package; + services.postgresql.enable = true; + }; + + testScript = '' + $machine->start; + $machine->waitForUnit("postgresql"); + # postgresql should be available just after unit start + $machine->succeed("cat ${test-sql} | psql postgres"); + $machine->shutdown; # make sure that postgresql survive restart (bug #1735) + sleep(2); + $machine->start; + $machine->waitForUnit("postgresql"); + $machine->fail('test $(psql postgres -tAc "SELECT * FROM sth;"|wc -l) -eq 3'); + $machine->succeed('test $(psql postgres -tAc "SELECT * FROM sth;"|wc -l) -eq 5'); + $machine->fail('test $(psql postgres -tAc "SELECT * FROM sth;"|wc -l) -eq 4'); + $machine->shutdown; + ''; + + }; +in + mapAttrs' (p-name: p-package: {name=p-name; value=make-postgresql-test p-name p-package;}) postgresql-versions From 518e5c09a85345512d712ee964f367adb6401803 Mon Sep 17 00:00:00 2001 From: Florian Jacob Date: Tue, 28 Feb 2017 14:10:52 +0100 Subject: [PATCH 02/20] avahi-daemon service: Add option to enable point-to-point interfaces. --- nixos/modules/services/networking/avahi-daemon.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/nixos/modules/services/networking/avahi-daemon.nix b/nixos/modules/services/networking/avahi-daemon.nix index 6a786e75bbc..e7ef68c90b2 100644 --- a/nixos/modules/services/networking/avahi-daemon.nix +++ b/nixos/modules/services/networking/avahi-daemon.nix @@ -21,6 +21,7 @@ let use-ipv6=${if ipv6 then "yes" else "no"} ${optionalString (interfaces!=null) "allow-interfaces=${concatStringsSep "," interfaces}"} ${optionalString (domainName!=null) "domain-name=${domainName}"} + allow-point-to-point=${if allowPointToPoint then "yes" else "no"} [wide-area] enable-wide-area=${if wideArea then "yes" else "no"} @@ -98,6 +99,15 @@ in ''; }; + allowPointToPoint = mkOption { + default = false; + description= '' + Whether to use POINTTOPOINT interfaces. Might make mDNS unreliable due to usually large + latencies with such links and opens a potential security hole by allowing mDNS access from Internet + connections. Use with care and YMMV! + ''; + }; + wideArea = mkOption { default = true; description = ''Whether to enable wide-area service discovery.''; From cf1db9fda0eb12b53a37118c12829be368faf55b Mon Sep 17 00:00:00 2001 From: Jean-Pierre PRUNARET Date: Tue, 28 Mar 2017 23:21:49 +0200 Subject: [PATCH 03/20] textadept: bombay update without version pining --- pkgs/applications/editors/textadept/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/editors/textadept/default.nix b/pkgs/applications/editors/textadept/default.nix index 1e24054b996..27d0cf445b0 100644 --- a/pkgs/applications/editors/textadept/default.nix +++ b/pkgs/applications/editors/textadept/default.nix @@ -87,7 +87,7 @@ let get_libluajit = get_url libluajit_url "1nhvcdjpqrhd5qbihdm3bxpw84irfvnw2vmfqnsy253ay3dxzrgy"; get_gtdialog = get_url gtdialog_url "0nvcldyhj8abr8jny9pbyfjwg8qfp9f2h508vjmrvr5c5fqdbbm0"; get_cdk = get_url cdk_url "0j74l874y33i26y5kjg3pf1vswyjif8k93pqhi0iqykpbxfsg382"; - get_bombay = get_url_zip bombay_url "05fnh1imxdb4sb076fzqywqszp31whdbkzmpkqxc8q2r1m5vj3hg" + get_bombay = get_url_zip bombay_url "0illabngrrxidkprgz268wgjqknrds34nhm6hav95xc1nmsdr6jj" + "mv tip.zip bombay.zip\n"; get_termkey = get_url termkey_url "12gkrv1ldwk945qbpprnyawh0jz7rmqh18fyndbxiajyxmj97538"; From aa31d4b803c50d727b24bfd5a24176f067490f9a Mon Sep 17 00:00:00 2001 From: Dan Peebles Date: Thu, 6 Apr 2017 20:13:23 -0400 Subject: [PATCH 04/20] cups: fix on Darwin Kinda fix, anyway. Enough to proceed with other stuff :) --- pkgs/misc/cups/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/misc/cups/default.nix b/pkgs/misc/cups/default.nix index a8f7d00b6b6..1f8e559b415 100644 --- a/pkgs/misc/cups/default.nix +++ b/pkgs/misc/cups/default.nix @@ -53,6 +53,11 @@ stdenv.mkDerivation rec { "--disable-launchd" ]; + # XXX: Hackery until https://github.com/NixOS/nixpkgs/issues/24693 + preBuild = if stdenv.isDarwin then '' + export DYLD_FRAMEWORK_PATH=/System/Library/Frameworks + '' else null; + installFlags = [ # Don't try to write in /var at build time. "CACHEDIR=$(TMPDIR)/dummy" @@ -109,6 +114,6 @@ stdenv.mkDerivation rec { description = "A standards-based printing system for UNIX"; license = licenses.gpl2; # actually LGPL for the library and GPL for the rest maintainers = with maintainers; [ jgeerds ]; - platforms = platforms.linux; + platforms = platforms.unix; }; } From 6b1957d17ae687f7db09db63667fa6f2cc40990b Mon Sep 17 00:00:00 2001 From: Dan Peebles Date: Thu, 6 Apr 2017 21:00:28 -0400 Subject: [PATCH 05/20] qt5: fix to work on LLVM 4 Including apple_sdk.sdk is generally a recipe for a bad time on LLVM 3.8 and above, since you end up with bad headers in the wrong place that hurt the new libc++ in 3.8 and above. In this case, qt only wanted the super- generic SDK for CUPS headers, which we can just depend on directly now. --- pkgs/development/libraries/qt-5/5.6/qtbase/default.nix | 4 ++-- pkgs/development/libraries/qt-5/5.8/qtbase/default.nix | 4 ++-- pkgs/top-level/all-packages.nix | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/development/libraries/qt-5/5.6/qtbase/default.nix b/pkgs/development/libraries/qt-5/5.6/qtbase/default.nix index dae1139d961..b26fc7faf9d 100644 --- a/pkgs/development/libraries/qt-5/5.6/qtbase/default.nix +++ b/pkgs/development/libraries/qt-5/5.6/qtbase/default.nix @@ -80,7 +80,7 @@ stdenv.mkDerivation { sed -i \ -e 's|! /usr/bin/xcode-select --print-path >/dev/null 2>&1;|false;|' \ -e 's|! /usr/bin/xcrun -find xcodebuild >/dev/null 2>&1;|false;|' \ - -e 's|sysroot=$(/usr/bin/xcodebuild -sdk $sdk -version Path 2>/dev/null)|sysroot="${darwin.apple_sdk.sdk}"|' \ + -e 's|sysroot=$(/usr/bin/xcodebuild -sdk $sdk -version Path 2>/dev/null)|sysroot=/nonsense|' \ -e 's|QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`|QMAKE_CXX="clang++"\nQMAKE_CONF_COMPILER="clang++"|' \ -e 's|XCRUN=`/usr/bin/xcrun -sdk macosx clang -v 2>&1`|XCRUN="clang -v 2>&1"|' \ -e 's#sdk_val=$(/usr/bin/xcrun -sdk $sdk -find $(echo $val | cut -d \x27 \x27 -f 1))##' \ @@ -208,7 +208,7 @@ stdenv.mkDerivation { xcbutil xcbutilimage xcbutilkeysyms xcbutilwm libxkbcommon ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ ApplicationServices CoreServices AppKit Carbon OpenGL AGL Cocoa - DiskArbitration darwin.cf-private libiconv darwin.apple_sdk.sdk + DiskArbitration darwin.cf-private libiconv ]); buildInputs = diff --git a/pkgs/development/libraries/qt-5/5.8/qtbase/default.nix b/pkgs/development/libraries/qt-5/5.8/qtbase/default.nix index f881c76c3ad..9642b613677 100644 --- a/pkgs/development/libraries/qt-5/5.8/qtbase/default.nix +++ b/pkgs/development/libraries/qt-5/5.8/qtbase/default.nix @@ -82,7 +82,7 @@ stdenv.mkDerivation { sed -i \ -e 's|! /usr/bin/xcode-select --print-path >/dev/null 2>&1;|false;|' \ -e 's|! /usr/bin/xcrun -find xcodebuild >/dev/null 2>&1;|false;|' \ - -e 's|sysroot=$(/usr/bin/xcodebuild -sdk $sdk -version Path 2>/dev/null)|sysroot="${darwin.apple_sdk.sdk}"|' \ + -e 's|sysroot=$(/usr/bin/xcodebuild -sdk $sdk -version Path 2>/dev/null)|sysroot=/nonsense|' \ -e 's|QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`|QMAKE_CXX="clang++"\nQMAKE_CONF_COMPILER="clang++"|' \ -e 's|XCRUN=`/usr/bin/xcrun -sdk macosx clang -v 2>&1`|XCRUN="clang -v 2>&1"|' \ -e 's#sdk_val=$(/usr/bin/xcrun -sdk $sdk -find $(echo $val | cut -d \x27 \x27 -f 1))##' \ @@ -212,7 +212,7 @@ stdenv.mkDerivation { xcbutilimage xcbutilkeysyms xcbutilrenderutil xcbutilwm ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ ApplicationServices Foundation CoreServices AppKit Carbon OpenGL AGL Cocoa - DiskArbitration darwin.cf-private libiconv darwin.apple_sdk.sdk + DiskArbitration darwin.cf-private libiconv ]); buildInputs = [ ] diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8335e54a02e..26187bf7e55 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9446,7 +9446,7 @@ with pkgs; inherit newScope; inherit stdenv fetchurl makeSetupHook makeWrapper; bison = bison2; # error: too few arguments to function 'int yylex(... - cups = if stdenv.isLinux then cups else null; + inherit cups; harfbuzz = harfbuzz-icu; mesa = mesa_noglu; inherit perl; @@ -9459,7 +9459,7 @@ with pkgs; inherit newScope; inherit stdenv fetchurl makeSetupHook makeWrapper; bison = bison2; # error: too few arguments to function 'int yylex(... - cups = if stdenv.isLinux then cups else null; + inherit cups; harfbuzz = harfbuzz-icu; mesa = mesa_noglu; inherit perl; From 6e58719b1b6aa92cd2be1acde768dbc27375ab65 Mon Sep 17 00:00:00 2001 From: Dan Peebles Date: Thu, 6 Apr 2017 21:09:32 -0400 Subject: [PATCH 06/20] nano: fix on Darwin The latest update broke it --- pkgs/applications/editors/nano/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/applications/editors/nano/default.nix b/pkgs/applications/editors/nano/default.nix index 3d089c1cec1..f3a5a27bd36 100644 --- a/pkgs/applications/editors/nano/default.nix +++ b/pkgs/applications/editors/nano/default.nix @@ -36,6 +36,11 @@ in stdenv.mkDerivation rec { --sysconfdir=/etc ${optionalString (!enableNls) "--disable-nls"} ${optionalString enableTiny "--enable-tiny"} + '' + # Unclear why (perhaps an impurity?) but for some reason it decides that REG_ENHANCED is available + # during configure but then can't find it at build time. + + optionalString stdenv.isDarwin '' + nano_cv_flag_reg_extended=REG_EXTENDED ''; postPatch = optionalString stdenv.isDarwin '' From f50258bba59c125e9a35102b1f6b7ace186786c9 Mon Sep 17 00:00:00 2001 From: Benjamin Staffin Date: Thu, 6 Apr 2017 21:17:25 -0400 Subject: [PATCH 07/20] vscode: 1.10.2 -> 1.11.1 --- pkgs/applications/editors/vscode/default.nix | 22 ++++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/editors/vscode/default.nix b/pkgs/applications/editors/vscode/default.nix index c4664060214..bdd8bd44167 100644 --- a/pkgs/applications/editors/vscode/default.nix +++ b/pkgs/applications/editors/vscode/default.nix @@ -2,24 +2,28 @@ makeWrapper, libXScrnSaver }: let - version = "1.10.2"; - rev = "8076a19fdcab7e1fc1707952d652f0bb6c6db331"; + version = "1.11.1"; + rev = "d9484d12b38879b7f4cdd1150efeb2fd2c1fbf39"; channel = "stable"; - # The revision can be obtained with the following command (see https://github.com/NixOS/nixpkgs/issues/22465): - # curl -w "%{url_effective}\n" -I -L -s -S https://vscode-update.azurewebsites.net/latest/linux-x64/stable -o /dev/null + # The revision and build timestamps can be obtained with the following + # command (see https://github.com/NixOS/nixpkgs/issues/22465): + # for a in x64 ia32; do + # curl -w "%{url_effective}\n" -I -L -s -S -o /dev/null \ + # "https://vscode-update.azurewebsites.net/latest/linux-${arch}/stable" \ + # done - sha256 = if stdenv.system == "i686-linux" then "1rhwrpv17c8j06qja7i58cggzka8jm9v9h27jy22z30yxjz0p241" - else if stdenv.system == "x86_64-linux" then "1c1w7wc39a5vdap8j143ym976p9l9iwns1y28mcgjwrihdlb5wb8" - else if stdenv.system == "x86_64-darwin" then "1zznsn84k79lqirzv950q7caq7c88yh2gglwjc11y8k69awmlpva" + sha256 = if stdenv.system == "i686-linux" then "14wdblh7q3m5qdsm34dpg5p7qk6llrbqk60md8wd0fb4chpvrq94" + else if stdenv.system == "x86_64-linux" then "0rmzvaiar3y062mbrggiwjbwxs7izcih5333rn208ax4jxmbk4pc" + else if stdenv.system == "x86_64-darwin" then "1f3zdwsz0l6r7c2k25a7j5m0dl78219jzg4axcmbfa2qcs2hw0x6" else throw "Unsupported system: ${stdenv.system}"; urlBase = "https://az764295.vo.msecnd.net/${channel}/${rev}/"; urlStr = if stdenv.system == "i686-linux" then - urlBase + "code-${channel}-code_${version}-1488982317_i386.tar.gz" + urlBase + "code-${channel}-code_${version}-1491487843_i386.tar.gz" else if stdenv.system == "x86_64-linux" then - urlBase + "code-${channel}-code_${version}-1488981323_amd64.tar.gz" + urlBase + "code-${channel}-code_${version}-1491486998_amd64.tar.gz" else if stdenv.system == "x86_64-darwin" then urlBase + "VSCode-darwin-${channel}.zip" else throw "Unsupported system: ${stdenv.system}"; From 6f0a2af5bccc4f53ae1874ad9aa6103c8cb752f3 Mon Sep 17 00:00:00 2001 From: Dan Peebles Date: Thu, 6 Apr 2017 21:17:32 -0400 Subject: [PATCH 08/20] brotli: fix on Darwin --- pkgs/tools/compression/brotli/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/tools/compression/brotli/default.nix b/pkgs/tools/compression/brotli/default.nix index 92180216671..111d4125684 100644 --- a/pkgs/tools/compression/brotli/default.nix +++ b/pkgs/tools/compression/brotli/default.nix @@ -15,6 +15,10 @@ stdenv.mkDerivation rec { buildInputs = [ cmake ]; + # This breaks on Darwin because our cmake hook tries to make a build folder + # and the wonderful bazel BUILD file is already there (yay case-insensitivty?) + prePatch = "rm BUILD"; + meta = with stdenv.lib; { inherit (src.meta) homepage; From 4a79bf0e844fd465cc1b5ea6838d14963f25f7ef Mon Sep 17 00:00:00 2001 From: Andrew Abbott Date: Fri, 7 Apr 2017 11:47:39 +1000 Subject: [PATCH 09/20] textadept: 9.0 -> 9.3 --- .../editors/textadept/default.nix | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/editors/textadept/default.nix b/pkgs/applications/editors/textadept/default.nix index 1e24054b996..db171f49950 100644 --- a/pkgs/applications/editors/textadept/default.nix +++ b/pkgs/applications/editors/textadept/default.nix @@ -43,11 +43,11 @@ let # These lists are taken from the Makefile. - scintilla_tgz = "scintilla367.tgz"; + scintilla_tgz = "scintilla373.tgz"; tre_zip = "cdce45e8dd7a3b36954022b4a4d3570e1ac5a4f8.zip"; scinterm_zip = "scinterm_1.8.zip"; - scintillua_zip = "scintillua_3.6.7-1.zip"; - lua_tgz = "lua-5.3.3.tar.gz"; + scintillua_zip = "33298b6cbce3.zip"; + lua_tgz = "lua-5.3.4.tar.gz"; lpeg_tgz = "lpeg-1.0.0.tar.gz"; lfs_zip = "v_1_6_3.zip"; lspawn_zip = "lspawn_1.5.zip"; @@ -60,7 +60,8 @@ let scinterm_url = "http://foicica.com/scinterm/download/" + scinterm_zip; tre_url = "https://github.com/laurikari/tre/archive/" + tre_zip; - scintillua_url = "http://foicica.com/scintillua/download/" + scintillua_zip; + #scintillua_url = "http://foicica.com/scintillua/download/" + scintillua_zip; + scintillua_url = "http://foicica.com/hg/scintillua/archive/" + scintillua_zip; gtdialog_url = "http://foicica.com/gtdialog/download/" + gtdialog_zip; lspawn_url = "http://foicica.com/lspawn/download/" + lspawn_zip; @@ -75,11 +76,11 @@ let termkey_url = "http://www.leonerd.org.uk/code/libtermkey/" + termkey_tgz; - get_scintilla = get_url scintilla_url "0rh1xgd06qcnj4l0vi8g4i94vi63s76366b8hhqky3iqdjgwsxpi"; + get_scintilla = get_url scintilla_url "0rkczxzj6bqxks4jcbxbyrarjhfjh95nwxxiqprfid1kaamgkfm2"; get_tre = get_url tre_url "0mw8npwk5nnhc33352j4akannhpx77kqvfam8jdq1n4yf8js1gi7"; get_scinterm = get_url scinterm_url "02ax6cjpxylfz7iqp1cjmsl323in066a38yklmsyzdl3w7761nxi"; - get_scintillua = get_url scintillua_url "0fhyjrkfj2cvxnql65687nx1d0sfyg5lbrxmylyzhnfh4s4jnwmq"; - get_lua = get_url lua_url "18mcfbbmjyp8f2l9yy7n6dzk066nq6man0kpwly4bppphilc04si"; + get_scintillua = get_url scintillua_url "1kx113dpjby1p9jcsqlnlzwj01z94f9szw4b38077qav3bj4lk6g"; + get_lua = get_url lua_url "0320a8dg3aci4hxla380dx1ifkw8gj4gbw5c4dz41g1kh98sm0gn"; get_lpeg = get_url lpeg_url "13mz18s359wlkwm9d9iqlyyrrwjc6iqfpa99ai0icam2b3khl68h"; get_lfs = get_url_zip lfs_url "1hxcnqj53540ysyw8fzax7f09pl98b8f55s712gsglcdxp2g2pri"; get_lspawn = get_url lspawn_url "09c6v9irblay2kv1n7i59pyj9g4xb43c6rfa7ba5m353lymcwwqi"; @@ -108,7 +109,7 @@ let + get_termkey; in stdenv.mkDerivation rec { - version = "9.0"; + version = "9.3"; name = "textadept-${version}"; buildInputs = [ @@ -118,7 +119,7 @@ stdenv.mkDerivation rec { src = fetchhg { url = http://foicica.com/hg/textadept; rev = "textadept_${version}"; - sha256 = "1fkxblf2db4i0kbfww94xwps7nbn88qc4fwghrm4dcszcq32jlfi"; + sha256 = "18x79pazm86agn1khdxfnf87la6kli3xasi7dcjx7l6yyz19y14d"; }; preConfigure = '' From 4a08528b4aad94332006ad4c190c3f2fa207d630 Mon Sep 17 00:00:00 2001 From: Benjamin Staffin Date: Thu, 6 Apr 2017 22:18:18 -0400 Subject: [PATCH 10/20] vscode: Revamp URL generation scheme This ought to be way easier to maintain! Now just the version number and sha256 hashes need to be updated for an update, and there are no more manual cmdline steps to get version hashes and timestamps. Related to #22465 --- pkgs/applications/editors/vscode/default.nix | 34 ++++++++------------ 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/pkgs/applications/editors/vscode/default.nix b/pkgs/applications/editors/vscode/default.nix index bdd8bd44167..a2854208a49 100644 --- a/pkgs/applications/editors/vscode/default.nix +++ b/pkgs/applications/editors/vscode/default.nix @@ -3,37 +3,29 @@ let version = "1.11.1"; - rev = "d9484d12b38879b7f4cdd1150efeb2fd2c1fbf39"; channel = "stable"; - # The revision and build timestamps can be obtained with the following - # command (see https://github.com/NixOS/nixpkgs/issues/22465): - # for a in x64 ia32; do - # curl -w "%{url_effective}\n" -I -L -s -S -o /dev/null \ - # "https://vscode-update.azurewebsites.net/latest/linux-${arch}/stable" \ - # done + plat = { + "i686-linux" = "linux-ia32"; + "x86_64-linux" = "linux-x64"; + "x86_64-darwin" = "darwin"; + }.${stdenv.system}; - sha256 = if stdenv.system == "i686-linux" then "14wdblh7q3m5qdsm34dpg5p7qk6llrbqk60md8wd0fb4chpvrq94" - else if stdenv.system == "x86_64-linux" then "0rmzvaiar3y062mbrggiwjbwxs7izcih5333rn208ax4jxmbk4pc" - else if stdenv.system == "x86_64-darwin" then "1f3zdwsz0l6r7c2k25a7j5m0dl78219jzg4axcmbfa2qcs2hw0x6" - else throw "Unsupported system: ${stdenv.system}"; + sha256 = { + "i686-linux" = "14wdblh7q3m5qdsm34dpg5p7qk6llrbqk60md8wd0fb4chpvrq94"; + "x86_64-linux" = "0rmzvaiar3y062mbrggiwjbwxs7izcih5333rn208ax4jxmbk4pc"; + "x86_64-darwin" = "1f3zdwsz0l6r7c2k25a7j5m0dl78219jzg4axcmbfa2qcs2hw0x6"; + }.${stdenv.system}; - urlBase = "https://az764295.vo.msecnd.net/${channel}/${rev}/"; + archive_fmt = if stdenv.system == "x86_64-darwin" then "zip" else "tar.gz"; - urlStr = if stdenv.system == "i686-linux" then - urlBase + "code-${channel}-code_${version}-1491487843_i386.tar.gz" - else if stdenv.system == "x86_64-linux" then - urlBase + "code-${channel}-code_${version}-1491486998_amd64.tar.gz" - else if stdenv.system == "x86_64-darwin" then - urlBase + "VSCode-darwin-${channel}.zip" - else throw "Unsupported system: ${stdenv.system}"; in stdenv.mkDerivation rec { name = "vscode-${version}"; - inherit version; src = fetchurl { - url = urlStr; + name = "VSCode_${version}_${plat}.${archive_fmt}"; + url = "https://vscode-update.azurewebsites.net/${version}/${plat}/${channel}"; inherit sha256; }; From 0cacae6a5f283ccc1fee8ea718d7e4bb87e6c0a3 Mon Sep 17 00:00:00 2001 From: Dan Peebles Date: Thu, 6 Apr 2017 23:20:35 -0400 Subject: [PATCH 11/20] gcc6: fix for LLVM 4.0 --- .../gcc/6/darwin-const-correct.patch | 25 +++++++++++++++++++ pkgs/development/compilers/gcc/6/default.nix | 3 ++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/compilers/gcc/6/darwin-const-correct.patch diff --git a/pkgs/development/compilers/gcc/6/darwin-const-correct.patch b/pkgs/development/compilers/gcc/6/darwin-const-correct.patch new file mode 100644 index 00000000000..a9b9b85acab --- /dev/null +++ b/pkgs/development/compilers/gcc/6/darwin-const-correct.patch @@ -0,0 +1,25 @@ +From 5972cd58bde3bc8bacfe994e5b127c411241f255 Mon Sep 17 00:00:00 2001 +From: law +Date: Tue, 3 Jan 2017 05:36:40 +0000 +Subject: [PATCH] * config/darwin-driver.c (darwin_driver_init): + Const-correctness fixes for first_period and second_period variables. + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244010 138bc75d-0d04-0410-961f-82ee72b054a4 +--- +diff --git a/gcc/config/darwin-driver.c b/gcc/config/darwin-driver.c +index 0c4f0cd..e3ed79d 100644 +--- a/gcc/config/darwin-driver.c ++++ b/gcc/config/darwin-driver.c +@@ -299,10 +299,10 @@ darwin_driver_init (unsigned int *decoded_options_count, + if (vers_string != NULL) + { + char *asm_major = NULL; +- char *first_period = strchr(vers_string, '.'); ++ const char *first_period = strchr(vers_string, '.'); + if (first_period != NULL) + { +- char *second_period = strchr(first_period+1, '.'); ++ const char *second_period = strchr(first_period+1, '.'); + if (second_period != NULL) + asm_major = xstrndup (vers_string, second_period-vers_string); + else diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix index c6fac16a76c..b4e588f6b14 100644 --- a/pkgs/development/compilers/gcc/6/default.nix +++ b/pkgs/development/compilers/gcc/6/default.nix @@ -73,7 +73,8 @@ let version = "6.3.0"; # The GNAT Makefiles did not pay attention to CFLAGS_FOR_TARGET for its # target libraries and tools. ++ optional langAda ../gnat-cflags.patch - ++ optional langFortran ../gfortran-driving.patch; + ++ optional langFortran ../gfortran-driving.patch + ++ optional stdenv.isDarwin ./darwin-const-correct.patch; # Kill this after 6.3.0 javaEcj = fetchurl { # The `$(top_srcdir)/ecj.jar' file is automatically picked up at From 1be61d192137ad022a9e1b8fd5d1f3d76fc5bbfc Mon Sep 17 00:00:00 2001 From: Dan Peebles Date: Thu, 6 Apr 2017 23:33:14 -0400 Subject: [PATCH 12/20] podofo: fix on LLVM 4 Not sure if the things I made optional on Darwin are really worth keeping at all, but I don't have a Linux box handy so I'm minimizing potential damage. --- pkgs/development/libraries/podofo/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/podofo/default.nix b/pkgs/development/libraries/podofo/default.nix index 5f5dcfb71e6..1ba82354033 100644 --- a/pkgs/development/libraries/podofo/default.nix +++ b/pkgs/development/libraries/podofo/default.nix @@ -10,8 +10,12 @@ stdenv.mkDerivation rec { }; propagatedBuildInputs = [ zlib freetype libjpeg libtiff fontconfig openssl libpng libidn expat ]; - nativeBuildInputs = [ cmake gcc5 pkgconfig ]; - buildInputs = [ lua5 stdenv.cc.libc ]; + + # Does Linux really need gcc5? Darwin doesn't seem to... + nativeBuildInputs = [ cmake pkgconfig ] ++ stdenv.lib.optional stdenv.isLinux gcc5; + + # Does Linux really need libc here? Darwin doesn't seem to... + buildInputs = [ lua5 ] ++ stdenv.lib.optional stdenv.isLinux stdenv.cc.libc; crossAttrs = { propagatedBuildInputs = [ zlib.crossDrv freetype.crossDrv libjpeg.crossDrv From 987cafe5e041489ef530b4f8c55d0d5080e1de3e Mon Sep 17 00:00:00 2001 From: Benjamin Staffin Date: Thu, 6 Apr 2017 23:35:49 -0400 Subject: [PATCH 13/20] vscode: Add libxkbfile to rpath Otherwise vscode complains about it. --- pkgs/applications/editors/vscode/default.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/editors/vscode/default.nix b/pkgs/applications/editors/vscode/default.nix index a2854208a49..b6734d09d0e 100644 --- a/pkgs/applications/editors/vscode/default.nix +++ b/pkgs/applications/editors/vscode/default.nix @@ -1,5 +1,5 @@ { stdenv, lib, callPackage, fetchurl, unzip, atomEnv, makeDesktopItem, - makeWrapper, libXScrnSaver }: + makeWrapper, libXScrnSaver, libxkbfile }: let version = "1.11.1"; @@ -19,6 +19,13 @@ let archive_fmt = if stdenv.system == "x86_64-darwin" then "zip" else "tar.gz"; + rpath = lib.concatStringsSep ":" [ + atomEnv.libPath + "${lib.makeLibraryPath [libXScrnSaver]}/libXss.so.1" + "${lib.makeLibraryPath [libxkbfile]}/libxkbfile.so.1" + "$out/lib/vscode" + ]; + in stdenv.mkDerivation rec { name = "vscode-${version}"; @@ -41,7 +48,7 @@ in buildInputs = if stdenv.system == "x86_64-darwin" then [ unzip makeWrapper libXScrnSaver ] - else [ makeWrapper libXScrnSaver ]; + else [ makeWrapper libXScrnSaver libxkbfile ]; installPhase = if stdenv.system == "x86_64-darwin" then '' @@ -63,7 +70,7 @@ in postFixup = lib.optionalString (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") '' patchelf \ --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath "${atomEnv.libPath}:${stdenv.lib.makeLibraryPath [libXScrnSaver]}/libXss.so.1:$out/lib/vscode" \ + --set-rpath "${rpath}" \ $out/lib/vscode/code ''; From 370452ef41eca6facdcb7d5a2728b33834694ff4 Mon Sep 17 00:00:00 2001 From: Markus Hauck Date: Fri, 7 Apr 2017 12:42:31 +0200 Subject: [PATCH 14/20] scalafmt: 0.6.7 -> 0.6.8 (#24699) --- pkgs/development/tools/scalafmt/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/scalafmt/default.nix b/pkgs/development/tools/scalafmt/default.nix index b0d02cb8233..dc7f96ea8a0 100644 --- a/pkgs/development/tools/scalafmt/default.nix +++ b/pkgs/development/tools/scalafmt/default.nix @@ -1,13 +1,13 @@ { stdenv, fetchurl, unzip, jre }: stdenv.mkDerivation rec { - version = "0.6.7"; + version = "0.6.8"; baseName = "scalafmt"; name = "${baseName}-${version}"; src = fetchurl { url = "https://github.com/scalameta/scalafmt/releases/download/v${version}/${baseName}.tar.gz"; - sha256 = "122x4a5x8024s7qqqs7vx8kz1x18q2l6alcvpzvsqkc304ybhfmh"; + sha256 = "1iaanrxk5lhxx1zj9gbxzgqbnyy1azfrab984mga7di5z1hs02s2"; }; unpackPhase = "tar xvzf $src"; From 4c718a9a5a73be55ff2c4fe043e7f7a9b748a2d9 Mon Sep 17 00:00:00 2001 From: Tim Steinbach Date: Fri, 7 Apr 2017 08:22:04 -0400 Subject: [PATCH 15/20] sbt: 0.13.13 -> 0.13.14 --- pkgs/development/tools/build-managers/sbt/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/build-managers/sbt/default.nix b/pkgs/development/tools/build-managers/sbt/default.nix index e6006e94881..309a6e13606 100644 --- a/pkgs/development/tools/build-managers/sbt/default.nix +++ b/pkgs/development/tools/build-managers/sbt/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "sbt-${version}"; - version = "0.13.13"; + version = "0.13.14"; src = fetchurl { url = "https://dl.bintray.com/sbt/native-packages/sbt/${version}/${name}.tgz"; - sha256 = "0ygrz92qkzasj6fps1bjg7wlgl69867jjjc37yjadib0l8hkvl20"; + sha256 = "1q4jnrva21s0rhcn561ayfp5yhd6rpxidgx6f4i5n3dla3p9zkr9"; }; patchPhase = '' From 27cec397b1229d6341de52ab878bad80c175c555 Mon Sep 17 00:00:00 2001 From: Dan Peebles Date: Fri, 7 Apr 2017 08:23:08 -0400 Subject: [PATCH 16/20] itk: 4.10 -> 4.11 Also includes a patch to work against clang 4, which was my original motivation for the 4.10 -> 4.11 upgrade (since it fixed another issue) --- pkgs/development/libraries/itk/default.nix | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/itk/default.nix b/pkgs/development/libraries/itk/default.nix index 7e3220d8a37..3865aa226f9 100644 --- a/pkgs/development/libraries/itk/default.nix +++ b/pkgs/development/libraries/itk/default.nix @@ -1,13 +1,20 @@ -{ stdenv, fetchurl, cmake, libX11, libuuid, xz, vtk }: +{ stdenv, fetchurl, fetchpatch, cmake, libX11, libuuid, xz, vtk }: stdenv.mkDerivation rec { - name = "itk-4.10.0"; + name = "itk-4.11.0"; src = fetchurl { - url = mirror://sourceforge/itk/InsightToolkit-4.10.0.tar.xz; - sha256 = "0pxijhqsnwcp9jv1d8p11hsj90k8ajpwxhrnn8kk8c56k7y1207a"; + url = mirror://sourceforge/itk/InsightToolkit-4.11.0.tar.xz; + sha256 = "0axvyds0gads5914g0m70z5q16gzghr0rk0hy3qjpf1k9bkxvcq6"; }; + # Clang 4 dislikes signed comparisons of pointers against integers. Should no longer be + # necessary once we get past ITK 4.11. + patches = [ (fetchpatch { + url = "https://github.com/InsightSoftwareConsortium/ITK/commit/d1407a55910ad9c232f3d241833cfd2e59024946.patch"; + sha256 = "0h851afkv23fwgkibjss30fkbz4nkfg6rmmm4pfvkwpml23gzz7s"; + }) ]; + cmakeFlags = [ "-DBUILD_TESTING=OFF" "-DBUILD_EXAMPLES=OFF" From 9ef5fd41892c83f905425187c409d0addc23faa7 Mon Sep 17 00:00:00 2001 From: xNWDD Date: Fri, 7 Apr 2017 14:52:46 +0200 Subject: [PATCH 17/20] gitkraken: 2.3.1 -> 2.3.3 (#24684) * gitkraken: 2.3.1 -> 2.3.2 * gitkraken: 2.3.2 -> 2.3.3 --- pkgs/applications/version-management/gitkraken/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/gitkraken/default.nix b/pkgs/applications/version-management/gitkraken/default.nix index 076a78bd5b6..b02da41f9d6 100644 --- a/pkgs/applications/version-management/gitkraken/default.nix +++ b/pkgs/applications/version-management/gitkraken/default.nix @@ -9,11 +9,11 @@ with stdenv.lib; stdenv.mkDerivation rec { name = "gitkraken-${version}"; - version = "2.3.1"; + version = "2.3.3"; src = fetchurl { url = "https://release.gitkraken.com/linux/v${version}.deb"; - sha256 = "ddb9eec34232e830646633c43bc9adc61afa0eee79500af29918b62780093b2a"; + sha256 = "a6e235ab1a4c1da755af8218ad819fcac6bc89b1a324aa2c0e430f3805cb1a16"; }; libPath = makeLibraryPath [ From d486006e06cb22ddac1fdbf96cddce813589ebd4 Mon Sep 17 00:00:00 2001 From: Aristid Breitkreuz Date: Fri, 7 Apr 2017 20:43:19 +0200 Subject: [PATCH 18/20] rq: 0.9.2 -> 0.10.4 (still broken, our v8 is too old) --- pkgs/development/tools/rq/default.nix | 49 ++------------------------- 1 file changed, 3 insertions(+), 46 deletions(-) diff --git a/pkgs/development/tools/rq/default.nix b/pkgs/development/tools/rq/default.nix index b383812d321..eef8b660c41 100644 --- a/pkgs/development/tools/rq/default.nix +++ b/pkgs/development/tools/rq/default.nix @@ -4,59 +4,16 @@ with rustPlatform; buildRustPackage rec { name = "rq-${version}"; - version = "0.9.2"; + version = "0.10.4"; src = fetchFromGitHub { owner = "dflemstr"; repo = "rq"; rev = "v${version}"; - sha256 = "051k7ls2mbjf584crayd654wm8m7gk3b7s73j97f9l8sbppdhpcq"; + sha256 = "066f6sdy0vrp113wlg18q9p0clyrg9iqbj17ly0yn8dxr5iar002"; }; - serde_json = fetchFromGitHub { - owner = "serde-rs"; - repo = "json"; - rev = "0c05059e4533368020bd356bd708c38286810a7d"; - sha256 = "0924ngqbsif2vmmpgn8l2gg4bzms0z0i7yng0zx6sdv0x836lw43"; - }; - - v8_rs = fetchFromGitHub { - owner = "dflemstr"; - repo = "v8-rs"; - rev = "0772be5b2e84842a2d434963702bc2995aeda90b"; - sha256 = "0h2n431rp6nqpip7dy7xpckkvcr19aq7l1f3x3wlrj02xi4c8mad"; - }; - - cargoDepsHook = '' - # use non-git dependencies - (cd $sourceRoot && patch -p1 < Date: Fri, 7 Apr 2017 21:47:03 +0200 Subject: [PATCH 19/20] bup: enable par2 by default The par2 closure is <300 KB, so having it enabled by default seems reasonable. --- pkgs/tools/backup/bup/default.nix | 2 +- pkgs/top-level/all-packages.nix | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/backup/bup/default.nix b/pkgs/tools/backup/bup/default.nix index baf9e4f4e39..2f3d0bedb97 100644 --- a/pkgs/tools/backup/bup/default.nix +++ b/pkgs/tools/backup/bup/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchFromGitHub, fetchurl, makeWrapper , perl, pandoc, python2Packages, git -, par2cmdline ? null, par2Support ? false +, par2cmdline ? null, par2Support ? true }: assert par2Support -> par2cmdline != null; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 26187bf7e55..1ef3492a702 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1118,9 +1118,7 @@ with pkgs; inherit (pythonPackages) gyp; }; - bup = callPackage ../tools/backup/bup { - par2Support = config.bup.par2Support or false; - }; + bup = callPackage ../tools/backup/bup { }; burp_1_3 = callPackage ../tools/backup/burp/1.3.48.nix { }; From b41dd2fae0128d15f0b23d12b91310c4df00bc1a Mon Sep 17 00:00:00 2001 From: Sorin Iclanzan Date: Sat, 8 Apr 2017 00:04:55 -0400 Subject: [PATCH 20/20] nixos/compton: fixup option descriptions (#24724) * Fix `fadeExclude` description. * Fix typo in `shadowExclude`. --- nixos/modules/services/x11/compton.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/x11/compton.nix b/nixos/modules/services/x11/compton.nix index d1f7f164e64..d75d24830f8 100644 --- a/nixos/modules/services/x11/compton.nix +++ b/nixos/modules/services/x11/compton.nix @@ -83,7 +83,7 @@ in { "focused = 1" ]; description = '' - List of condition of windows that should have no shadow. + List of conditions of windows that should not be faded. See compton(1) man page for more examples. ''; }; @@ -123,7 +123,7 @@ in { "focused = 1" ]; description = '' - List of condition of windows that should have no shadow. + List of conditions of windows that should have no shadow. See compton(1) man page for more examples. ''; };