mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-06 04:53:27 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
47 lines
1.2 KiB
Nix
47 lines
1.2 KiB
Nix
{ darwin
|
|
, fetchFromGitHub
|
|
, lib
|
|
, rustPlatform
|
|
, stdenv
|
|
}:
|
|
let
|
|
inherit (darwin.apple_sdk.frameworks)
|
|
CoreServices
|
|
SystemConfiguration
|
|
Security;
|
|
inherit (lib) optionals;
|
|
inherit (stdenv.hostPlatform) isDarwin;
|
|
in
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "cargo-leptos";
|
|
version = "0.2.21";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "leptos-rs";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-Oe65m9io7ihymUjylaWHQM/x7r0y/xXqD313H3oyjN8=";
|
|
};
|
|
|
|
cargoHash = "sha256-wZNtEr6IAy+OABpTm93rOhKAP1NEEYUvokjaVdoaSG4=";
|
|
|
|
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 = "Build tool for the Leptos web framework";
|
|
mainProgram = "cargo-leptos";
|
|
homepage = "https://github.com/leptos-rs/cargo-leptos";
|
|
changelog = "https://github.com/leptos-rs/cargo-leptos/releases/tag/v${version}";
|
|
license = with licenses; [ mit ];
|
|
maintainers = with maintainers; [ benwis ];
|
|
};
|
|
}
|