Skip to content

Commit

Permalink
Merge pull request #203710 from urandom2/olaris-server
Browse files Browse the repository at this point in the history
Fixes #114305
  • Loading branch information
SuperSandro2000 authored Dec 12, 2022
2 parents aec3391 + 370593b commit 765b4a9
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
53 changes: 53 additions & 0 deletions pkgs/servers/olaris/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{ buildGoModule, fetchFromGitLab, fetchzip, installShellFiles, lib }:

buildGoModule rec {
pname = "olaris-server";
version = "0.4.0";

src = fetchFromGitLab {
owner = "olaris";
repo = pname;
rev = "v${version}";
hash = "sha256-iworyQqyTabTI0NpZHTdUBGZSCaiC5Dhr69mRtsHLOs=";
};

preBuild = let
olaris-react = fetchzip {
url = "https://gitlab.com/api/v4/projects/olaris%2Folaris-react/jobs/artifacts/v${version}/download?job=build";
extension = "zip";
hash = "sha256-MkxBf/mGvtiOu0e79bMpd9Z/D0eOxhzPE+bKic//viM=";
};
in ''
# cannot build olaris-react https://github.com/NixOS/nixpkgs/issues/203708
cp -r ${olaris-react} react/build
make generate
'';

ldflags = [
"-s"
"-w"
"-X gitlab.com/olaris/olaris-server/helpers.Version=${version}"
];

vendorHash = "sha256-xWywDgw0LzJhPtVK0aGgT0TTanejJ39ZmGc50A3d68U=";

nativeBuildInputs = [ installShellFiles ];

# integration tests require network access
doCheck = false;

postInstall = ''
installShellCompletion --cmd olaris-server \
--bash <($out/bin/olaris-server completion bash) \
--fish <($out/bin/olaris-server completion fish) \
--zsh <($out/bin/olaris-server completion zsh)
'';

meta = with lib; {
description = "A media manager and transcoding server.";
homepage = "https://gitlab.com/olaris/olaris-server";
changelog = "https://gitlab.com/olaris/olaris-server/-/releases/v${version}";
license = licenses.gpl3Only;
maintainers = with maintainers; [ urandom ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24148,6 +24148,8 @@ with pkgs;

oauth2-proxy = callPackage ../servers/oauth2-proxy { };

olaris-server = callPackage ../servers/olaris {};

onlyoffice-documentserver = callPackage ../servers/onlyoffice-documentserver { };

outline = callPackage ../servers/web-apps/outline (lib.fix (super: {
Expand Down

0 comments on commit 765b4a9

Please sign in to comment.