From 5c182f857e5f877234f632414dd643f0846676a7 Mon Sep 17 00:00:00 2001 From: Vladimir Timofeenko Date: Sun, 24 Nov 2024 19:17:10 -0800 Subject: [PATCH] nickel: 1.8.1 -> 1.9.0 --- pkgs/by-name/ni/nickel/package.nix | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ni/nickel/package.nix b/pkgs/by-name/ni/nickel/package.nix index 70a2167bc56e..8c488d1ec9fe 100644 --- a/pkgs/by-name/ni/nickel/package.nix +++ b/pkgs/by-name/ni/nickel/package.nix @@ -7,16 +7,16 @@ rustPlatform.buildRustPackage rec { pname = "nickel"; - version = "1.8.1"; + version = "1.9.0"; src = fetchFromGitHub { owner = "tweag"; repo = "nickel"; rev = "refs/tags/${version}"; - hash = "sha256-hlcF04m3SI66d1C9U1onog2QoEMfqtHb7V++47ZmeW4="; + hash = "sha256-chIpZqs1tyXk4YQBlF4K/Ofrn1CrijbYant9+SSppGU="; }; - cargoHash = "sha256-VFjZb7lsqOSt5Rc94dhS4Br/5i/HXPHZMqC1c0/LzHU="; + cargoHash = "sha256-MaMzwvvWP+vmdBVCefXI6dehuTyPcPW2b6KdarxjBjA="; cargoBuildFlags = [ "-p nickel-lang-cli" "-p nickel-lang-lsp" ]; @@ -26,6 +26,16 @@ rustPlatform.buildRustPackage rec { outputs = [ "out" "nls" ]; + # This fixes the way comrak is defined as a dependency, without the sed 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 + # dependency with that name, but that dependency uses the "dep:" syntax in + # the features table, so it does not have an implicit feature with that name. + preBuild = '' + sed -i 's/dep:comrak/comrak/' core/Cargo.toml + ''; + postInstall = '' mkdir -p $nls/bin mv $out/bin/nls $nls/bin/nls