depot/third_party/nixpkgs/pkgs/tools/nix/alejandra/default.nix

33 lines
801 B
Nix
Raw Normal View History

{ lib
, rustPlatform
, fetchFromGitHub
, testVersion
, alejandra
}:
rustPlatform.buildRustPackage rec {
pname = "alejandra";
version = "1.1.0";
src = fetchFromGitHub {
owner = "kamadorueda";
repo = "alejandra";
rev = version;
sha256 = "sha256-vkFKYnSmhPPXtc3AH7iRtqRRqxhj0o5WySqPT+klDWU=";
};
cargoSha256 = "sha256-MsXaanznE4UtZMj54EDq86aJ2t4xT8O5ziTpa/KCwBw=";
passthru.tests = {
version = testVersion { package = alejandra; };
};
meta = with lib; {
description = "The Uncompromising Nix Code Formatter";
homepage = "https://github.com/kamadorueda/alejandra";
changelog = "https://github.com/kamadorueda/alejandra/blob/${version}/CHANGELOG.md";
license = licenses.unlicense;
maintainers = with maintainers; [ _0x4A6F kamadorueda ];
};
}