diff options
author | benwis <ben@celcyon.com> | 2023-03-19 14:49:43 -0700 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-05-22 08:43:00 +0000 |
commit | 02df300699f8e4c24b39eeb7e034403880715dc5 (patch) | |
tree | c58e1005cfd83aba80449304563a5cbc3fa900da /pkgs/development/tools/rust/cargo-leptos | |
parent | d42b8bcdf981569e39e95ee2a39598bc59d1a9d3 (diff) |
cargo-leptos: init at 0.1.8
Diffstat (limited to 'pkgs/development/tools/rust/cargo-leptos')
-rw-r--r-- | pkgs/development/tools/rust/cargo-leptos/default.nix | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/pkgs/development/tools/rust/cargo-leptos/default.nix b/pkgs/development/tools/rust/cargo-leptos/default.nix new file mode 100644 index 0000000000000..44bd1a0cccd0c --- /dev/null +++ b/pkgs/development/tools/rust/cargo-leptos/default.nix @@ -0,0 +1,47 @@ +{ darwin +, fetchFromGitHub +, lib +, openssl +, pkg-config +, rustPlatform +, stdenv +}: +let + inherit (darwin.apple_sdk.frameworks) + CoreServices + Security; + inherit (lib) optionals; + inherit (stdenv) isDarwin isLinux; +in +rustPlatform.buildRustPackage rec { + pname = "cargo-leptos"; + version = "0.1.8"; + + src = fetchFromGitHub { + owner = "leptos-rs"; + repo = pname; + rev = version; + hash = "sha256-z4AqxvKu9E8GGMj6jNUAAWeqoE/j+6NoAEZWeNZ+1BA="; + }; + + cargoHash = "sha256-w/9W4DXbh4G5DZ8IGUz4nN3LEjHhL7HgybHqODMFzHw="; + 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"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ benwis ]; + }; +} |