Unverified Commit 629ec1b3 authored by Alexander Bantyev's avatar Alexander Bantyev Committed by GitHub
Browse files

Merge pull request #161805 from yrd/outline

outline: init at 0.65.2
parents 4cd8b763 9898e975
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -198,6 +198,13 @@
          <link xlink:href="options.html#opt-services.kanata.enable">services.kanata</link>.
        </para>
      </listitem>
      <listitem>
        <para>
          <link xlink:href="https://www.getoutline.com/">Outline</link>,
          a wiki and knowledge base similar to Notion. Available as
          <link linkend="opt-services.outline.enable">services.outline</link>.
        </para>
      </listitem>
      <listitem>
        <para>
          <link xlink:href="https://github.com/aiberia/persistent-evdev">persistent-evdev</link>,
+2 −0
Original line number Diff line number Diff line
@@ -74,6 +74,8 @@ In addition to numerous new and upgraded packages, this release has the followin
- [kanata](https://github.com/jtroo/kanata), a tool to improve keyboard comfort and usability with advanced customization.
  Available as [services.kanata](options.html#opt-services.kanata.enable).

- [Outline](https://www.getoutline.com/), a wiki and knowledge base similar to Notion. Available as [services.outline](#opt-services.outline.enable).

- [persistent-evdev](https://github.com/aiberia/persistent-evdev), a daemon to add virtual proxy devices that mirror a physical input device but persist even if the underlying hardware is hot-plugged. Available as [services.persistent-evdev](#opt-services.persistent-evdev.enable).

- [schleuder](https://schleuder.org/), a mailing list manager with PGP support. Enable using [services.schleuder](#opt-services.schleuder.enable).
+1 −0
Original line number Diff line number Diff line
@@ -1104,6 +1104,7 @@
  ./services/web-apps/prosody-filer.nix
  ./services/web-apps/matomo.nix
  ./services/web-apps/openwebrx.nix
  ./services/web-apps/outline.nix
  ./services/web-apps/restya-board.nix
  ./services/web-apps/sogo.nix
  ./services/web-apps/rss-bridge.nix
+777 −0

File added.

Preview size limit exceeded, changes collapsed.

+87 −0
Original line number Diff line number Diff line
{ stdenv
, lib
, fetchFromGitHub
, makeWrapper
, nodejs
, yarn
, yarn2nix-moretea
}:

stdenv.mkDerivation rec {
  pname = "outline";
  version = "0.65.2";

  src = fetchFromGitHub {
    owner = "outline";
    repo = "outline";
    rev = "v${version}";
    sha256 = "sha256-a9K6nMgg1j93BPiy03M86dDecXv/J47vUaqHH3S6DOs=";
  };

  nativeBuildInputs = [ makeWrapper yarn2nix-moretea.fixup_yarn_lock ];
  buildInputs = [ yarn nodejs ];

  # Replace the inline call to yarn with our sequalize wrapper. This should be
  # the only occurrence:
  # https://github.com/outline/outline/search?l=TypeScript&q=yarn
  patches = [ ./sequelize-command.patch ];

  yarnOfflineCache = yarn2nix-moretea.importOfflineCache ./yarn.nix;

  configurePhase = ''
    export HOME=$(mktemp -d)/yarn_home
  '';

  buildPhase = ''
    runHook preBuild

    yarn config --offline set yarn-offline-mirror $yarnOfflineCache
    fixup_yarn_lock yarn.lock

    yarn install --offline \
      --frozen-lockfile \
      --ignore-engines --ignore-scripts
    patchShebangs node_modules/
    yarn build

    pushd server
    cp -r config migrations onboarding ../build/server/
    popd

    runHook postBuild
  '';

  installPhase = ''
    runHook preInstall

    mkdir -p $out/bin $out/share/outline
    mv node_modules build $out/share/outline/

    node_modules=$out/share/outline/node_modules
    build=$out/share/outline/build

    makeWrapper ${nodejs}/bin/node $out/bin/outline-server \
      --add-flags $build/server/index.js \
      --set NODE_ENV production \
      --set NODE_PATH $node_modules

    makeWrapper ${nodejs}/bin/node $out/bin/outline-sequelize \
      --add-flags $node_modules/.bin/sequelize \
      --add-flags "--migrations-path $build/server/migrations" \
      --add-flags "--models-path $build/server/models" \
      --add-flags "--seeders-path $build/server/models/fixtures" \
      --set NODE_ENV production \
      --set NODE_PATH $node_modules

    runHook postInstall
  '';

  meta = with lib; {
    description = "The fastest wiki and knowledge base for growing teams. Beautiful, feature rich, and markdown compatible";
    homepage = "https://www.getoutline.com/";
    changelog = "https://github.com/outline/outline/releases";
    license = licenses.bsl11;
    maintainers = with maintainers; [ cab404 yrd ];
    platforms = platforms.linux;
  };
}
Loading