Skip to content

etlas doesn't find custom build tool (alex) in windows when building a package #105

Description

@jneira
  • Bug discovered trying to patch a package that uses alex: Patched microaeson-0.1.0.0 eta-hackage#149
  • eta needs a custom version of alex that doesn't add c headers when generate the .hs file from the template .x
  • so there is a patched version in eta-hackage suitable for eta
  • etlas builds the package with eta and generate the wrapper scripts in the store (alex in nix and alex.cmd in windows)
  • then you can run it with etlas run alex -- --version cause it is aware of windows specific script name
  • but when you tries to build the package etlas is not able to find the windows script:
?callStack, called at .\Distribution\Compat\Stack.hs:45:13 in etlas_1lPwCyzvAfM6
mN1zk19Qet:Distribution.Compat.Stack
  callStack, called at .\Distribution\Simple\Utils.hs:592:44 in etlas_1lPwCyzvAf
M6mN1zk19Qet:Distribution.Simple.Utils
  withCallStackPrefix, called at .\Distribution\Simple\Utils.hs:629:7 in etlas_1
lPwCyzvAfM6mN1zk19Qet:Distribution.Simple.Utils
  withMetadata, called at .\Distribution\Simple\Utils.hs:354:15 in etlas_1lPwCyz
vAfM6mN1zk19Qet:Distribution.Simple.Utils
  die', called at .\Distribution\Simple\Program\Db.hs:423:28 in etlas_1lPwCyzvAf
M6mN1zk19Qet:Distribution.Simple.Program.Db
  requireProgram, called at .\Distribution\Simple\Configure.hs:1471:27 in etlas_
1lPwCyzvAfM6mN1zk19Qet:Distribution.Simple.Configure
  configureRequiredProgram, called at .\Distribution\Simple\Configure.hs:1415:10
 in etlas_1lPwCyzvAfM6mN1zk19Qet:Distribution.Simple.Configure
  configureRequiredPrograms, called at .\Distribution\Simple\Configure.hs:594:11
 in etlas_1lPwCyzvAfM6mN1zk19Qet:Distribution.Simple.Configure
  configure, called at .\Distribution\Simple.hs:593:20 in etlas_1lPwCyzvAfM6mN1z
k19Qet:Distribution.Simple
  confHook, called at .\Distribution\Simple\UserHooks.hs:67:5 in etlas_1lPwCyzvA
fM6mN1zk19Qet:Distribution.Simple.UserHooks
  confHook, called at .\Distribution\Simple.hs:224:24 in etlas_1lPwCyzvAfM6mN1zk
19Qet:Distribution.Simple
  configureAction, called at .\Distribution\Simple.hs:184:19 in etlas_1lPwCyzvAf
M6mN1zk19Qet:Distribution.Simple

etlas.exe: The program 'alex' is required but it could not be found.
  • So it seems that the functions used to find executables doesn't take in account the windows specific script name
    • If you place a alex.exe in the store alex path it works
  • the workaround is set the path to alex.cmd script in etlas global config or as cli param --with-alex path

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions