504525a148
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
48 lines
1.2 KiB
Nix
48 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.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "leptos-rs";
|
|
repo = pname;
|
|
rev = version;
|
|
hash = "sha256-veRhTruM+Nw2rerzXC/kpi2Jr8mMMBLqOM2YBCpFePU=";
|
|
};
|
|
|
|
cargoLock = {
|
|
lockFile = ./Cargo.lock;
|
|
};
|
|
|
|
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";
|
|
homepage = "https://github.com/leptos-rs/cargo-leptos";
|
|
changelog = "https://github.com/leptos-rs/cargo-leptos/releases/tag/${version}";
|
|
license = with licenses; [ mit ];
|
|
maintainers = with maintainers; [ benwis ];
|
|
};
|
|
}
|