Skip to content

Commit

Permalink
cargo-leptos: init at 0.1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
benwis authored and alyssais committed May 22, 2023
1 parent d42b8bc commit 02df300
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
47 changes: 47 additions & 0 deletions pkgs/development/tools/rust/cargo-leptos/default.nix
Original file line number Diff line number Diff line change
@@ -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 ];
};
}
1 change: 1 addition & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16320,6 +16320,7 @@ with pkgs;
cargo-edit = callPackage ../development/tools/rust/cargo-edit {
inherit (darwin.apple_sdk.frameworks) Security;
};
cargo-leptos = callPackage ../development/tools/rust/cargo-leptos { };
cargo-kcov = callPackage ../development/tools/rust/cargo-kcov { };
cargo-graph = callPackage ../development/tools/rust/cargo-graph { };
cargo-guppy = callPackage ../development/tools/rust/cargo-guppy { };
Expand Down

0 comments on commit 02df300

Please sign in to comment.