From aa9a011ee37acaf451b35e816d8847fb24ed415a Mon Sep 17 00:00:00 2001 From: FireFragment <55660550+FireFragment@users.noreply.github.com> Date: Thu, 16 May 2024 19:45:45 +0200 Subject: [PATCH] Document crate-specific overrides --- build.nix | 6 ++++++ crate_specific.nix | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/build.nix b/build.nix index 91a5ccb..570919f 100644 --- a/build.nix +++ b/build.nix @@ -68,6 +68,7 @@ , fetchurl , lndir , userAttrs + #| Some additional buildInputs/overrides individual crates require , crateSpecificOverrides , pkgs }: @@ -378,6 +379,11 @@ let }; }; + # Crate-specific overrides needed for this build. + # They are merged from all the overrides of `cratesIoDependencies` defined in the `crate_specific.nix` file + # + # This can contain fields: `buildInputs`, `nativeBuildInputs` + # When changing them (eg. adding support for new ones/removing some), also update the comment in the `crate_specific.nix` file neededCrateSpecificOverrides = let overridesList = builtins.map diff --git a/crate_specific.nix b/crate_specific.nix index eb7fa98..5554625 100644 --- a/crate_specific.nix +++ b/crate_specific.nix @@ -1,3 +1,11 @@ +# This file contains crate-specific build inputs. +# +# Each of them is an attribute with name of the crate and value being a function. +# This function gets as arguments: +# - `crateInfo` with information about the crate, such as sha256 or version +# +# Currently supported fields to return are: `buildInputs`, `nativeBuildInputs` + { pkgs }: {