From 4f3959790301dea00a3a84086c2875051c63b5e1 Mon Sep 17 00:00:00 2001 From: Simon Chatterjee Date: Tue, 18 Feb 2020 11:08:00 +0000 Subject: [PATCH] spago: fix Darwin build This change gets round a weird permissions error on darwin --- pkgs/development/haskell-modules/configuration-nix.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index c1b1c22d554..813ab160a2c 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -680,6 +680,11 @@ self: super: builtins.intersectAttrs super { # https://github.com/spacchetti/spago/issues/510 cp ${docsSearchAppJsFile} "$sourceRoot/templates/docs-search-app.js" cp ${purescriptDocsSearchFile} "$sourceRoot/templates/purescript-docs-search" + + # For some weird reason, on Darwin, the open(2) call to embed these files + # requires write permissions. The easiest resolution is just to permit that + # (doesn't cause any harm on other systems). + chmod u+w "$sourceRoot/templates/docs-search-app.js" "$sourceRoot/templates/purescript-docs-search" ''; });