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