xcaddy: use temp dir on Darwin
Upstream xcaddy uses the $HOME directory as the temp directory on Darwin in order to fix an interesting bug. In order to find version information for Caddy, it runs a command that needs to operate on file system without "noexec" set, but Darwin's temp directory has it set. We can tolerate losing version information, since the alternative is that xcaddy does not run on Darwin.
This commit is contained in:
parent
157918af5d
commit
7a23457bac
@ -13,6 +13,10 @@ buildGoModule rec {
|
||||
hash = "sha256-oGTtS5UlEebIqv4SM4q0YclASJNu8DNOLrGLRRAtkd8=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./use_tmpdir_on_darwin.diff
|
||||
];
|
||||
|
||||
vendorHash = "sha256-RpbnoXyTrqGOI7DpgkO+J47P17T4QCVvM1CfS6kRO9Y=";
|
||||
|
||||
meta = with lib; {
|
||||
|
13
pkgs/servers/caddy/xcaddy/use_tmpdir_on_darwin.diff
Normal file
13
pkgs/servers/caddy/xcaddy/use_tmpdir_on_darwin.diff
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/builder.go b/builder.go
|
||||
index ed6c5ef..36e8055 100644
|
||||
--- a/builder.go
|
||||
+++ b/builder.go
|
||||
@@ -200,7 +200,7 @@ func NewReplace(old, new string) Replace {
|
||||
// It is the caller's responsibility to remove the folder when finished.
|
||||
func newTempFolder() (string, error) {
|
||||
var parentDir string
|
||||
- if runtime.GOOS == "darwin" {
|
||||
+ if false && runtime.GOOS == "darwin" {
|
||||
// After upgrading to macOS High Sierra, Caddy builds mysteriously
|
||||
// started missing the embedded version information that -ldflags
|
||||
// was supposed to produce. But it only happened on macOS after
|
Loading…
Reference in New Issue
Block a user