7 months ago
Could you help me install libmagic in my Railway project?
Below is my current nixpacks.toml configuration:
tomlCopyEdit
[phases.setup] nixPkgs = ["nodejs", "file", "zlib"] [phases.install] dependsOn = ["setup"]
Pinned Solution
7 months ago
Hey! I can help with that. You need to add libmagic to your nixpacks config.
Just update your nixpacks.toml file like this:
toml[phases.setup]
nixPkgs = ["nodejs", "file", "zlib", "libmagic"]
[phases.install]
dependsOn = ["setup"]Basically just add "libmagic" to your existing nixPkgs array in the setup phase. That should give your python magic module access to the libmagic library it needs.
After you update the file, redeploy on Railway and it should work.
2 Replies
7 months ago
Hey! I can help with that. You need to add libmagic to your nixpacks config.
Just update your nixpacks.toml file like this:
toml[phases.setup]
nixPkgs = ["nodejs", "file", "zlib", "libmagic"]
[phases.install]
dependsOn = ["setup"]Basically just add "libmagic" to your existing nixPkgs array in the setup phase. That should give your python magic module access to the libmagic library it needs.
After you update the file, redeploy on Railway and it should work.
7 months ago
What @own171 answered is correct
They have good documentation on Nixpacks python here: https://nixpacks.com/docs/providers/python
Status changed to Solved jake • 7 months ago
