···2323 The default Python 3 interpreter is now CPython 3.7 instead of CPython 3.6.
2424 </para>
2525 </listitem>
2626+ <listitem>
2727+ <para>
2828+ Added the Pantheon desktop environment.
2929+ It can be enabled through <varname>services.xserver.desktopManager.pantheon.enable</varname>.
3030+ </para>
3131+ <note>
3232+ <para>
3333+ <varname>services.xserver.desktopManager.pantheon</varname> default enables lightdm
3434+ as a display manager and using Pantheon's greeter.
3535+ </para>
3636+ <para>
3737+ This is because of limitations with the screenlocking implementation, whereas the
3838+ screenlocker would be non-functional without it.
3939+ </para>
4040+ <para>
4141+ Because of that it is recommended to retain this precaution, however if you'd like to change this set:
4242+ </para>
4343+ <itemizedlist>
4444+ <listitem>
4545+ <para>
4646+ <option>services.xserver.displayManager.lightdm.enable</option>
4747+ </para>
4848+ </listitem>
4949+ <listitem>
5050+ <para>
5151+ <option>services.xserver.displayManager.lightdm.greeters.pantheon.enable</option>
5252+ </para>
5353+ </listitem>
5454+ </itemizedlist>
5555+ <para>to <literal>false</literal> and enable your preferred display manager.</para>
5656+ </note>
5757+ </listitem>
2658 </itemizedlist>
2759 </section>
2860
···11-WGET_ARGS=( https://download.kde.org/stable/applications/18.12.0/ -A '*.tar.xz' )
11+WGET_ARGS=( https://download.kde.org/stable/applications/18.12.1/ -A '*.tar.xz' )
···2323 for fn in "$@"; do
2424 if [ -L "$fn" ]; then continue; fi
2525 echo "$fn: fixing dylib"
2626- install_name_tool -id "$fn" "${flags[@]}" "$fn"
2626+ int_out=$(install_name_tool -id "$fn" "${flags[@]}" "$fn" 2>&1)
2727+ result=$?
2828+ if [ "$result" -ne 0 ] &&
2929+ ! grep "shared library stub file and can't be changed" <<< "$out"
3030+ then
3131+ echo "$int_out" >&2
3232+ exit "$result"
3333+ fi
2734 done
2835}
2936
+26-2
pkgs/build-support/setup-hooks/wrap-gapps-hook.sh
···3636 done
37373838 if [[ -z "$dontWrapGApps" ]]; then
3939+ targetDirsThatExist=()
4040+ targetDirsRealPath=()
4141+4242+ # wrap binaries
3943 targetDirs=( "${prefix}/bin" "${prefix}/libexec" )
4044 for targetDir in "${targetDirs[@]}"; do
4145 if [[ -d "${targetDir}" ]]; then
4242- find -L "${targetDir}" -type f -executable -print0 \
4646+ targetDirsThatExist+=("${targetDir}")
4747+ targetDirsRealPath+=("$(realpath "${targetDir}")/")
4848+ find "${targetDir}" -type f -executable -print0 \
4349 | while IFS= read -r -d '' file; do
4444- echo "Wrapping program ${file}"
5050+ echo "Wrapping program '${file}'"
4551 wrapProgram "${file}" "${gappsWrapperArgs[@]}"
4652 done
4753 fi
4854 done
5555+5656+ # wrap links to binaries that point outside targetDirs
5757+ # Note: links to binaries within targetDirs do not need
5858+ # to be wrapped as the binaries have already been wrapped
5959+ if [[ ${#targetDirsThatExist[@]} -ne 0 ]]; then
6060+ find "${targetDirsThatExist[@]}" -type l -xtype f -executable -print0 \
6161+ | while IFS= read -r -d '' linkPath; do
6262+ linkPathReal=$(realpath "${linkPath}")
6363+ for targetPath in "${targetDirsRealPath[@]}"; do
6464+ if [[ "$linkPathReal" == "$targetPath"* ]]; then
6565+ echo "Not wrapping link: '$linkPath' (already wrapped)"
6666+ continue 2
6767+ fi
6868+ done
6969+ echo "Wrapping link: '$linkPath'"
7070+ wrapProgram "${linkPath}" "${gappsWrapperArgs[@]}"
7171+ done
7272+ fi
4973 fi
5074}
5175
···11+#!@bash@/bin/bash
22+PATH=@bash@/bin:@nix_prefetch_scripts@/bin:@common_updater_scripts@/bin:@git@/bin:@jq@/bin:@nix@/bin:@gnugrep@/bin:@gnused@/bin:@curl@/bin:$PATH
33+#!/usr/bin/env bash
44+55+set -eu -o pipefail
66+77+#
88+# ─── HOW TO USE ─────────────────────────────────────────────────────────────────
99+#
1010+1111+function usage ( ) {
1212+ cat <<EOF
1313+Usage: update.sh <repo_name> <attr>
1414+EOF
1515+}
1616+1717+#
1818+# ─── POINTS YOU IN THE RIGHT DIRECTION ──────────────────────────────────────────
1919+#
2020+2121+ function usage_tip ( ) {
2222+ echo 'run `update.sh -h` for usage instructions' >&2
2323+ exit 1
2424+ }
2525+2626+#
2727+# ─── OPTIONS: RELEASE | MASTER ────────────────────────────────────────────────────
2828+#
2929+3030+ while getopts ":hrm" opt; do
3131+ case $opt in
3232+ r)
3333+ release=1
3434+ master=0
3535+ ;;
3636+ m)
3737+ master=1
3838+ release=0
3939+ ;;
4040+ h)
4141+ usage
4242+ exit
4343+ ;;
4444+ ?)
4545+ echo "Invalid option: -$OPTARG" >&2
4646+ usage_tip
4747+ ;;
4848+ esac
4949+ done
5050+5151+ shift $((OPTIND-1))
5252+5353+#
5454+# ─── FAIL WITH MESSAGE AND NON-ZERO EXIT STATUS ─────────────────────────────────
5555+#
5656+5757+ function fail ( ) {
5858+ echo "$1" >&2
5959+ exit 1
6060+ }
6161+6262+#
6363+# ─── UPDATES PACKAGE TO LATEST TAGGED RELEASE ───────────────────────────────
6464+#
6565+6666+ function update_to_latest_release ( ) {
6767+ repo_name="$1"
6868+ attr="$2"
6969+7070+ version=$(get_latest_tag "$repo_name")
7171+ fetch=$(fetch "$repo_name" "refs/tags/${version}")
7272+ sha256=$(get_hash "${fetch}")
7373+7474+ update-source-version "pantheon.$attr" "$version" "$sha256"
7575+7676+ nix_file=$(get_file_path $attr)
7777+7878+ if [ ! -f "$nix_file" ]; then
7979+ fail "Couldn't evaluate 'pantheon.$attr.meta.position' to locate the .nix file!"
8080+ fi
8181+8282+ correct_rev "$attr" "$nix_file" "version"
8383+ }
8484+8585+#
8686+# ─── UPDATES PACKAGE TO MASTER ──────────────────────────────────────────────────
8787+#
8888+8989+ function update_to_master ( ) {
9090+ repo_name="$1"
9191+ attr="$2"
9292+9393+ fetch=$(fetch "$repo_name" "refs/heads/master")
9494+9595+ version=$(get_version "$fetch")
9696+ sha256=$(get_hash "$fetch")
9797+ proper_version=$(get_master_date "$fetch")
9898+9999+ update-source-version "pantheon.$attr" "$proper_version" "$sha256"
100100+101101+ nix_file=$(get_file_path $attr)
102102+103103+ if [ ! -f "$nix_file" ]; then
104104+ fail "Couldn't evaluate 'pantheon.$attr.meta.position' to locate the .nix file!"
105105+ fi
106106+107107+ correct_rev "$attr" "$nix_file" '"'$version'"'
108108+ }
109109+110110+#
111111+# ─── GETS THE LATEST TAGGED RELEASE NAME FROM GITHUB ─────────────────────
112112+#
113113+114114+ function get_latest_tag ( ) {
115115+ repo_name="$1"
116116+117117+ # Using github release api because sorting this repo just doesn't work because of old git sillyness
118118+ # Also too lazy to care to adapt `git ls-remote` command to work with it
119119+ if [ $repo_name == "switchboard-plug-pantheon-shell" ]; then
120120+ curl --silent --show-error --fail -X GET "https://api.github.com/repos/elementary/$repo_name/releases/latest" | jq -r '.tag_name'
121121+ else
122122+ git ls-remote --tags --sort="v:refname" "https://github.com/elementary/$repo_name" | tail -n1 | sed 's/.*\///; s/\^{}//'
123123+ fi
124124+ }
125125+126126+#
127127+# ─── FETCHES REPO AND RETURNS RELEVANT INFORMATION ──────────────────
128128+#
129129+130130+ function fetch ( ) {
131131+ repo_name="$1"
132132+ version="$2"
133133+134134+ base_url="https://github.com/elementary"
135135+ full_url="$base_url/$repo_name"
136136+137137+ nix-prefetch-git --quiet --no-deepClone --url "$full_url" --rev "$version"
138138+ }
139139+140140+#
141141+# ─── PARSES GIT REVISION FROM FETCH ─────────────────────────────────────────────
142142+#
143143+144144+ function get_version ( ) {
145145+ fetch_info="$1"
146146+147147+ echo "$fetch_info" | jq -r '.rev'
148148+ }
149149+150150+#
151151+# ─── PARSES HASH FROM FETCH ─────────────────────────────────────────────────────
152152+#
153153+154154+ function get_hash ( ) {
155155+ fetch_info="$1"
156156+157157+ echo "$fetch_info" | jq -r '.sha256'
158158+ }
159159+160160+#
161161+# ─── PARSES DATE FROM FETCH AND NORMALIZES IT TO NIXPKGS STANDARD ───────────────
162162+#
163163+164164+ function get_master_date ( ) {
165165+ fetch_info="$1"
166166+167167+ full_date=$(echo "$fetch_info" | jq -r '.date')
168168+ short_date=$(date -d "$full_date" +"%Y-%m-%d")
169169+170170+ echo "unstable-$short_date"
171171+ }
172172+173173+#
174174+# ─── RETURN NIX EXPRESSION PATH ─────────────────────────────────────────────────
175175+#
176176+177177+ function get_file_path () {
178178+ attr="$1"
179179+180180+ nix-instantiate --eval --strict -A "pantheon.$attr.meta.position" | sed -re 's/^"(.*):[0-9]+"$/\1/'
181181+ }
182182+183183+#
184184+# ─── CORRECTS REV VERSION ───────────────────────────────────────────────────────────
185185+#
186186+187187+ function correct_rev ( ) {
188188+ attr="$1"
189189+ nix_file="$2"
190190+ rev="$3"
191191+192192+ check_pattern1='^\s*rev\s*=\s*"[0-9a-f]{5,40}"'
193193+ check_pattern2='^\s*rev\s*=\s*version'
194194+195195+ replace_pattern1='/\brev\b\s*=/ s|\"[0-9a-f]{5,40}\"|'$rev'|'
196196+ replace_pattern2='/\brev\b\s*=/ s|version|'$rev'|'
197197+198198+ if [ $(grep -c -P "$check_pattern1" "$nix_file") = 1 ]; then
199199+ pattern="$replace_pattern1"
200200+ elif [ $(grep -c -P "$check_pattern2" "$nix_file") = 1 ]; then
201201+ pattern="$replace_pattern2"
202202+ else
203203+ fail "Couldn't figure out where out where to patch in the correct version in pantheon.$attr!"
204204+ fi
205205+206206+ sed -i.bak "$nix_file" -re "$pattern"
207207+ rm -f "$nix_file.bak"
208208+ }
209209+210210+211211+#
212212+# ─── WHETHER TO UPDATE TO RELEASE OR MASTER ──────────────────────────────────
213213+#
214214+215215+ if [ $release = 1 ]; then
216216+ update_to_latest_release $1 $2
217217+ elif [ $master = 1 ]; then
218218+ update_to_master $1 $2
219219+ else
220220+ exit 1
221221+ fi
222222+223223+# ────────────────────────────────────────────────────────────────────────────────
+1-1
pkgs/desktops/plasma-5/fetch.sh
···11-WGET_ARGS=( https://download.kde.org/stable/plasma/5.14.4/ -A '*.tar.xz' )
11+WGET_ARGS=( https://download.kde.org/stable/plasma/5.14.5/ -A '*.tar.xz' )
···33let
44 # Note: the version MUST be one version prior to the version we're
55 # building
66- version = "1.30.1";
66+ version = "1.31.1";
7788- # fetch hashes by running `print-hashes.sh 1.30.0`
88+ # fetch hashes by running `print-hashes.sh 1.31.1`
99 hashes = {
1010- i686-unknown-linux-gnu = "c61655977fb16decf0ceb76043b9ae2190927aa9cc24f013d444384dcab99bbf";
1111- x86_64-unknown-linux-gnu = "a01a493ed8946fc1c15f63e74fc53299b26ebf705938b4d04a388a746dfdbf9e";
1212- armv7-unknown-linux-gnueabihf = "9b3b6df02a2a92757e4993a7357fdd02e07b60101a748b4618e6ae1b90bc1b6b";
1313- aarch64-unknown-linux-gnu = "6d87d81561285abd6c1987e07b60b2d723936f037c4b46eedcc12e8566fd3874";
1414- i686-apple-darwin = "a7c14b18e96406d9f43d69d0f984b2fa6f92cc7b7b37e2bb7b70b6f44b02b083";
1515- x86_64-apple-darwin = "3ba1704a7defe3d9a6f0c1f68792c084da83bcba85e936d597bac0c019914b94";
1010+ i686-unknown-linux-gnu = "1e77e5e8c745320faad9ce6f319a77b4a2e75d972eb68a195acd081ad910ab6d";
1111+ x86_64-unknown-linux-gnu = "a64685535d0c457f49a8712a096a5c21564cd66fd2f7da739487f028192ebe3c";
1212+ armv7-unknown-linux-gnueabihf = "11c717b781a7af5bdc829894139f8f45d4c12a061f7f9e39481f21426a04eb21";
1313+ aarch64-unknown-linux-gnu = "29a7c6eb536fefd0ca459e48dfaea006aa8bff8a87aa82a9b7d483487033632a";
1414+ i686-apple-darwin = "46566dc25fcbd8badc9950b8c9f9b0faeca065b5a09cd96258e4f4b10d686aed";
1515+ x86_64-apple-darwin = "8398b1b303bdf0e7605d08b87070a514a4f588797c6fb3593718cb9cec233ad6";
1616 };
17171818 platform =
+2-2
pkgs/development/compilers/rust/cargo.nix
···1010 inherit version src patches;
11111212 # the rust source tarball already has all the dependencies vendored, no need to fetch them again
1313- cargoVendorDir = "src/vendor";
1414- preBuild = "cd src; pushd tools/cargo";
1313+ cargoVendorDir = "vendor";
1414+ preBuild = "pushd src/tools/cargo";
1515 postBuild = "popd";
16161717 passthru.rustc = rustc;
+3-8
pkgs/development/compilers/rust/default.nix
···7788let
99 rustPlatform = recurseIntoAttrs (makeRustPlatform (callPackage ./bootstrap.nix {}));
1010- version = "1.31.0";
1111- cargoVersion = "1.31.0";
1010+ version = "1.32.0";
1111+ cargoVersion = "1.32.0";
1212 src = fetchurl {
1313 url = "https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz";
1414- sha256 = "01pg2619bwjnhjbphryrbkwaz0lw8cfffm4xlz35znzipb04vmcs";
1414+ sha256 = "0ji2l9xv53y27xy72qagggvq47gayr5lcv2jwvmfirx029vlqnac";
1515 };
1616in rec {
1717 rustc = callPackage ./rustc.nix {
···22222323 # Re-evaluate if this we need to disable this one
2424 #./patches/stdsimd-disable-doctest.patch
2525-2626- # Fails on hydra - not locally; the exact reason is unknown.
2727- # Comments in the test suggest that some non-reproducible environment
2828- # variables such $RANDOM can make it fail.
2929- ./patches/disable-test-inherit-env.patch
3025 ];
31263227 withBundledLLVM = false;
···11{ callPackage, fetchurl, ... } @ args:
2233callPackage ./generic.nix (args // rec {
44- version = "3.6.2";
44+ version = "3.6.6";
5566 src = fetchurl {
77 url = "mirror://gnupg/gnutls/v3.6/gnutls-${version}.tar.xz";
88- sha256 = "07wdffklwmxpa9i50sh5nwrc5ajb47skrldm6rzjc0jf4dxxpmdw";
88+ sha256 = "19rcfgsfxb01cyz8jxmmgkjqc7y5s97amajzyknk1i1amywcm6mv";
99 };
10101111- # Skip two tests introduced in 3.5.11. Probable reasons of failure:
1212- # - pkgconfig: building against the result won't work before installing
1313- # - trust-store: default trust store path (/etc/ssl/...) is missing in sandbox
1111+ # Skip some tests:
1212+ # - pkgconfig: building against the result won't work before installing (3.5.11)
1313+ # - fastopen: no idea; it broke between 3.6.2 and 3.6.3 (3437fdde6 in particular)
1414+ # - trust-store: default trust store path (/etc/ssl/...) is missing in sandbox (3.5.11)
1515+ # - psk-file: no idea; it broke between 3.6.3 and 3.6.4
1416 # Change p11-kit test to use pkg-config to find p11-kit
1517 postPatch = ''
1616- sed '2iexit 77' -i tests/pkgconfig.sh
1717- sed '/^void doit(void)/,$s/{/{ exit(77);/; t' -i tests/trust-store.c
1818+ sed '2iexit 77' -i tests/{pkgconfig,fastopen}.sh
1919+ sed '/^void doit(void)/,/^{/ s/{/{ exit(77);/' -i tests/{trust-store,psk-file}.c
1820 sed 's:/usr/lib64/pkcs11/ /usr/lib/pkcs11/ /usr/lib/x86_64-linux-gnu/pkcs11/:`pkg-config --variable=p11_module_path p11-kit-1`:' -i tests/p11-kit-trust.sh
1921 '';
2022})
···11-WGET_ARGS=( https://download.kde.org/stable/frameworks/5.53/ -A '*.tar.xz' )
11+WGET_ARGS=( https://download.kde.org/stable/frameworks/5.54/ -A '*.tar.xz' )
···1313}:
14141515stdenv.mkDerivation rec {
1616- version = "6.1-20181027";
1616+ # Note the revision needs to be adjusted.
1717+ version = "6.1-20190112";
1718 name = "ncurses-${version}" + lib.optionalString (abiVersion == "5") "-abi5-compat";
18191919- src = fetchurl {
2020- urls = [
2121- "https://invisible-mirror.net/archives/ncurses/current/ncurses-${version}.tgz"
2222- "ftp://ftp.invisible-island.net/ncurses/current/ncurses-${version}.tgz"
2323- ];
2424- sha256 = "1xn6wpi22jc61158w4ifq6s1fvilhmsy1in2srn3plk8pm0d4902";
2020+ # We cannot use fetchFromGitHub (which calls fetchzip)
2121+ # because we need to be able to use fetchurlBoot.
2222+ src = let
2323+ # Note the version needs to be adjusted.
2424+ rev = "acb4184f8f69fddd052a3daa8c8675f4bf8ce369";
2525+ in fetchurl {
2626+ url = "https://github.com/mirror/ncurses/archive/${rev}.tar.gz";
2727+ sha256 = "1z8v63cj2y7dxf4m1api8cvk0ns9frif9c60m2sxhibs06pjy4q0";
2528 };
26292730 patches = lib.optional (!stdenv.cc.isClang) ./clang.patch;
···11-diff --git a/bootstrap b/bootstrap
22-index 5dedd713..864056c4 100755
33---- a/bootstrap
44-+++ b/bootstrap
55-@@ -101,7 +101,7 @@ extract(Binary) ->
66- request(Url) ->
77- HttpOptions = [{relaxed, true} | get_proxy_auth()],
88-99-- case httpc:request(get, {Url, []},
1010-+ case rebar_hermeticity:request(get, {Url, []},
1111- HttpOptions,
1212- [{body_format, binary}],
1313- rebar) of
1414-diff --git a/src/rebar_hermeticity.erl b/src/rebar_hermeticity.erl
1515-index e69de29b..8f6cc7d0 100644
1616---- a/src/rebar_hermeticity.erl
1717-+++ b/src/rebar_hermeticity.erl
1818-@@ -0,0 +1,42 @@
1919-+%% -*- erlang-indent-level: 4;indent-tabs-mode: nil -*-
2020-+%% ex: ts=4 sw=4 et
2121-+%% -------------------------------------------------------------------
2222-+%%
2323-+%% rebar: Erlang Build Tools
2424-+%%
2525-+%% Copyright (c) 2016 Eric Merritt (eric@merritt.tech)
2626-+%%
2727-+%% Permission is hereby granted, free of charge, to any person obtaining a copy
2828-+%% of this software and associated documentation files (the "Software"), to deal
2929-+%% in the Software without restriction, including without limitation the rights
3030-+%% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
3131-+%% copies of the Software, and to permit persons to whom the Software is
3232-+%% furnished to do so, subject to the following conditions:
3333-+%%
3434-+%% The above copyright notice and this permission notice shall be included in
3535-+%% all copies or substantial portions of the Software.
3636-+%%
3737-+%% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
3838-+%% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
3939-+%% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
4040-+%% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
4141-+%% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
4242-+%% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
4343-+%% THE SOFTWARE.
4444-+%% -------------------------------------------------------------------
4545-+-module(rebar_hermeticity).
4646-+
4747-+-export([request/5]).
4848-+
4949-+-include("rebar.hrl").
5050-+
5151-+%% ====================================================================
5252-+%% Public API
5353-+%% ====================================================================
5454-+
5555-+request(Method, {Url, _Headers}, _HTTPOptions, _Options, _Profile) ->
5656-+ ?ERROR("A request is being made that violates Nix hermicity "
5757-+ "This request has been stopped. Details of the request "
5858-+ "are as follows:", []),
5959-+ ?ERROR("Request: ~p ~s", [Method, Url]),
6060-+ erlang:halt(1).
6161-diff --git a/src/rebar_pkg_resource.erl b/src/rebar_pkg_resource.erl
6262-index 2cf167ee..6080aaca 100644
6363---- a/src/rebar_pkg_resource.erl
6464-+++ b/src/rebar_pkg_resource.erl
6565-@@ -127,7 +127,7 @@ make_vsn(_) ->
6666- request(Url, ETag) ->
6767- HttpOptions = [{ssl, ssl_opts(Url)},
6868- {relaxed, true} | rebar_utils:get_proxy_auth()],
6969-- case httpc:request(get, {Url, [{"if-none-match", "\"" ++ ETag ++ "\""}
7070-+ case rebar_hermeticity:request(get, {Url, [{"if-none-match", "\"" ++ ETag ++ "\""}
7171- || ETag =/= false] ++
7272- [{"User-Agent", rebar_utils:user_agent()}]},
7373- HttpOptions, [{body_format, binary}], rebar) of
7474-diff --git a/src/rebar_prv_update.erl b/src/rebar_prv_update.erl
7575-index 17446311..4d44d794 100644
7676---- a/src/rebar_prv_update.erl
7777-+++ b/src/rebar_prv_update.erl
7878-@@ -38,6 +38,8 @@ init(State) ->
7979- {ok, State1}.
8080-8181- -spec do(rebar_state:t()) -> {ok, rebar_state:t()} | {error, string()}.
8282-+do(State) -> {ok, State}.
8383-+-ifdef(non_hermetic).
8484- do(State) ->
8585- try
8686- case rebar_packages:registry_dir(State) of
8787-@@ -53,7 +55,7 @@ do(State) ->
8888- {ok, Url} ->
8989- HttpOptions = [{relaxed, true} | rebar_utils:get_proxy_auth()],
9090- ?DEBUG("Fetching registry from ~p", [Url]),
9191-- case httpc:request(get, {Url, [{"User-Agent", rebar_utils:user_agent()}]},
9292-+ case rebar_hermeticity:request(get, {Url, [{"User-Agent", rebar_utils:user_agent()}]},
9393- HttpOptions, [{stream, TmpFile}, {sync, true}],
9494- rebar) of
9595- {ok, saved_to_file} ->
9696-@@ -77,6 +79,7 @@ do(State) ->
9797- ?DEBUG("Error creating package index: ~p ~p", [C, S]),
9898- throw(?PRV_ERROR(package_index_write))
9999- end.
100100-+-endif.
101101-102102- -spec format_error(any()) -> iolist().
103103- format_error({package_parse_cdn, Uri}) ->
···36363737 mkdir -p $out/bin
3838 tee $out/bin/discrete_vga_poweroff << EOF
3939- #!/bin/sh
3939+ #!${stdenv.shell}
40404141 echo -n OFF > /proc/acpi/bbswitch
4242 EOF
4343 tee $out/bin/discrete_vga_poweron << EOF
4444- #!/bin/sh
4444+ #!${stdenv.shell}
45454646 echo -n ON > /proc/acpi/bbswitch
4747 EOF
+2-2
pkgs/os-specific/linux/kernel-headers/default.nix
···7575in {
76767777 linuxHeaders = common {
7878- version = "4.18.3";
7979- sha256 = "1m23hjd02bg8mqnd8dc4z4m3kxds1cyrc6j5saiwnhzbz373rvc1";
7878+ version = "4.19.16";
7979+ sha256 = "1pqvn6dsh0xhdpawz4ag27vkw1abvb6sn3869i4fbrz33ww8i86q";
8080 patches = [
8181 ./no-relocs.patch # for building x86 kernel headers on non-ELF platforms
8282 ./no-dynamic-cc-version-check.patch # so we can use `stdenvNoCC`, see `makeFlags` above
···11-From 0db393d3a77bb9f300a356c6a5484fc2dddb161d Mon Sep 17 00:00:00 2001
22-From: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
33-Date: Tue, 18 Sep 2018 10:03:27 +0300
44-Subject: fix race condition in file locking
55-66-The condition occurs when
77-- thread #1 is holding the lock
88-- thread #2 is waiting for it on __futexwait
99-- thread #1 is about to release the lock and performs a_swap
1010-- thread #3 enters the __lockfile function and manages to grab the lock
1111- before thread #1 calls __wake, resetting the MAYBE_WAITERS flag
1212-- thread #1 calls __wake
1313-- thread #2 wakes up but goes again to __futexwait as the lock is
1414- held by thread #3
1515-- thread #3 releases the lock but does not call __wake as the
1616- MAYBE_WAITERS flag is not set
1717-1818-This condition results in thread #2 not being woken up. This patch fixes
1919-the problem by making the woken up thread ensure that the flag is
2020-properly set before going to sleep again.
2121-2222-Mainainer's note: This fixes a regression introduced in commit
2323-c21f750727515602a9e84f2a190ee8a0a2aeb2a1.
2424----
2525- src/stdio/__lockfile.c | 12 ++++++------
2626- 1 file changed, 6 insertions(+), 6 deletions(-)
2727-2828-diff --git a/src/stdio/__lockfile.c b/src/stdio/__lockfile.c
2929-index 2ff75d8a..0dcb2a42 100644
3030---- a/src/stdio/__lockfile.c
3131-+++ b/src/stdio/__lockfile.c
3232-@@ -8,13 +8,13 @@ int __lockfile(FILE *f)
3333- int owner = f->lock, tid = __pthread_self()->tid;
3434- if ((owner & ~MAYBE_WAITERS) == tid)
3535- return 0;
3636-- for (;;) {
3737-- owner = a_cas(&f->lock, 0, tid);
3838-- if (!owner) return 1;
3939-- if (a_cas(&f->lock, owner, owner|MAYBE_WAITERS)==owner) break;
4040-+ owner = a_cas(&f->lock, 0, tid);
4141-+ if (!owner) return 1;
4242-+ while ((owner = a_cas(&f->lock, 0, tid|MAYBE_WAITERS))) {
4343-+ if ((owner & MAYBE_WAITERS) ||
4444-+ a_cas(&f->lock, owner, owner|MAYBE_WAITERS)==owner)
4545-+ __futexwait(&f->lock, owner|MAYBE_WAITERS, 1);
4646- }
4747-- while ((owner = a_cas(&f->lock, 0, tid|MAYBE_WAITERS)))
4848-- __futexwait(&f->lock, owner, 1);
4949- return 1;
5050- }
5151-5252---
5353-cgit v1.2.1
5454-
···11-From f381c118b2d4f7d914481d3cdc830ce41369b002 Mon Sep 17 00:00:00 2001
22-From: Rich Felker <dalias@aerifal.cx>
33-Date: Wed, 19 Sep 2018 18:03:22 -0400
44-Subject: [PATCH] fix getaddrinfo regression with AI_ADDRCONFIG on some
55- configurations
66-77-despite not being documented to do so in the standard or Linux
88-documentation, attempts to udp connect to 127.0.0.1 or ::1 generate
99-EADDRNOTAVAIL when the loopback device is not configured and there is
1010-no default route for IPv6. this caused getaddrinfo with AI_ADDRCONFIG
1111-to fail with EAI_SYSTEM and EADDRNOTAVAIL on some no-IPv6
1212-configurations, rather than the intended behavior of detecting IPv6 as
1313-unsuppported and producing IPv4-only results.
1414-1515-previously, only EAFNOSUPPORT was treated as unavailability of the
1616-address family being probed. instead, treat all errors related to
1717-inability to get an address or route as conclusive that the family
1818-being probed is unsupported, and only fail with EAI_SYSTEM on other
1919-errors.
2020-2121-further improvements may be desirable, such as reporting EAI_AGAIN
2222-instead of EAI_SYSTEM for errors which are expected to be transient,
2323-but this patch should suffice to fix the serious regression.
2424----
2525- src/network/getaddrinfo.c | 11 ++++++++++-
2626- 1 file changed, 10 insertions(+), 1 deletion(-)
2727-2828-diff --git a/src/network/getaddrinfo.c b/src/network/getaddrinfo.c
2929-index ba26847a..e33bfa28 100644
3030---- a/src/network/getaddrinfo.c
3131-+++ b/src/network/getaddrinfo.c
3232-@@ -76,7 +76,16 @@ int getaddrinfo(const char *restrict host, const char *restrict serv, const stru
3333- close(s);
3434- if (!r) continue;
3535- }
3636-- if (errno != EAFNOSUPPORT) return EAI_SYSTEM;
3737-+ switch (errno) {
3838-+ case EADDRNOTAVAIL:
3939-+ case EAFNOSUPPORT:
4040-+ case EHOSTUNREACH:
4141-+ case ENETDOWN:
4242-+ case ENETUNREACH:
4343-+ break;
4444-+ default:
4545-+ return EAI_SYSTEM;
4646-+ }
4747- if (family == tf[i]) return EAI_NONAME;
4848- family = tf[1-i];
4949- }
5050---
5151-2.19.0
5252-
···2626 patches = optional stdenv.hostPlatform.isCygwin ./coreutils-8.23-4.cygwin.patch;
27272828 postPatch = ''
2929- # The test tends to fail on btrfs and maybe other unusual filesystems.
2929+ # The test tends to fail on btrfs,f2fs and maybe other unusual filesystems.
3030 sed '2i echo Skipping dd sparse test && exit 0' -i ./tests/dd/sparse.sh
3131+ sed '2i echo Skipping du threshold test && exit 0' -i ./tests/du/threshold.sh
3132 sed '2i echo Skipping cp sparse test && exit 0' -i ./tests/cp/sparse.sh
3233 sed '2i echo Skipping rm deep-2 test && exit 0' -i ./tests/rm/deep-2.sh
3334 sed '2i echo Skipping du long-from-unreadable test && exit 0' -i ./tests/du/long-from-unreadable.sh
+1-1
pkgs/tools/misc/fzf/default.nix
···47474848 cp -R $src/shell $bin/share/fzf
4949 cat <<SCRIPT > $bin/bin/fzf-share
5050- #!/bin/sh
5050+ #!${stdenv.shell}
5151 # Run this script to find the fzf shared folder where all the shell
5252 # integration scripts are living.
5353 echo $bin/share/fzf
+1-1
pkgs/tools/misc/grub/2.0x.nix
···6464 preConfigure =
6565 '' for i in "tests/util/"*.in
6666 do
6767- sed -i "$i" -e's|/bin/bash|/bin/sh|g'
6767+ sed -i "$i" -e's|/bin/bash|${stdenv.shell}|g'
6868 done
69697070 # Apparently, the QEMU executable is no longer called
+1-1
pkgs/tools/misc/grub/trusted.nix
···5454 preConfigure =
5555 '' for i in "tests/util/"*.in
5656 do
5757- sed -i "$i" -e's|/bin/bash|/bin/sh|g'
5757+ sed -i "$i" -e's|/bin/bash|${stdenv.shell}|g'
5858 done
59596060 # Apparently, the QEMU executable is no longer called
+4-6
pkgs/tools/misc/hashit/default.nix
···11-{ stdenv, fetchFromGitHub, meson, ninja, pkgconfig, cmake, vala_0_40, python3, gnome3, gtk3, granite, gobject-introspection, desktop-file-utils, wrapGAppsHook }:
11+{ stdenv, fetchFromGitHub, meson, ninja, pkgconfig, cmake, pantheon, python3, gnome3, gtk3, gobject-introspection, desktop-file-utils, wrapGAppsHook }:
2233stdenv.mkDerivation rec {
44 pname = "hashit";
55 version = "1.0.0";
66-77- name = "${pname}-${version}";
8697 src = fetchFromGitHub {
108 owner = "artemanufrij";
···2018 ninja
2119 pkgconfig
2220 python3
2323- vala_0_40 # should be `elementary.vala` when elementary attribute set is merged
2121+ pantheon.vala
2422 wrapGAppsHook
2523 ];
26242725 buildInputs = [
2828- gnome3.defaultIconTheme # should be `elementary.defaultIconTheme`when elementary attribute set is merged
2626+ pantheon.elementary-icon-theme
2927 gnome3.libgee
3030- granite
2828+ pantheon.granite
3129 gtk3
3230 ];
3331
···7878 # wants to write temporary files there. So create a temporary
7979 # to run from and symlink the runtime files to it.
8080 wrapperScript = writeScript "xfstests-check" ''
8181- #!/bin/sh
8181+ #!${stdenv.shell}
8282 set -e
8383 export RESULT_BASE="$(pwd)/results"
8484