nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 64 lines 1.7 kB view raw
1{ 2 lib, 3 fetchFromGitHub, 4 rustPlatform, 5 stdenv, 6 buildPackages, 7 installShellFiles, 8 nix-update-script, 9}: 10let 11 version = "0.12.0"; 12in 13rustPlatform.buildRustPackage { 14 pname = "vault-tasks"; 15 inherit version; 16 src = fetchFromGitHub { 17 owner = "louis-thevenet"; 18 repo = "vault-tasks"; 19 rev = "v${version}"; 20 hash = "sha256-PMqGqvyxgkGRVahQ+ruDA0vFT0162DrZU92nT4SMTGw="; 21 }; 22 23 cargoHash = "sha256-34c5i2kIoQuTkm1SF7bYX109noVGaGJ47b2FCxQUyB8="; 24 25 nativeBuildInputs = [ 26 installShellFiles 27 ]; 28 29 postInstall = '' 30 install -Dm444 desktop/vault-tasks.desktop -t $out/share/applications 31 '' 32 + ( 33 let 34 vault-tasks = 35 if stdenv.buildPlatform.canExecute stdenv.hostPlatform then 36 placeholder "out" 37 else 38 buildPackages.vault-tasks; 39 in 40 '' 41 # vault-tasks tries to load a config file from ~/.config/ before generating completions 42 export HOME="$(mktemp -d)" 43 44 installShellCompletion --cmd vault-tasks \ 45 --bash <(${vault-tasks}/bin/vault-tasks generate-completions bash) \ 46 --fish <(${vault-tasks}/bin/vault-tasks generate-completions fish) \ 47 --zsh <(${vault-tasks}/bin/vault-tasks generate-completions zsh) 48 '' 49 ); 50 51 passthru.updateScript = nix-update-script { }; 52 53 meta = { 54 description = "TUI Markdown Task Manager"; 55 longDescription = '' 56 vault-tasks is a TUI Markdown task manager. 57 It will parse any Markdown file or vault and display the tasks it contains. 58 ''; 59 homepage = "https://github.com/louis-thevenet/vault-tasks"; 60 license = lib.licenses.mit; 61 mainProgram = "vault-tasks"; 62 maintainers = with lib.maintainers; [ louis-thevenet ]; 63 }; 64}