From 9f3798cd7bb211d39fb5d57f6b1e16b6cef8a989 Mon Sep 17 00:00:00 2001 From: Payas Relekar Date: Sun, 17 Mar 2024 21:05:28 +0530 Subject: [PATCH] ocis-bin: init at 5.0.0 --- pkgs/by-name/oc/ocis-bin/package.nix | 54 ++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 pkgs/by-name/oc/ocis-bin/package.nix diff --git a/pkgs/by-name/oc/ocis-bin/package.nix b/pkgs/by-name/oc/ocis-bin/package.nix new file mode 100644 index 000000000000..cdd12fb46e9c --- /dev/null +++ b/pkgs/by-name/oc/ocis-bin/package.nix @@ -0,0 +1,54 @@ +{ + fetchurl, + lib, + stdenv, + autoPatchelfHook, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "ocis-bin"; + version = "5.0.0"; + system = + if stdenv.isLinux && stdenv.isx86_64 then + "linux-amd64" + else if stdenv.isLinux && stdenv.isAarch64 then + "linux-arm64" + else + ""; + + src = fetchurl { + url = "https://github.com/owncloud/ocis/releases/download/v${finalAttrs.version}/ocis-${finalAttrs.version}-${finalAttrs.system}"; + + hash = + if stdenv.isLinux && stdenv.isAarch64 then + "sha256-xRgDNwmRovXbyGQ5sTUw5srsXMBDYyBFMpB9MoXoo+w=" + else if stdenv.isLinux && stdenv.isx86_64 then + "sha256-0lgDIHldW67OwinfYPATXkWUZVnR3PoXC4XLM1KkKmY=" + else + builtins.throw "Unsupported platform, please contact Nixpkgs maintainers for ocis package"; + }; + dontUnpack = true; + + nativeBuildInputs = [ autoPatchelfHook ]; + + installPhase = '' + runHook preInstall + install -D $src $out/bin/ocis + runHook postInstall + ''; + + meta = with lib; { + description = "ownCloud Infinite Scale Stack "; + homepage = "https://owncloud.dev/ocis/"; + changelog = "https://github.com/owncloud/ocis/releases/tag/v${version}"; + # oCIS is licensed under non-free EULA which can be found here : + # https://github.com/owncloud/ocis/releases/download/v5.0.0/End-User-License-Agreement-for-ownCloud-Infinite-Scale.pdf + license = licenses.unfree; + maintainers = with maintainers; [ + ramblurr + payas + danth + ]; + sourceProvenance = [ sourceTypes.binaryNativeCode ]; + }; +})