···135 CacheDirectory = "knot-resolver";
136 CacheDirectoryMode = "0770";
137 };
00138139 # Try cleaning up the previously default location of cache file.
140 # Note that /var/cache/* should always be safe to remove.
···135 CacheDirectory = "knot-resolver";
136 CacheDirectoryMode = "0770";
137 };
138+ # We don't mind running stop phase from wrong version. It seems less racy.
139+ systemd.services."kresd@".stopIfChanged = false;
140141 # Try cleaning up the previously default location of cache file.
142 # Note that /var/cache/* should always be safe to remove.
···001declare -a autoPatchelfLibs
2declare -Ag autoPatchelfFailedDeps
3···11 patchelf "$@" || (echo "Command failed: patchelf $*" && exit 1)
12}
130014addEnvHooks "$targetOffset" gatherLibraries
1516isExecutable() {
···116 interpreter="$(< "$NIX_CC/nix-support/dynamic-linker")"
117 if isExecutable "$toPatch"; then
118 runPatchelf --set-interpreter "$interpreter" "$toPatch"
00119 if [ -n "$runtimeDependencies" ]; then
120 for dep in $runtimeDependencies; do
121 rpath="$rpath${rpath:+:}$dep/lib"
···129 # clear the RPATH first.
130 runPatchelf --remove-rpath "$toPatch"
13100132 local missing
133 missing="$(
134 ldd "$toPatch" 2> /dev/null | \
135 sed -n -e 's/^[\t ]*\([^ ]\+\) => not found.*/\1/p'
136- )"
137138 # This ensures that we get the output of all missing dependencies instead
139 # of failing at the first one, because it's more useful when working on a
···175 esac
176 done
177178- for file in \
179- $(find "$@" "${findOpts[@]}" \! -type d \
180- \( -name '*.so' -o -name '*.so.*' \))
181- do addToDepCache "$file"; done
182}
183184autoPatchelf() {
···231 echo "autoPatchelfHook could not satisfy dependency $failedDep wanted by ${autoPatchelfFailedDeps[$failedDep]}"
232 depsMissing=1
233 done
00234 if [[ $depsMissing == 1 && -z "$autoPatchelfIgnoreMissingDeps" ]]; then
235 echo "Add the missing dependencies to the build inputs or set autoPatchelfIgnoreMissingDeps=true"
236 exit 1
···1+#!/usr/bin/env bash
2+3declare -a autoPatchelfLibs
4declare -Ag autoPatchelfFailedDeps
5···13 patchelf "$@" || (echo "Command failed: patchelf $*" && exit 1)
14}
1516+# shellcheck disable=SC2154
17+# (targetOffset is referenced but not assigned.)
18addEnvHooks "$targetOffset" gatherLibraries
1920isExecutable() {
···120 interpreter="$(< "$NIX_CC/nix-support/dynamic-linker")"
121 if isExecutable "$toPatch"; then
122 runPatchelf --set-interpreter "$interpreter" "$toPatch"
123+ # shellcheck disable=SC2154
124+ # (runtimeDependencies is referenced but not assigned.)
125 if [ -n "$runtimeDependencies" ]; then
126 for dep in $runtimeDependencies; do
127 rpath="$rpath${rpath:+:}$dep/lib"
···135 # clear the RPATH first.
136 runPatchelf --remove-rpath "$toPatch"
137138+ # If the file is not a dynamic executable, ldd/sed will fail,
139+ # in which case we return, since there is nothing left to do.
140 local missing
141 missing="$(
142 ldd "$toPatch" 2> /dev/null | \
143 sed -n -e 's/^[\t ]*\([^ ]\+\) => not found.*/\1/p'
144+ )" || return 0
145146 # This ensures that we get the output of all missing dependencies instead
147 # of failing at the first one, because it's more useful when working on a
···183 esac
184 done
185186+ while IFS= read -r -d '' file; do
187+ addToDepCache "$file"
188+ done < <(find "$@" "${findOpts[@]}" \! -type d \
189+ \( -name '*.so' -o -name '*.so.*' \) -print0)
190}
191192autoPatchelf() {
···239 echo "autoPatchelfHook could not satisfy dependency $failedDep wanted by ${autoPatchelfFailedDeps[$failedDep]}"
240 depsMissing=1
241 done
242+ # shellcheck disable=SC2154
243+ # (autoPatchelfIgnoreMissingDeps is referenced but not assigned.)
244 if [[ $depsMissing == 1 && -z "$autoPatchelfIgnoreMissingDeps" ]]; then
245 echo "Add the missing dependencies to the build inputs or set autoPatchelfIgnoreMissingDeps=true"
246 exit 1
+18-16
pkgs/development/arduino/arduino-core/default.nix
···11, ncurses
12, readline
13, withGui ? false
14-, gtk2 ? null
015, withTeensyduino ? false
16 /* Packages needed for Teensyduino */
17, upx
···29, udev
30}:
3132-assert withGui -> gtk2 != null;
33assert withTeensyduino -> withGui;
34let
35 externalDownloads = import ./downloads.nix {
···55 gcc.cc.lib
56 gdk-pixbuf
57 glib
58- gtk2
59 libpng12
60 libusb-compat-0_1
61 pango
···78 + stdenv.lib.optionalString (!withGui) "-core";
79in
80stdenv.mkDerivation rec {
81- version = "1.8.12";
82 name = "${flavor}-${version}";
8384 src = fetchFromGitHub {
85 owner = "arduino";
86 repo = "Arduino";
87 rev = version;
88- sha256 = "0lxkyvsh55biz2q20ba4qabraind5cpxznl41zfq027vl22j6kd2";
89 };
9091- teensyduino_version = "151";
92 teensyduino_src = fetchurl {
93 url = "https://www.pjrc.com/teensy/td_${teensyduino_version}/TeensyduinoInstall.${teensy_architecture}";
94 sha256 = {
95- linux64 = "0q8mw9bm2vb5vwa98gwcs6ad164i98hc1qqh2qw029yhwm599pn0";
96- linux32 = "1rq6sx0048ab200jy0cz5vznwxi99avidngj42rjnh7kcfas5c4m";
97- linuxarm = "19j55bq36040rpdpfxcqimda76rkbx137q15bs8nvxj13wrbl4ip";
98- linuxaarch64 = "09k78dycn1vcpcx37c1dak8bgjv8gs34l89n9r9s0c3rqmv3pg4x";
99 }.${teensy_architecture} or (throw "No arduino binaries for ${teensy_architecture}");
100 };
101 # Used because teensyduino requires jars be a specific size
102 arduino_dist_src = fetchurl {
103- url = "http://downloads.arduino.cc/arduino-${version}-${teensy_architecture}.tar.xz";
104 sha256 =
105 {
106- linux64 = "128f34kkxz7ab6ir5mqyr8d1mgxig8f9jygwxy44pdnq2rk6gmh9";
107- linux32 = "11n85lwsn1w4ysfacyw08v85s3f3zvl8j8ac7rld19yxgjslvisi";
108- linuxarm = "1k8yjivaydm6y16mplrjyblgx7l0wjzm3mjxh5saxrjq7drswmxx";
109- linuxaarch64 = "04v2nhyjhahml6nmz23bfb63c0an4a7zxgcgxqqq442i8vd304wa";
110 }.${teensy_architecture} or (throw "No arduino binaries for ${teensy_architecture}");
111 };
1121130114 buildInputs = [
115 jdk
116 ant
···149150 # This will be patched into `arduino` wrapper script
151 # Java loads gtk dynamically, so we need to provide it using LD_LIBRARY_PATH
152- dynamicLibraryPath = lib.makeLibraryPath [ gtk2 ];
153 javaPath = lib.makeBinPath [ jdk ];
154155 # Everything else will be patched into rpath
···11, ncurses
12, readline
13, withGui ? false
14+, gtk3 ? null
15+, wrapGAppsHook
16, withTeensyduino ? false
17 /* Packages needed for Teensyduino */
18, upx
···30, udev
31}:
3233+assert withGui -> gtk3 != null && wrapGAppsHook != null;
34assert withTeensyduino -> withGui;
35let
36 externalDownloads = import ./downloads.nix {
···56 gcc.cc.lib
57 gdk-pixbuf
58 glib
59+ gtk3
60 libpng12
61 libusb-compat-0_1
62 pango
···79 + stdenv.lib.optionalString (!withGui) "-core";
80in
81stdenv.mkDerivation rec {
82+ version = "1.8.13";
83 name = "${flavor}-${version}";
8485 src = fetchFromGitHub {
86 owner = "arduino";
87 repo = "Arduino";
88 rev = version;
89+ sha256 = "0qg3qyj1b7wbaw2rsfly7nf3115h26nskl4ggrn6plhx272ni84p";
90 };
9192+ teensyduino_version = "153";
93 teensyduino_src = fetchurl {
94 url = "https://www.pjrc.com/teensy/td_${teensyduino_version}/TeensyduinoInstall.${teensy_architecture}";
95 sha256 = {
96+ linux64 = "02qgsj4h4zrjxkcclx7clsqbqd699kg0dq1xxa9hbj3vfnddjv1f";
97+ linux32 = "14xaff8xj176ih8ifdvxsly5xgjjm82dqbn7lqq81a43i0svjjyn";
98+ linuxarm = "0xpg9axa6dqyhccm9cpvsv2al7rgwy4gv2l8b2kffvn974dl5759";
99+ linuxaarch64 = "1lyn4zy4l5mml3c19fw6i2pk1ypnq6mgjmxmzk9d54wpf6n3j5dk";
100 }.${teensy_architecture} or (throw "No arduino binaries for ${teensy_architecture}");
101 };
102 # Used because teensyduino requires jars be a specific size
103 arduino_dist_src = fetchurl {
104+ url = "https://downloads.arduino.cc/arduino-${version}-${teensy_architecture}.tar.xz";
105 sha256 =
106 {
107+ linux64 = "1bdlk51dqiyg5pw23hs8rfv8nrjqy0jqfl89h1466ahahpnd080v";
108+ linux32 = "0mgsw9wpwv1pgs2jslzflh7zf4ggqjgcd55hmdzrj0dvgkyw4cr2";
109+ linuxarm = "08n4lpak3i7yfyi0085j4nq14gb2n7zx85wl9drp8gaavxnfbp5f";
110+ linuxaarch64 = "0m4nhykzknm2hdpz1fhr2hbpncry53kvzs9y5lgj7rx3sy6ygbh7";
111 }.${teensy_architecture} or (throw "No arduino binaries for ${teensy_architecture}");
112 };
113114115+ nativeBuildInputs = [ wrapGAppsHook ];
116 buildInputs = [
117 jdk
118 ant
···151152 # This will be patched into `arduino` wrapper script
153 # Java loads gtk dynamically, so we need to provide it using LD_LIBRARY_PATH
154+ dynamicLibraryPath = lib.makeLibraryPath [ gtk3 ];
155 javaPath = lib.makeBinPath [ jdk ];
156157 # Everything else will be patched into rpath
···29 "-Wno-error=format-truncation"
30 "-Wno-error=pointer-compare"
31 "-Wno-error=stringop-truncation"
000032 ];
3334 nativeBuildInputs = [ makeWrapper pkgconfig ];
···82 meta = with stdenv.lib; {
83 homepage = "https://libreswan.org";
84 description = "A free software implementation of the VPN protocol based on IPSec and the Internet Key Exchange";
85- platforms = platforms.linux ++ platforms.darwin ++ platforms.freebsd;
86 license = licenses.gpl2;
87 maintainers = [ maintainers.afranchuk ];
88 };
···29 "-Wno-error=format-truncation"
30 "-Wno-error=pointer-compare"
31 "-Wno-error=stringop-truncation"
32+ # The following flag allows libreswan v3.32 to work with NSS 3.22, see
33+ # https://github.com/libreswan/libreswan/issues/334.
34+ # This flag should not be needed for libreswan v3.33 (which is not yet released).
35+ "-DNSS_PKCS11_2_0_COMPAT=1"
36 ];
3738 nativeBuildInputs = [ makeWrapper pkgconfig ];
···86 meta = with stdenv.lib; {
87 homepage = "https://libreswan.org";
88 description = "A free software implementation of the VPN protocol based on IPSec and the Internet Key Exchange";
89+ platforms = platforms.linux ++ platforms.freebsd;
90 license = licenses.gpl2;
91 maintainers = [ maintainers.afranchuk ];
92 };