2023-05-24 13:37:59 +00:00
|
|
|
{ darwin
|
|
|
|
, fetchFromGitHub
|
|
|
|
, lib
|
|
|
|
, openssl
|
|
|
|
, pkg-config
|
|
|
|
, rustPlatform
|
|
|
|
, stdenv
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
inherit (darwin.apple_sdk.frameworks)
|
|
|
|
CoreServices
|
|
|
|
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";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "0.2.2";
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "leptos-rs";
|
|
|
|
repo = pname;
|
2023-11-16 04:20:00 +00:00
|
|
|
rev = "${version}";
|
|
|
|
hash = "sha256-i2nKtQC63BbZsrYvg+HkdqQfK59f0LzZ9dfmFBaqn14=";
|
2023-08-04 22:07:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = optionals (!isDarwin) [ pkg-config ];
|
|
|
|
|
|
|
|
buildInputs = optionals (!isDarwin) [
|
|
|
|
openssl
|
|
|
|
] ++ optionals isDarwin [
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|