summaryrefslogtreecommitdiff
path: root/Biz/Test.hs
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2023-07-31 10:15:34 -0400
committerBen Sima <ben@bsima.me>2023-07-31 10:15:34 -0400
commit48b7b222491b2799e265cda9a0b8be0d5d8eb3c0 (patch)
tree9adb350de3a641e05684bbe06d68d2f9526583e4 /Biz/Test.hs
parent1495f18118711f8fdcc38f469f890b677c1873ff (diff)
Prototype nix expression generation
There are some limitations to this implementation: 1. Using `runCommand` means this will re-run any time anything changes in the repo. The solution is to use the existing import detection to make a list of source files, and put that into a `stdenv.mkDerivation`, which I'll do next. 2. The `NeatInterpolation` usage is ugly. The templated nix code should be extracted into its own file, such as `Biz/Bild/Builder.nix`. 3. I'm not actually calling it yet. The ideal thing would be to call `nix-instantiate`, get the output drv path, and then call `nix-store --realise` on that. To do that I need to refactor my `proc` function to return stdout to the calling function, and I should probably just make helper functions like `nixInstatiate :: Target -> IO DrvPath` and `nixStoreRealise :: DrvPath -> NixStorePath`, or something like that.
Diffstat (limited to 'Biz/Test.hs')
-rw-r--r--Biz/Test.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Biz/Test.hs b/Biz/Test.hs
index b6c2816..0a2cf2f 100644
--- a/Biz/Test.hs
+++ b/Biz/Test.hs
@@ -87,13 +87,13 @@ expected @?!= actual = assertNotEqual "" expected actual
infixl 2 @?!=
--- |
+-- | expectedVal @=? actualVal
(@=?) :: (Eq a, Show a) => a -> a -> HUnit.Assertion
a @=? b = a HUnit.@=? b
infixl 2 @=?
--- |
+-- | actualVal @?= expectedVal
(@?=) :: (Eq a, Show a) => a -> a -> HUnit.Assertion
a @?= b = a HUnit.@?= b