Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
104 lines
2.3 KiB
Nix
104 lines
2.3 KiB
Nix
{
|
|
stdenv,
|
|
lib,
|
|
fetchFromGitHub,
|
|
fetchYarnDeps,
|
|
makeWrapper,
|
|
nix-update-script,
|
|
prefetch-yarn-deps,
|
|
fixup-yarn-lock,
|
|
nodejs,
|
|
yarn,
|
|
nixosTests,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "outline";
|
|
version = "0.87.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "outline";
|
|
repo = "outline";
|
|
rev = "v${version}";
|
|
hash = "sha256-gsQPDbKTzsXV8y8/xMxmhJM6pI+zDkx/r1Zk83ixb7k=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
makeWrapper
|
|
prefetch-yarn-deps
|
|
fixup-yarn-lock
|
|
];
|
|
buildInputs = [
|
|
yarn
|
|
nodejs
|
|
];
|
|
|
|
yarnOfflineCache = fetchYarnDeps {
|
|
yarnLock = "${src}/yarn.lock";
|
|
hash = "sha256-/bWDFIGElBc1lMODKTxmSkal9c4L1iTPd521/DVYyxo=";
|
|
};
|
|
|
|
configurePhase = ''
|
|
export HOME=$(mktemp -d)/yarn_home
|
|
'';
|
|
|
|
buildPhase = ''
|
|
runHook preBuild
|
|
export NODE_OPTIONS=--openssl-legacy-provider
|
|
|
|
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/
|
|
# apply upstream patches with `patch-package`
|
|
yarn run postinstall
|
|
yarn build
|
|
|
|
runHook postBuild
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/bin $out/share/outline
|
|
mv build server public node_modules $out/share/outline/
|
|
|
|
node_modules=$out/share/outline/node_modules
|
|
build=$out/share/outline/build
|
|
server=$out/share/outline/server
|
|
|
|
makeWrapper ${nodejs}/bin/node $out/bin/outline-server \
|
|
--add-flags $build/server/index.js \
|
|
--set NODE_ENV production \
|
|
--set NODE_PATH $node_modules \
|
|
--prefix PATH : ${lib.makeBinPath [ nodejs ]} # required to run migrations
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
passthru = {
|
|
tests = {
|
|
basic-functionality = nixosTests.outline;
|
|
};
|
|
updateScript = nix-update-script { };
|
|
# alias for nix-update to be able to find and update this attribute
|
|
offlineCache = yarnOfflineCache;
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "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
|
|
];
|
|
teams = [ teams.cyberus ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|