7e47f3658e
GitOrigin-RevId: 1925c603f17fc89f4c8f6bf6f631a802ad85d784
46 lines
1.2 KiB
Nix
46 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.20";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "leptos-rs";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-45zus+mNOiWWbuF50XpMwc1B6Uoy5E1kUQmtdGVc46g=";
|
|
};
|
|
|
|
cargoHash = "sha256-54CRNSDWdqD582Vv6d8snYEJrpkQ2Cvp8sjgQ6BcvHY=";
|
|
|
|
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 ];
|
|
};
|
|
}
|