Loading nixos/lib/testing/driver.nix +1 −1 Original line number Diff line number Diff line Loading @@ -91,7 +91,7 @@ let PYFLAKES_BUILTINS="$( echo -n ${lib.escapeShellArg (lib.concatStringsSep "," pythonizedNames)}, < ${lib.escapeShellArg "driver-symbols"} cat ${lib.escapeShellArg "driver-symbols"} )" ${hostPkgs.python3Packages.pyflakes}/bin/pyflakes $out/test-script ''} Loading pkgs/applications/networking/gns3/server.nix +7 −4 Original line number Diff line number Diff line Loading @@ -79,11 +79,14 @@ python3Packages.buildPythonApplication { pytestCheckHook ]; pytestFlagsArray = [ # fails on ofborg because of lack of cpu vendor information "--deselect=tests/controller/gns3vm/test_virtualbox_gns3_vm.py::test_cpu_vendor_id" pytestFlags = [ # Rerun failed tests up to three times (flaky tests) "--reruns 3" "--reruns=3" ]; disabledTestPaths = [ # fails on ofborg because of lack of cpu vendor information "tests/controller/gns3vm/test_virtualbox_gns3_vm.py::test_cpu_vendor_id" ]; passthru.tests = { Loading pkgs/applications/version-management/git/default.nix +2 −2 Original line number Diff line number Diff line Loading @@ -60,7 +60,7 @@ assert sendEmailSupport -> perlSupport; assert svnSupport -> perlSupport; let version = "2.50.0"; version = "2.50.1"; svn = subversionClient.override { perlBindings = perlSupport; }; gitwebPerlLibs = with perlPackages; [ CGI Loading Loading @@ -89,7 +89,7 @@ stdenv.mkDerivation (finalAttrs: { }.tar.xz" else "https://www.kernel.org/pub/software/scm/git/git-${version}.tar.xz"; hash = "sha256-3/PAAOQArOOmO4pvizt2uI7P3/1FBKBKukJINyzewEU="; hash = "sha256-fj5sNt7L2PHu3RTULbZnS+A2ccIgSGS++ipBdWxcj8Q="; }; outputs = [ "out" ] ++ lib.optional withManual "doc"; Loading pkgs/build-support/rust/replace-workspace-values.py +8 −2 Original line number Diff line number Diff line Loading @@ -43,8 +43,14 @@ def replace_key( if merged_features: final["features"] = merged_features local_default_features = local_dep.pop("default-features", None) workspace_default_features = workspace_dep.get("default-features") local_default_features = local_dep.pop( "default-features", local_dep.pop("default_features", None) ) workspace_default_features = workspace_dep.get( "default-features", workspace_dep.get("default_features") ) if not workspace_default_features and local_default_features: final["default-features"] = True Loading pkgs/build-support/setup-hooks/patch-shebangs.sh +20 −28 Original line number Diff line number Diff line Loading @@ -68,31 +68,6 @@ patchShebangs() { return 0 fi # like sponge from moreutils but in pure bash _sponge() { local content local target local restoreReadOnly content="" target="$1" # Make file writable if it is read-only if [[ ! -w "$target" ]]; then chmod +w "$target" restoreReadOnly=true fi while IFS= read -r line || [[ -n "$line" ]]; do content+="$line"$'\n' done printf '%s' "$content" > "$target" # Restore read-only if it was read-only before if [[ -n "${restoreReadOnly:-}" ]]; then chmod -w "$target" fi } local f while IFS= read -r -d $'\0' f; do isScript "$f" || continue Loading Loading @@ -151,14 +126,31 @@ patchShebangs() { # Preserve times, see: https://github.com/NixOS/nixpkgs/pull/33281 timestamp=$(stat --printf "%y" "$f") sed -e "1 s|.*|#\!$escapedInterpreterLine|" "$f" | _sponge "$f" # Manually create temporary file instead of using sed -i # (sed -i on $out/x creates tmpfile /nix/store/x which fails on macos + sandbox) tmpFile=$(mktemp -t patchShebangs.XXXXXXXXXX) sed -e "1 s|.*|#\!$escapedInterpreterLine|" "$f" > "$tmpFile" # Make original file writable if it is read-only local restoreReadOnly if [[ ! -w "$f" ]]; then chmod +w "$f" restoreReadOnly=true fi # Replace the original file's content with the patched content # (preserving permissions) cat "$tmpFile" > "$f" rm "$tmpFile" if [[ -n "${restoreReadOnly:-}" ]]; then chmod -w "$f" fi touch --date "$timestamp" "$f" fi fi done < <(find "$@" -type f -perm -0100 -print0) unset -f _sponge } patchShebangsAuto () { Loading Loading
nixos/lib/testing/driver.nix +1 −1 Original line number Diff line number Diff line Loading @@ -91,7 +91,7 @@ let PYFLAKES_BUILTINS="$( echo -n ${lib.escapeShellArg (lib.concatStringsSep "," pythonizedNames)}, < ${lib.escapeShellArg "driver-symbols"} cat ${lib.escapeShellArg "driver-symbols"} )" ${hostPkgs.python3Packages.pyflakes}/bin/pyflakes $out/test-script ''} Loading
pkgs/applications/networking/gns3/server.nix +7 −4 Original line number Diff line number Diff line Loading @@ -79,11 +79,14 @@ python3Packages.buildPythonApplication { pytestCheckHook ]; pytestFlagsArray = [ # fails on ofborg because of lack of cpu vendor information "--deselect=tests/controller/gns3vm/test_virtualbox_gns3_vm.py::test_cpu_vendor_id" pytestFlags = [ # Rerun failed tests up to three times (flaky tests) "--reruns 3" "--reruns=3" ]; disabledTestPaths = [ # fails on ofborg because of lack of cpu vendor information "tests/controller/gns3vm/test_virtualbox_gns3_vm.py::test_cpu_vendor_id" ]; passthru.tests = { Loading
pkgs/applications/version-management/git/default.nix +2 −2 Original line number Diff line number Diff line Loading @@ -60,7 +60,7 @@ assert sendEmailSupport -> perlSupport; assert svnSupport -> perlSupport; let version = "2.50.0"; version = "2.50.1"; svn = subversionClient.override { perlBindings = perlSupport; }; gitwebPerlLibs = with perlPackages; [ CGI Loading Loading @@ -89,7 +89,7 @@ stdenv.mkDerivation (finalAttrs: { }.tar.xz" else "https://www.kernel.org/pub/software/scm/git/git-${version}.tar.xz"; hash = "sha256-3/PAAOQArOOmO4pvizt2uI7P3/1FBKBKukJINyzewEU="; hash = "sha256-fj5sNt7L2PHu3RTULbZnS+A2ccIgSGS++ipBdWxcj8Q="; }; outputs = [ "out" ] ++ lib.optional withManual "doc"; Loading
pkgs/build-support/rust/replace-workspace-values.py +8 −2 Original line number Diff line number Diff line Loading @@ -43,8 +43,14 @@ def replace_key( if merged_features: final["features"] = merged_features local_default_features = local_dep.pop("default-features", None) workspace_default_features = workspace_dep.get("default-features") local_default_features = local_dep.pop( "default-features", local_dep.pop("default_features", None) ) workspace_default_features = workspace_dep.get( "default-features", workspace_dep.get("default_features") ) if not workspace_default_features and local_default_features: final["default-features"] = True Loading
pkgs/build-support/setup-hooks/patch-shebangs.sh +20 −28 Original line number Diff line number Diff line Loading @@ -68,31 +68,6 @@ patchShebangs() { return 0 fi # like sponge from moreutils but in pure bash _sponge() { local content local target local restoreReadOnly content="" target="$1" # Make file writable if it is read-only if [[ ! -w "$target" ]]; then chmod +w "$target" restoreReadOnly=true fi while IFS= read -r line || [[ -n "$line" ]]; do content+="$line"$'\n' done printf '%s' "$content" > "$target" # Restore read-only if it was read-only before if [[ -n "${restoreReadOnly:-}" ]]; then chmod -w "$target" fi } local f while IFS= read -r -d $'\0' f; do isScript "$f" || continue Loading Loading @@ -151,14 +126,31 @@ patchShebangs() { # Preserve times, see: https://github.com/NixOS/nixpkgs/pull/33281 timestamp=$(stat --printf "%y" "$f") sed -e "1 s|.*|#\!$escapedInterpreterLine|" "$f" | _sponge "$f" # Manually create temporary file instead of using sed -i # (sed -i on $out/x creates tmpfile /nix/store/x which fails on macos + sandbox) tmpFile=$(mktemp -t patchShebangs.XXXXXXXXXX) sed -e "1 s|.*|#\!$escapedInterpreterLine|" "$f" > "$tmpFile" # Make original file writable if it is read-only local restoreReadOnly if [[ ! -w "$f" ]]; then chmod +w "$f" restoreReadOnly=true fi # Replace the original file's content with the patched content # (preserving permissions) cat "$tmpFile" > "$f" rm "$tmpFile" if [[ -n "${restoreReadOnly:-}" ]]; then chmod -w "$f" fi touch --date "$timestamp" "$f" fi fi done < <(find "$@" -type f -perm -0100 -print0) unset -f _sponge } patchShebangsAuto () { Loading