mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-09 14:33:22 +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.
42 lines
977 B
Nix
42 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 ];
|
|
};
|
|
}
|