depot/third_party/nixpkgs/pkgs/development/tools/rust/cargo-leptos/default.nix
Default email 587713944a Project import generated by Copybara.
GitOrigin-RevId: 6143fc5eeb9c4f00163267708e26191d1e918932
2024-04-21 17:54:59 +02:00

47 lines
1.2 KiB
Nix

{ darwin
, fetchFromGitHub
, lib
, pkg-config
, rustPlatform
, stdenv
}:
let
inherit (darwin.apple_sdk.frameworks)
CoreServices
SystemConfiguration
Security;
inherit (lib) optionals;
inherit (stdenv) isDarwin;
in
rustPlatform.buildRustPackage rec {
pname = "cargo-leptos";
version = "0.2.17";
src = fetchFromGitHub {
owner = "leptos-rs";
repo = pname;
rev = "v${version}";
hash = "sha256-W08R1ny4LyzWehnsWSMCRjCxmvV0k7ARVbmZ740hg8w=";
};
cargoHash = "sha256-kuKsBnmH3bPgwuJ1q49iHMNT47Djx9BKxcMBbJ3zqis=";
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 = "A 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 ];
};
}