depot/third_party/nixpkgs/pkgs/by-name/ca/cargo-leptos/package.nix
Luke Granger-Brown f92e137cfb
Some checks failed
/ combine-systems (push) Blocked by required conditions
/ build (x86_64-linux) (push) Failing after 11m44s
/ build (aarch64-linux) (push) Failing after 11m50s
/ build (push) Failing after 16m42s
Merge commit '1e2ed035f4bebc9adad02b365508ad96f7df87c1' into HEAD
2025-03-02 02:23:32 +00:00

49 lines
1.2 KiB
Nix

{
darwin,
fetchFromGitHub,
lib,
rustPlatform,
stdenv,
}:
let
inherit (darwin.apple_sdk.frameworks)
CoreServices
SystemConfiguration
Security
;
inherit (lib) optionals;
inherit (stdenv.hostPlatform) isDarwin;
in
rustPlatform.buildRustPackage rec {
pname = "cargo-leptos";
version = "0.2.28";
src = fetchFromGitHub {
owner = "leptos-rs";
repo = pname;
rev = "v${version}";
hash = "sha256-SjpfM963Zux+H5QhK8prvDLuI56fP5PqX5gcVbthRx4=";
};
useFetchCargoVendor = true;
cargoHash = "sha256-Da9ei4yAOfhSQmQgrUDZCmMeJXTfGnYhI1+L0JT/ECs=";
buildInputs = optionals isDarwin [
SystemConfiguration
Security
CoreServices
];
# https://github.com/leptos-rs/cargo-leptos#dependencies
buildFeatures = [ "no_downloads" ]; # cargo-leptos will try to install missing dependencies on its own otherwise
doCheck = false; # Check phase tries to query crates.io
meta = with lib; {
description = "Build tool for the Leptos web framework";
mainProgram = "cargo-leptos";
homepage = "https://github.com/leptos-rs/cargo-leptos";
changelog = "https://github.com/leptos-rs/cargo-leptos/releases/tag/v${version}";
license = with licenses; [ mit ];
maintainers = with maintainers; [ benwis ];
};
}