2023-05-24 13:37:59 +00:00
|
|
|
{ darwin
|
|
|
|
, fetchFromGitHub
|
|
|
|
, lib
|
|
|
|
, pkg-config
|
|
|
|
, rustPlatform
|
|
|
|
, stdenv
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
inherit (darwin.apple_sdk.frameworks)
|
|
|
|
CoreServices
|
2024-01-02 11:29:13 +00:00
|
|
|
SystemConfiguration
|
2023-05-24 13:37:59 +00:00
|
|
|
Security;
|
|
|
|
inherit (lib) optionals;
|
2023-08-04 22:07:22 +00:00
|
|
|
inherit (stdenv) isDarwin;
|
2023-05-24 13:37:59 +00:00
|
|
|
in
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cargo-leptos";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "0.2.5";
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "leptos-rs";
|
|
|
|
repo = pname;
|
2024-01-02 11:29:13 +00:00
|
|
|
rev = version;
|
|
|
|
hash = "sha256-veRhTruM+Nw2rerzXC/kpi2Jr8mMMBLqOM2YBCpFePU=";
|
2023-08-04 22:07:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
buildInputs = optionals isDarwin [
|
|
|
|
SystemConfiguration
|
2023-05-24 13:37:59 +00:00
|
|
|
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";
|
|
|
|
homepage = "https://github.com/leptos-rs/cargo-leptos";
|
2023-11-16 04:20:00 +00:00
|
|
|
changelog = "https://github.com/leptos-rs/cargo-leptos/releases/tag/${version}";
|
2023-05-24 13:37:59 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ benwis ];
|
|
|
|
};
|
|
|
|
}
|