about summary refs log tree commit diff
path: root/pkgs/by-name/oc
diff options
context:
space:
mode:
authorPayas Relekar <payas@relekar.org>2024-03-17 21:05:28 +0530
committerPayas Relekar <payas@relekar.org>2024-04-03 00:53:11 +0530
commit9f3798cd7bb211d39fb5d57f6b1e16b6cef8a989 (patch)
treea561161b67f12dafef5b695a6e8bf494e641a9cc /pkgs/by-name/oc
parent0b1fa3a2a11c334cfe3c44bcf285599e34018799 (diff)
ocis-bin: init at 5.0.0
Diffstat (limited to 'pkgs/by-name/oc')
-rw-r--r--pkgs/by-name/oc/ocis-bin/package.nix54
1 files changed, 54 insertions, 0 deletions
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 0000000000000..cdd12fb46e9c6
--- /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 ];
+  };
+})