-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make DLLs in deps available to wine TH runner
This is a better fix to the problem of making DLLs available to the process running in wine that is used to evaluate TH code when cross compiling for Windows.
- Loading branch information
1 parent
f3f2c08
commit 00b2b69
Showing
7 changed files
with
105 additions
and
15 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
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,30 @@ | ||
# Test a package set | ||
{ stdenv, lib, util, mkCabalProjectPkgSet, project', haskellLib, recurseIntoAttrs, testSrc, compiler-nix-name }: | ||
|
||
with lib; | ||
|
||
let | ||
modules = [ | ||
{ | ||
# Package has no exposed modules which causes | ||
# haddock: No input file(s) | ||
packages.cabal-simple.doHaddock = false; | ||
} | ||
]; | ||
|
||
project = project' { | ||
inherit compiler-nix-name; | ||
src = testSrc "th-dlls"; | ||
inherit modules; | ||
}; | ||
|
||
packages = project.hsPkgs; | ||
|
||
in recurseIntoAttrs { | ||
ifdInputs = { | ||
inherit (project) plan-nix; | ||
}; | ||
|
||
build = packages.th-dlls.components.library; | ||
build-profiled = packages.th-dlls.components.library.profiled; | ||
} |
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,11 @@ | ||
{-# LANGUAGE TemplateHaskell #-} | ||
module Lib where | ||
|
||
import Control.Monad.IO.Class (liftIO) | ||
import OpenSSL (withOpenSSL) | ||
import OpenSSL.BN (withBN) | ||
import Libsodium (sodium_init) | ||
import Language.Haskell.TH.Syntax (Exp(..), Lit(..)) | ||
|
||
x = $(liftIO (withOpenSSL (withBN 0 (\_ -> return (LitE (IntegerL 0)))))) | ||
y = $(liftIO (sodium_init >> return (LitE (IntegerL 0)))) |
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,16 @@ | ||
cabal-version: >=1.10 | ||
name: th-dlls | ||
version: 0.1.0.0 | ||
license: PublicDomain | ||
author: Hamish Mackenzie | ||
maintainer: Hamish.K.Mackenzie@gmail.com | ||
build-type: Simple | ||
|
||
library | ||
build-depends: base | ||
, HsOpenSSL | ||
, libsodium | ||
, template-haskell | ||
exposed-modules: Lib | ||
hs-source-dirs: src | ||
default-language: Haskell2010 |