2024-09-19 14:19:46 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
|
|
|
nix-update-script,
|
|
|
|
rustPlatform,
|
|
|
|
darwin,
|
|
|
|
which,
|
|
|
|
installShellFiles,
|
2022-06-16 17:23:12 +00:00
|
|
|
}:
|
2022-03-05 16:20:37 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
rustPlatform.buildRustPackage {
|
2022-03-05 16:20:37 +00:00
|
|
|
pname = "dotter";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "0.13.2-unstable-2024-08-02";
|
2022-03-05 16:20:37 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "SuperCuber";
|
|
|
|
repo = "dotter";
|
2024-09-19 14:19:46 +00:00
|
|
|
rev = "d5199df24e6db039c460fa37fe3279f89c3bfc63";
|
|
|
|
hash = "sha256-8/drsrJq8mfrWvTCcNX0eoPHzywxQNuyRdxQE/zb8lA=";
|
2022-03-05 16:20:37 +00:00
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
cargoHash = "sha256-+LBmswq2mvM0hb6wwCQMxL+C/TdpRGZQGufgsqC1KSQ=";
|
2022-03-05 16:20:37 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.CoreServices ];
|
2022-05-18 14:49:53 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
which
|
|
|
|
installShellFiles
|
|
|
|
];
|
2024-06-24 18:47:55 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
2024-06-24 18:47:55 +00:00
|
|
|
installShellCompletion --cmd dotter \
|
|
|
|
--bash <($out/bin/dotter gen-completions --shell bash) \
|
|
|
|
--fish <($out/bin/dotter gen-completions --shell fish) \
|
|
|
|
--zsh <($out/bin/dotter gen-completions --shell zsh)
|
|
|
|
'';
|
2022-03-05 16:20:37 +00:00
|
|
|
|
2022-09-22 12:36:57 +00:00
|
|
|
passthru = {
|
2022-12-28 21:21:41 +00:00
|
|
|
updateScript = nix-update-script { };
|
2022-09-22 12:36:57 +00:00
|
|
|
};
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Dotfile manager and templater written in rust 🦀";
|
2022-03-05 16:20:37 +00:00
|
|
|
homepage = "https://github.com/SuperCuber/dotter";
|
|
|
|
license = licenses.unlicense;
|
|
|
|
maintainers = with maintainers; [ linsui ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "dotter";
|
2022-03-05 16:20:37 +00:00
|
|
|
};
|
|
|
|
}
|