diff --git a/pkgs/applications/networking/sync/onedrive/default.nix b/pkgs/applications/networking/sync/onedrive/default.nix deleted file mode 100644 index d7dd30b106c8..000000000000 --- a/pkgs/applications/networking/sync/onedrive/default.nix +++ /dev/null @@ -1,57 +0,0 @@ -{ stdenv -, lib -, fetchFromGitHub -, autoreconfHook -, ldc -, installShellFiles -, pkg-config -, curl -, sqlite -, libnotify -, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd -, systemd -}: - -stdenv.mkDerivation rec { - pname = "onedrive"; - version = "2.4.25"; - - src = fetchFromGitHub { - owner = "abraunegg"; - repo = pname; - rev = "v${version}"; - hash = "sha256-M6EOJiykmAKWIuAXdm9ebTSX1eVoO+1axgzxlAmuI8U="; - }; - - nativeBuildInputs = [ autoreconfHook ldc installShellFiles pkg-config ]; - - buildInputs = [ - curl - sqlite - libnotify - ] ++ lib.optional withSystemd systemd; - - 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 - installShellCompletion --fish --name ${pname} contrib/completions/complete.fish - ''; - - meta = with lib; { - description = "Complete tool to interact with OneDrive on Linux"; - mainProgram = "onedrive"; - homepage = "https://github.com/abraunegg/onedrive"; - license = licenses.gpl3Only; - maintainers = with maintainers; [ srgom peterhoeg bertof ]; - platforms = platforms.linux; - }; -} diff --git a/pkgs/by-name/on/onedrive/package.nix b/pkgs/by-name/on/onedrive/package.nix new file mode 100644 index 000000000000..db108ec5057c --- /dev/null +++ b/pkgs/by-name/on/onedrive/package.nix @@ -0,0 +1,81 @@ +{ + lib, + autoreconfHook, + curl, + fetchFromGitHub, + installShellFiles, + ldc, + libnotify, + pkg-config, + sqlite, + stdenv, + systemd, + testers, + # Boolean flags + withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "onedrive"; + version = "2.5.0-rc3"; + + src = fetchFromGitHub { + owner = "abraunegg"; + repo = "onedrive"; + rev = "v${finalAttrs.version}"; + hash = "sha256-UOtCRCHTBpPScFB/OcGalGFjVUslULBO3KIED+0Hs+M="; + }; + + outputs = [ + "out" + "doc" + "man" + ]; + + nativeBuildInputs = [ + autoreconfHook + installShellFiles + ldc + pkg-config + ]; + + buildInputs = [ + curl + libnotify + sqlite + ] ++ lib.optionals withSystemd [ systemd ]; + + configureFlags = [ + (lib.enableFeature true "notifications") + (lib.withFeatureAs withSystemd "systemdsystemunitdir" "${placeholder "out"}/lib/systemd/system") + (lib.withFeatureAs withSystemd "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 onedrive contrib/completions/complete.bash + installShellCompletion --fish --name onedrive contrib/completions/complete.fish + installShellCompletion --zsh --name _onedrive contrib/completions/complete.zsh + ''; + + passthru = { + tests.version = testers.testVersion { + package = finalAttrs.finalPackage; + version = "v${finalAttrs.version}"; + }; + }; + + meta = { + homepage = "https://github.com/abraunegg/onedrive"; + description = "Complete tool to interact with OneDrive on Linux"; + license = lib.licenses.gpl3Only; + mainProgram = "onedrive"; + maintainers = with lib.maintainers; [ + AndersonTorres + peterhoeg + bertof + ]; + platforms = lib.platforms.linux; + }; +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3c972e7862a8..9e0b945222e9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22881,8 +22881,6 @@ with pkgs; oneDNN_2 = callPackage ../development/libraries/oneDNN/2.nix { }; - onedrive = callPackage ../applications/networking/sync/onedrive { }; - oneko = callPackage ../applications/misc/oneko { }; oniguruma = callPackage ../development/libraries/oniguruma { };