chromium,chromedriver: 129.0.6668.91 -> 129.0.6668.100
[NixPkgs.git] / pkgs / by-name / ta / taskwarrior3 / package.nix
blob4be5fdd072c41df007179490576ad1dc7be89da2
2   rustPlatform,
3   rustc,
4   cargo,
5   corrosion,
6   lib,
7   stdenv,
8   fetchFromGitHub,
9   cmake,
10   libuuid,
11   nixosTests,
12   python3,
13   xdg-utils,
14   installShellFiles,
15   darwin,
17 stdenv.mkDerivation rec {
18   pname = "taskwarrior";
19   version = "3.1.0";
20   src = fetchFromGitHub {
21     owner = "GothenburgBitFactory";
22     repo = "taskwarrior";
23     rev = "v${version}";
24     hash = "sha256-iKpOExj1xM9rU/rIcOLLKMrZrAfz7y9X2kt2CjfMOOQ=";
25     fetchSubmodules = true;
26   };
28   postPatch = ''
29     substituteInPlace src/commands/CmdNews.cpp \
30       --replace "xdg-open" "${lib.getBin xdg-utils}/bin/xdg-open"
31   '';
33   nativeBuildInputs =
34     [
35       cmake
36       libuuid
37       python3
38       installShellFiles
39       corrosion
40       cargo
41       rustc
42       rustPlatform.cargoSetupHook
43     ]
44     ++ lib.optionals stdenv.hostPlatform.isDarwin [
45       # darwin dependencies
46       darwin.apple_sdk.frameworks.Security
47       darwin.apple_sdk.frameworks.SystemConfiguration
48     ];
50   doCheck = true;
51   checkTarget = "build_tests";
53   cargoDeps = rustPlatform.fetchCargoTarball {
54     name = "${pname}-${version}-cargo-deps";
55     inherit src;
56     sourceRoot = src.name;
57     hash = "sha256-L+hYYKXSOG4XYdexLMG3wdA7st+A9Wk9muzipSNjxrA=";
58   };
59   cargoRoot = "./";
60   preConfigure = ''
61     export CMAKE_PREFIX_PATH="${corrosion}:$CMAKE_PREFIX_PATH"
62   '';
64   postInstall = ''
65     # ZSH is installed automatically from some reason, only bash and fish need
66     # manual installation
67     installShellCompletion --cmd task \
68       --bash $out/share/doc/task/scripts/bash/task.sh \
69       --fish $out/share/doc/task/scripts/fish/task.fish
70     rm -r $out/share/doc/task/scripts/bash
71     rm -r $out/share/doc/task/scripts/fish
72     # Install vim and neovim plugin
73     mkdir -p $out/share/vim-plugins
74     mv $out/share/doc/task/scripts/vim $out/share/vim-plugins/task
75     mkdir -p $out/share/nvim
76     ln -s $out/share/vim-plugins/task $out/share/nvim/site
77   '';
79   passthru.tests.nixos = nixosTests.taskchampion-sync-server;
81   meta = {
82     changelog = "https://github.com/GothenburgBitFactory/taskwarrior/blob/${src.rev}/ChangeLog";
83     description = "Highly flexible command-line tool to manage TODO lists";
84     homepage = "https://taskwarrior.org";
85     license = lib.licenses.mit;
86     maintainers = with lib.maintainers; [
87       marcweber
88       oxalica
89       mlaradji
90       doronbehar
91     ];
92     mainProgram = "task";
93     platforms = lib.platforms.unix;
94   };