-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose
CABAL_PROJECT_LOCAL_TEMPLATE
as a /nix/store/
file
- Loading branch information
1 parent
f87e924
commit fa7fc57
Showing
5 changed files
with
41 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ pkgs, static ? false }: rec { | ||
CABAL_PROJECT_LOCAL_TEMPLATE = with pkgs; '' | ||
package digest | ||
${if static then "extra-lib-dirs: ${zlib}/lib ${pcre}/lib" else ""} | ||
constraints: | ||
HsOpenSSL +use-pkg-config, | ||
zlib +pkg-config, | ||
pcre-lite +pkg-config | ||
''; | ||
template = pkgs.writeTextFile { | ||
name = "cabal.project.local"; | ||
text = CABAL_PROJECT_LOCAL_TEMPLATE; | ||
}; | ||
shellHook = '' | ||
echo "Quirks:" | ||
echo -e "\tif you have the zlib, HsOpenSSL, or digest package in your dependency tree, please make sure to" | ||
echo -e "\tcat ${template} >> cabal.project.local" | ||
function patchProjectLocal() { | ||
cat ${template} >> "$1" | ||
} | ||
''; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters