nixpkgs/pkgs/by-name/ca/cargo-workspaces/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
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.
2024-11-09 20:04:51 +08:00

54 lines
1.3 KiB
Nix

{ lib
, rustPlatform
, fetchCrate
, pkg-config
, libssh2
, openssl
, zlib
, stdenv
, darwin
}:
rustPlatform.buildRustPackage rec {
pname = "cargo-workspaces";
version = "0.3.6";
src = fetchCrate {
inherit pname version;
hash = "sha256-JqLKFVM/EnVAPF7erINpHdaaDG+g2nbB0iE/hB1gml8=";
};
cargoHash = "sha256-wFf6M99IJAZ7YlPBKUZA2mgAS/LNB128GIjDHxr4pMo=";
nativeBuildInputs = [
pkg-config
];
buildInputs = [
libssh2
openssl
zlib
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
darwin.apple_sdk.frameworks.Security
darwin.apple_sdk.frameworks.SystemConfiguration
];
env = {
LIBSSH2_SYS_USE_PKG_CONFIG = true;
};
meta = with lib; {
description = "Tool for managing cargo workspaces and their crates, inspired by lerna";
longDescription = ''
A tool that optimizes the workflow around cargo workspaces with
git and cargo by providing utilities to version, publish, execute
commands and more.
'';
homepage = "https://github.com/pksunkara/cargo-workspaces";
changelog = "https://github.com/pksunkara/cargo-workspaces/blob/v${version}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ figsoda macalinao matthiasbeyer ];
mainProgram = "cargo-workspaces";
};
}