···11+# CC Wrapper hygiene
22+#
33+# For at least cross compilation, we need to depend on multiple cc-wrappers at
44+# once---specifically up to one per sort of dependency. This follows from having
55+# different tools targeting different platforms, and different flags for those
66+# tools. For example:
77+#
88+# # Flags for compiling (whether or not linking) C code for the...
99+# NIX_CFLAGS_COMPILE_FOR_BUILD # ...build platform
1010+# NIX_CFLAGS_COMPILE # ...host platform
1111+# NIX_CFLAGS_COMPILE_FOR_TARGET # ...target platform
1212+#
1313+# Notice that these platforms are the 3 *relative* to the package using
1414+# cc-wrapper, not absolute like `x86_64-pc-linux-gnu`.
1515+#
1616+# The simplest solution would be to have separate cc-wrappers per (3 intended
1717+# use-cases * n absolute concrete platforms). For the use-case axis, we would
1818+# @-splice in 'BUILD_' '' 'TARGET_' to use the write environment variables when
1919+# building the cc-wrapper, and likewise prefix the binaries' names so they didn't
2020+# clobber each other on the PATH. But the need for 3x cc-wrappers, along with
2121+# non-standard name prefixes, is annoying and liable to break packages' build
2222+# systems.
2323+#
2424+# Instead, we opt to have just one cc-wrapper per absolute platform. Matching
2525+# convention, the binaries' names can just be prefixed with their target
2626+# platform. On the other hand, that means packages will depend on not just
2727+# multiple cc-wrappers, but the exact same cc-wrapper derivation multiple ways.
2828+# That means the exact same cc-wrapper derivation must be able to avoid
2929+# conflicting with itself, despite the fact that `setup-hook.sh`, the `addCvars`
3030+# function, and `add-flags.sh` are all communicating with each other with
3131+# environment variables. Yuck.
3232+#
3333+# The basic strategy is:
3434+#
3535+# - Everyone exclusively *adds information* to relative-platform-specific
3636+# environment variables, like `NIX_CFLAGS_COMPILE_FOR_TARGET`, to communicate
3737+# with the wrapped binaries.
3838+#
3939+# - The wrapped binaries will exclusively *read* cc-wrapper-derivation-specific
4040+# environment variables distinguished with with `suffixSalt`, like
4141+# `NIX_CFLAGS_COMPILE_@suffixSalt@`.
4242+#
4343+# - `add-flags`, beyond its old task of reading extra flags stuck inside the
4444+# cc-wrapper derivation, will convert the relative-platform-specific
4545+# variables to cc-wrapper-derivation-specific variables. This conversion is
4646+# the only time all but one of the cc-wrapper-derivation-specific variables
4747+# are set.
4848+#
4949+# This ensures the flow of information is exclusive from
5050+# relative-platform-specific variables to cc-wrapper-derivation-specific
5151+# variables. This allows us to support the general case of a many--many relation
5252+# between relative platforms and cc-wrapper derivations.
5353+#
5454+# For more details, read the individual files where the mechanisms used to
5555+# accomplish this will be individually documented.
5656+5757+# Skip setup hook if we're neither a build-time dep, nor, temporarily, doing a
5858+# native compile.
5959+#
6060+# TODO(@Ericson2314): No native exception
6161+[[ -z ${strictDeps-} ]] || (( "$hostOffset" < 0 )) || return 0
6262+6363+# It's fine that any other cc-wrapper will redefine this. Bash functions close
6464+# over no state, and there's no @-substitutions within, so any redefined
6565+# function is guaranteed to be exactly the same.
6666+ccWrapper_addCVars () {
6767+ # See ../setup-hooks/role.bash
6868+ local role_post
6969+ getHostRoleEnvHook
7070+7171+ if [ -d "$1/include" ]; then
7272+ export NIX_CFLAGS_COMPILE${role_post}+=" -isystem $1/include"
7373+ fi
7474+7575+ if [ -d "$1/Library/Frameworks" ]; then
7676+ export NIX_CFLAGS_COMPILE${role_post}+=" -iframework $1/Library/Frameworks"
7777+ fi
7878+}
7979+8080+# See ../setup-hooks/role.bash
8181+getTargetRole
8282+getTargetRoleWrapper
8383+8484+# We use the `targetOffset` to choose the right env hook to accumulate the right
8585+# sort of deps (those with that offset).
8686+addEnvHooks "$targetOffset" ccWrapper_addCVars
8787+8888+# Note 1: these come *after* $out in the PATH (see setup.sh).
8989+# Note 2: phase separation makes this look useless to shellcheck.
9090+9191+# shellcheck disable=SC2157
9292+if [ -n "@cc@" ]; then
9393+ addToSearchPath _PATH @cc@/bin
9494+fi
9595+9696+# shellcheck disable=SC2157
9797+if [ -n "@libc_bin@" ]; then
9898+ addToSearchPath _PATH @libc_bin@/bin
9999+fi
100100+101101+# shellcheck disable=SC2157
102102+if [ -n "@coreutils_bin@" ]; then
103103+ addToSearchPath _PATH @coreutils_bin@/bin
104104+fi
105105+106106+# Export tool environment variables so various build systems use the right ones.
107107+108108+export NIX_CC${role_post}=@out@
109109+110110+export CC${role_post}=@named_cc@
111111+export CXX${role_post}=@named_cxx@
112112+export CC${role_post}=@named_cc@
113113+export CXX${role_post}=@named_cxx@
114114+115115+# If unset, assume the default hardening flags.
116116+: ${NIX_HARDENING_ENABLE="fortify stackprotector pic strictoverflow format relro bindnow"}
117117+export NIX_HARDENING_ENABLE
118118+119119+# No local scope in sourced file
120120+unset -v role_post
···11+Strip path to the binary from prints.
22+33+I see no sense in including the full path in outputs like bpftool --version
44+Especially as argv[0] may not include it, based on calling via $PATH or not.
55+--- a/tools/bpf/bpftool/main.c
66++++ b/tools/bpf/bpftool/main.c
77+@@ -443 +443,7 @@
88+- bin_name = argv[0];
99++ /* Strip the path if any. */
1010++ const char *bin_name_slash = strrchr(argv[0], '/');
1111++ if (bin_name_slash) {
1212++ bin_name = bin_name_slash + 1;
1313++ } else {
1414++ bin_name = argv[0];
1515++ }
···11-diff --git a/caddy.go b/caddy.go
22-index 584865bd..082b9b6c 100644
33---- a/caddy.go
44-+++ b/caddy.go
55-@@ -840,7 +840,10 @@ func InstanceID() (uuid.UUID, error) {
66- // and https://github.com/golang/go/issues/50603.
77- //
88- // This function is experimental and subject to change or removal.
99-+var ShortVersion = "(devel)"
1010-+
1111- func Version() (simple, full string) {
1212-+ return ShortVersion, ShortVersion
1313- // the currently-recommended way to build Caddy involves
1414- // building it as a dependency so we can extract version
1515- // information from go.mod tooling; once the upstream
+2-2
pkgs/servers/computing/slurm/default.nix
···14141515stdenv.mkDerivation rec {
1616 pname = "slurm";
1717- version = "22.05.4.1";
1717+ version = "22.05.5.1";
18181919 # N.B. We use github release tags instead of https://www.schedmd.com/downloads.php
2020 # because the latter does not keep older releases.
···2323 repo = "slurm";
2424 # The release tags use - instead of .
2525 rev = "${pname}-${builtins.replaceStrings ["."] ["-"] version}";
2626- sha256 = "100ixhpi4ahx5w7b1ncgmmg1ar48brp095lrxhcxr55fq2wqlv35";
2626+ sha256 = "1mw0dkll1iwwdpdbxcy26zpnjgj07prlgdz2da64krn4yyfhca30";
2727 };
28282929 outputs = [ "out" "dev" ];
···22, lib
33, buildGoModule
44, fetchFromGitHub
55-, fetchurl
65, Cocoa
76, installShellFiles
87}:
98109buildGoModule rec {
1110 pname = "noti";
1212- version = "3.5.0";
1111+ version = "3.6.0";
13121413 src = fetchFromGitHub {
1514 owner = "variadico";
1615 repo = "noti";
1716 rev = version;
1818- sha256 = "12r9wawwl6x0rfv1kahwkamfa0pjq24z60az9pn9nsi2z1rrlwkd";
1717+ sha256 = "sha256-FhVpw6PJcm0aYQBlN7AUjOkJgCzleOHXIXumSegtxfA=";
1918 };
20192121- patches = [
2222- # update golang.org/x/sys to fix building on aarch64-darwin
2323- # using fetchurl because fetchpatch breaks the patch
2424- (fetchurl {
2525- url = "https://github.com/variadico/noti/commit/a90bccfdb2e6a0adc2e92f9a4e7be64133832ba9.patch";
2626- sha256 = "sha256-vSAwuAR9absMSFqGOlzmRZoOGC/jpkmh8CMCVjeleUo=";
2727- })
2828- ];
2929-3020 vendorSha256 = null;
31213222 nativeBuildInputs = [ installShellFiles ];
···3828 "-w"
3929 "-X github.com/variadico/noti/internal/command.Version=${version}"
4030 ];
3131+3232+ preCheck = ''
3333+ export PATH=$out/bin:$PATH
3434+ '';
41354236 postInstall = ''
4343- installManPage docs/man/*
3737+ installManPage docs/man/dist/*
4438 '';
45394640 meta = with lib; {
···4842 longDescription = ''
4943 Monitor a process and trigger a notification.
50445151- Never sit and wait for some long-running process to finish. Noti can alert you when it's done. You can receive messages on your computer or phone.
4545+ Never sit and wait for some long-running process to finish. Noti can alert
4646+ you when it's done. You can receive messages on your computer or phone.
5247 '';
5348 homepage = "https://github.com/variadico/noti";
5449 license = licenses.mit;