3
0
Fork 0
forked from mirrors/nixpkgs
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 12:29:00 +01:00
, curl, sqlite, libnotify
, withSystemd ? stdenv.isLinux, systemd ? null }:
2019-09-20 08:55:57 +01:00
stdenv.mkDerivation rec {
pname = "onedrive";
2020-11-22 06:05:37 +00:00
version = "2.4.7";
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}";
2020-11-22 06:05:37 +00:00
sha256 = "12g2z6c4f65y8cc7vyhk9nlg1mpbsmlsj7ghlny452qhr13m7qpn";
2019-09-20 08:55:57 +01:00
};
nativeBuildInputs = [ autoreconfHook ldc installShellFiles pkg-config ];
2020-01-17 00:22:57 +00:00
2020-06-09 12:29:00 +01:00
buildInputs = [
curl sqlite libnotify
] ++ 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
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";
license = licenses.gpl3;
2020-01-17 00:22:57 +00:00
maintainers = with maintainers; [ srgom ianmjones ];
2019-09-20 08:55:57 +01:00
platforms = platforms.linux;
};
}