2 years ago
Hello, seems like I can't change the nixpkgs archive version from railway.toml
[build]
builder = "NIXPACKS"
[deploy]
startCommand = "./api"
healthcheckPath = "/health"
healthcheckTimeout = 100
[build.nixpacksPlan.phases.setup]
nixpkgsArchive = 'a459b363de387c078080b719b30c54d8a79b4a3e'
nixPkgs = ["ffmpeg"]Here's the full railway.toml I'm using.
In the build log it sucessfully recognize that ffmpeg need to be installed and it does ! but no matter what it seems to use 5148520bfab61f99fd25fb9ff7bfbb50dad3c9db as nixpkg version
7 [3/5] COPY .nixpacks/nixpkgs-5148520bfab61f99fd25fb9ff7bfbb50dad3c9db.nix .nixpacks/nixpkgs-5148520bfab61f99fd25fb9ff7bfbb50dad3c9db.nix
The reason I want to check to another version is because 5148520bfab61f99fd25fb9ff7bfbb50dad3c9db contains ffmpeg 5.1.3 and I'd like to get ffmpeg 6.1.1
19 Replies
2 years ago
I've noticed this too, you can't set archives for phases in either a railway.json or railway.toml file, you'd have to specify the nixpacks stuff in a nixpacks.toml file
Is there somewhere a documentation where it explain how I can use a nixpacks.toml with railway ?
(and thanks <:PraygeW:1104087111239471235> , glad to see I'm not alone on this)
2 years ago
first remove the phase stuff from your railway.toml
then add this to a nixpacks.toml file that i assume you'd want located in the same location as the railway.toml file -
[phases.setup]
nixpkgsArchive = 'a459b363de387c078080b719b30c54d8a79b4a3e'
nixPkgs = ['...', 'ffmpeg']and finally set a NIXPACKS_CONFIG_FILE service variable to the applicable path of your new nixpacks.toml file
2 years ago
yes, without them you are telling nixpacks to only install ffmpeg
I can confirm this is working well now ! Everything is working, thanks again !
2 years ago
no problem!
How did you find the path to your nixpacks.toml file? I don't yet know how to ssh onto the server to look around how the structure is like? I'm running a rails app, sorry for dumb q. 😛
2 years ago
what path do you have it in your repo?
2 years ago
and do you have to root directory in the service settings set to anything?
The same way you have railway.toml. So either path specified in the dashboard in your deployed service, or by default at the root of the deployment.
Thanks guys! It was at /nixpacks.toml because i just saw on the dash that railway uses / by default.
