depot/pkgs/tools/nix/nix-melt/default.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

41 lines
977 B
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, installShellFiles
}:
rustPlatform.buildRustPackage rec {
pname = "nix-melt";
version = "0.1.3";
src = fetchFromGitHub {
owner = "nix-community";
repo = "nix-melt";
rev = "v${version}";
hash = "sha256-jx7g9GOFAjOlJyNsGOUTLh2qWII9u0prOoBEvNPmdj8=";
};
cargoHash = "sha256-CVMQPnSwGErZnf5/iAcVy37VlJjZdO/BkO3C/rlpl/w=";
nativeBuildInputs = [
installShellFiles
];
env = {
GEN_ARTIFACTS = "artifacts";
};
postInstall = ''
installManPage artifacts/nix-melt.1
installShellCompletion artifacts/nix-melt.{bash,fish} --zsh artifacts/_nix-melt
'';
meta = with lib; {
description = "Ranger-like flake.lock viewer";
mainProgram = "nix-melt";
homepage = "https://github.com/nix-community/nix-melt";
changelog = "https://github.com/nix-community/nix-melt/blob/${src.rev}/CHANGELOG.md";
license = licenses.mpl20;
maintainers = with maintainers; [ figsoda ];
};
}