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, pkgconfig
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-06-09 12:29:00 +01:00
version = "2.4.2";
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-06-09 12:29:00 +01:00
sha256 = "10s33p1xzq9c5n1bxv9n7n31afxgx9i6c17w0xgxdrma75micm3a";
2019-09-20 08:55:57 +01:00
};
nativeBuildInputs = [ autoreconfHook ldc installShellFiles pkgconfig ];
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
2019-09-20 08:55:57 +01:00
meta = with stdenv.lib; {
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;
};
}