From 6d1b22add055edf5b4314aff6bf192398962317e Mon Sep 17 00:00:00 2001 From: Sam Connelly Date: Tue, 1 Oct 2024 15:31:34 -0400 Subject: [PATCH] cargo-web: Fix build failure --- .../tools/rust/cargo-web/default.nix | 37 ++++++++++++++++--- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/pkgs/development/tools/rust/cargo-web/default.nix b/pkgs/development/tools/rust/cargo-web/default.nix index 7bbc503fd1285..b5da3fdb7f0dc 100644 --- a/pkgs/development/tools/rust/cargo-web/default.nix +++ b/pkgs/development/tools/rust/cargo-web/default.nix @@ -1,5 +1,14 @@ -{ lib, stdenv, fetchFromGitHub, openssl, perl, pkg-config, rustPlatform -, CoreServices, Security +{ + lib, + stdenv, + fetchFromGitHub, + openssl, + perl, + pkg-config, + rustPlatform, + CoreServices, + Security, + fetchpatch, }: rustPlatform.buildRustPackage rec { @@ -13,16 +22,34 @@ rustPlatform.buildRustPackage rec { sha256 = "1dl5brj5fnmxmwl130v36lvy4j64igdpdvjwmxw3jgg2c6r6b7cd"; }; + patches = [ + (fetchpatch { + name = "fix-qualified-path.patch"; + url = "https://github.com/koute/cargo-web/commit/c9584542163d60d0aae6d6890509794e838e257f.patch"; + hash = "sha256-w59fXmrszptKt0llqGt0AF+0b3r9N6xUY6zQkpZnemE="; + }) + ]; + cargoHash = "sha256-apPXSG8RV9hZ+jttn4XHhgmuLQ7344SQJna7Z/fu/mA="; - nativeBuildInputs = [ openssl perl pkg-config ]; - buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices Security ]; + nativeBuildInputs = [ + openssl + perl + pkg-config + ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ + CoreServices + Security + ]; meta = with lib; { description = "Cargo subcommand for the client-side Web"; mainProgram = "cargo-web"; homepage = "https://github.com/koute/cargo-web"; - license = with licenses; [ asl20 /* or */ mit ]; + license = with licenses; [ + asl20 # or + mit + ]; maintainers = with maintainers; [ kevincox ]; }; }