14 stdenv.mkDerivation rec {
18 src = fetchFromGitHub {
22 hash = "sha256-I0ngEJfHWywJSYOloJbtuKzu95yJibo7hLFgkyT2Wz8=";
25 nativeBuildInputs = [ makeWrapper prefetch-yarn-deps fixup-yarn-lock ];
26 buildInputs = [ yarn nodejs ];
28 yarnOfflineCache = fetchYarnDeps {
29 yarnLock = "${src}/yarn.lock";
30 hash = "sha256-TKAV49VJmR/SWTd2T2vHMnYq2j9fwimzYq1CCfRXk0Q=";
34 export HOME=$(mktemp -d)/yarn_home
39 export NODE_OPTIONS=--openssl-legacy-provider
41 yarn config --offline set yarn-offline-mirror $yarnOfflineCache
42 fixup-yarn-lock yarn.lock
44 yarn install --offline \
46 --ignore-engines --ignore-scripts
47 patchShebangs node_modules/
48 # apply upstream patches with `patch-package`
58 mkdir -p $out/bin $out/share/outline
59 mv build server public node_modules $out/share/outline/
61 node_modules=$out/share/outline/node_modules
62 build=$out/share/outline/build
63 server=$out/share/outline/server
65 makeWrapper ${nodejs}/bin/node $out/bin/outline-server \
66 --add-flags $build/server/index.js \
67 --set NODE_ENV production \
68 --set NODE_PATH $node_modules \
69 --prefix PATH : ${lib.makeBinPath [ nodejs ]} # required to run migrations
76 basic-functionality = nixosTests.outline;
78 updateScript = nix-update-script { };
79 # alias for nix-update to be able to find and update this attribute
80 offlineCache = yarnOfflineCache;
84 description = "Fastest wiki and knowledge base for growing teams. Beautiful, feature rich, and markdown compatible";
85 homepage = "https://www.getoutline.com/";
86 changelog = "https://github.com/outline/outline/releases";
87 license = licenses.bsl11;
88 maintainers = with maintainers; [ cab404 yrd xanderio ];
89 platforms = platforms.linux;