2021-06-14 05:14:12 +01:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, autoreconfHook
|
|
|
|
, ldc
|
|
|
|
, installShellFiles
|
|
|
|
, pkg-config
|
|
|
|
, curl
|
|
|
|
, sqlite
|
|
|
|
, libnotify
|
|
|
|
, withSystemd ? stdenv.isLinux
|
|
|
|
, systemd
|
|
|
|
}:
|
2019-09-20 08:55:57 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-11-13 20:04:46 +00:00
|
|
|
pname = "onedrive";
|
2022-01-04 12:20:54 +00:00
|
|
|
version = "2.4.15";
|
2019-09-20 08:55:57 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "abraunegg";
|
2020-01-17 00:22:57 +00:00
|
|
|
repo = pname;
|
2019-09-20 08:55:57 +01:00
|
|
|
rev = "v${version}";
|
2022-01-04 12:20:54 +00:00
|
|
|
sha256 = "sha256-nYko7htg16Sp/Fs+KuPflrpHn8WShM0OKozhr9BFH5U=";
|
2019-09-20 08:55:57 +01:00
|
|
|
};
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook ldc installShellFiles pkg-config ];
|
2020-01-17 00:22:57 +00:00
|
|
|
|
2020-06-09 12:29:00 +01:00
|
|
|
buildInputs = [
|
2021-06-14 05:14:12 +01:00
|
|
|
curl
|
|
|
|
sqlite
|
|
|
|
libnotify
|
2020-06-09 12:29:00 +01:00
|
|
|
] ++ lib.optional withSystemd systemd;
|
2020-01-17 00:22:57 +00:00
|
|
|
|
2020-06-09 12:29:00 +01:00
|
|
|
configureFlags = [
|
|
|
|
"--enable-notifications"
|
|
|
|
] ++ lib.optionals withSystemd [
|
|
|
|
"--with-systemdsystemunitdir=${placeholder "out"}/lib/systemd/system"
|
|
|
|
"--with-systemduserunitdir=${placeholder "out"}/lib/systemd/user"
|
|
|
|
];
|
|
|
|
|
|
|
|
# we could also pass --enable-completions to configure but we would then have to
|
|
|
|
# figure out the paths manually and pass those along.
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --bash --name ${pname} contrib/completions/complete.bash
|
|
|
|
installShellCompletion --zsh --name _${pname} contrib/completions/complete.zsh
|
|
|
|
'';
|
2020-01-17 00:22:57 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-09-20 08:55:57 +01:00
|
|
|
description = "A complete tool to interact with OneDrive on Linux";
|
|
|
|
homepage = "https://github.com/abraunegg/onedrive";
|
2021-06-14 05:14:12 +01:00
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ srgom peterhoeg ];
|
2019-09-20 08:55:57 +01:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|