From 9918c46bd2c5ba1548b8de4a2acff36d9e127746 Mon Sep 17 00:00:00 2001 From: Kiara Grouwstra Date: Tue, 24 Dec 2024 14:09:36 +0100 Subject: [PATCH] nickel: enable `nix-experimental` feature flag --- pkgs/by-name/ni/nickel/package.nix | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ni/nickel/package.nix b/pkgs/by-name/ni/nickel/package.nix index 4ea0423a3df8..53ea84f976d5 100644 --- a/pkgs/by-name/ni/nickel/package.nix +++ b/pkgs/by-name/ni/nickel/package.nix @@ -1,10 +1,14 @@ { lib, + boost, rustPlatform, fetchFromGitHub, python3, versionCheckHook, + pkg-config, + nix, nix-update-script, + enableNixImport ? true, }: rustPlatform.buildRustPackage (finalAttrs: { @@ -26,16 +30,27 @@ rustPlatform.buildRustPackage (finalAttrs: { "-p nickel-lang-lsp" ]; - nativeBuildInputs = [ - python3 + nativeBuildInputs = + [ + python3 + ] + ++ lib.optionals enableNixImport [ + pkg-config + ]; + + buildInputs = lib.optionals enableNixImport [ + nix + boost ]; + buildFeatures = lib.optionals enableNixImport [ "nix-experimental" ]; + outputs = [ "out" "nls" ]; - # This fixes the way comrak is defined as a dependency, without the sed the build fails: + # This fixes the way comrak is defined as a dependency, without it the build fails: # # cargo metadata failure: error: Package `nickel-lang-core v0.10.0 # (/build/source/core)` does not have feature `comrak`. It has an optional