@@ -45,6 +45,7 @@ import Obelisk.CliApp
4545data Target = Target
4646 { _target_path :: Maybe FilePath
4747 , _target_attr :: Maybe String
48+ , _target_expr :: Maybe String
4849 }
4950makeClassy ''Target
5051
@@ -52,6 +53,7 @@ instance Default Target where
5253 def = Target
5354 { _target_path = Just "."
5455 , _target_attr = Nothing
56+ , _target_expr = Nothing
5557 }
5658
5759data Arg
@@ -84,13 +86,17 @@ instance Default NixCommonConfig where
8486 def = NixCommonConfig def mempty mempty
8587
8688runNixCommonConfig :: NixCommonConfig -> [FilePath]
87−runNixCommonConfig cfg = mconcat [maybeToList path, attrArg, args, buildersArg]
89+runNixCommonConfig cfg = mconcat [maybeToList path, attrArg, exprArg, args, buildersArg]
8890 where
8991 path = _target_path $ _nixCmdConfig_target cfg
9092 attr = _target_attr $ _nixCmdConfig_target cfg
93+ expr = _target_expr $ _nixCmdConfig_target cfg
9194 attrArg = case attr of
9295 Nothing -> []
9396 Just a -> ["-A", a]
97+ exprArg = case expr of
98+ Nothing -> []
99+ Just a -> ["-E", a]
94100 args = cliFromArgs $ _nixCmdConfig_args cfg
95101 buildersArg = case _nixCmdConfig_builders cfg of
96102 [] -> []