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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

56 lines
1.4 KiB
Nix
Raw Normal View History

2021-06-14 04:14:12 +00:00
{ stdenv
, lib
, fetchFromGitHub
, autoreconfHook
, ldc
, installShellFiles
, pkg-config
, curl
, sqlite
, libnotify
, withSystemd ? stdenv.isLinux
, systemd
}:
2019-09-20 07:55:57 +00:00
stdenv.mkDerivation rec {
pname = "onedrive";
2022-05-04 05:11:06 +00:00
version = "2.4.17";
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}";
2022-05-04 05:11:06 +00:00
hash = "sha256-+ADAPxAZNDqLKLz6rAProqSDINDiTZhc2trxJFFMQeA=";
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 = [
2021-06-14 04:14:12 +00:00
curl
sqlite
libnotify
2020-06-09 11:29:00 +00:00
] ++ 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";
2021-06-14 04:14:12 +00:00
license = licenses.gpl3Only;
maintainers = with maintainers; [ srgom peterhoeg ];
2019-09-20 07:55:57 +00:00
platforms = platforms.linux;
};
}