From e34610e2c24060e5e68f3b567b7777a9214865f3 Mon Sep 17 00:00:00 2001 From: Michael Bianco Date: Tue, 21 Jan 2025 16:14:48 -0700 Subject: [PATCH] docs: add guidance on selecting Nix packages for builds Generated-by: aiautocommit --- docs/pages/docs/guides/configuring-builds.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/pages/docs/guides/configuring-builds.md b/docs/pages/docs/guides/configuring-builds.md index 09d74f75e..d13ee4587 100644 --- a/docs/pages/docs/guides/configuring-builds.md +++ b/docs/pages/docs/guides/configuring-builds.md @@ -40,6 +40,11 @@ provider (e.g. Node, Cargo, Python) will also installed. It is recommended to install packages from Nix rather than Apt if they are available. You can search for Nix packages [here](https://search.nixos.org/packages?channel=unstable). +It's common for these to be many packages with a similar name and it can be hard to determine which one to pick. Here are some tips: + +* If your application is shelling out to a command (i.e. your application expects a specific binary to be available on `$PATH`) look for a package that the binary you need in the `Programs provided` and add it as a `nixPkgs` entry. +* If your application needs a shared library, look for a package that contains a `dev` output. You can target just that `dev` (shared library) output by adding the suffix `.dev` to the `nixLibs` definition. + ## Custom build command You can override the build command with