nixpkgs/pkgs/applications/networking/sync/onedrive/default.nix

44 lines
1.4 KiB
Nix
Raw Normal View History

{ stdenv, lib, fetchFromGitHub, autoreconfHook, ldc, installShellFiles, pkg-config
2020-06-09 11:29:00 +00:00
, curl, sqlite, libnotify
, withSystemd ? stdenv.isLinux, systemd ? null }:
2019-09-20 07:55:57 +00:00
stdenv.mkDerivation rec {
pname = "onedrive";
2021-04-10 17:16:20 +00:00
version = "2.4.11";
2019-09-20 07:55:57 +00:00
src = fetchFromGitHub {
owner = "abraunegg";
2020-01-17 00:22:57 +00:00
repo = pname;
2019-09-20 07:55:57 +00:00
rev = "v${version}";
2021-04-10 17:16:20 +00:00
sha256 = "sha256-ioOrkhVeHHqIjoEXcYo8ATJW+2+nZOehf3XbAJUEXpY=";
2019-09-20 07:55:57 +00:00
};
nativeBuildInputs = [ autoreconfHook ldc installShellFiles pkg-config ];
2020-01-17 00:22:57 +00:00
2020-06-09 11:29:00 +00:00
buildInputs = [
curl sqlite libnotify
] ++ lib.optional withSystemd systemd;
2020-01-17 00:22:57 +00:00
2020-06-09 11:29:00 +00: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
meta = with lib; {
2019-09-20 07:55:57 +00:00
description = "A complete tool to interact with OneDrive on Linux";
homepage = "https://github.com/abraunegg/onedrive";
license = licenses.gpl3;
2020-01-17 00:22:57 +00:00
maintainers = with maintainers; [ srgom ianmjones ];
2019-09-20 07:55:57 +00:00
platforms = platforms.linux;
};
}