nixpkgs/pkgs/servers/web-apps/wiki-js/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
1.1 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, lib, nixosTests }:
2021-03-18 11:33:40 +00:00
stdenv.mkDerivation rec {
pname = "wiki-js";
version = "2.5.305";
2021-03-18 11:33:40 +00:00
src = fetchurl {
url = "https://github.com/Requarks/wiki/releases/download/v${version}/${pname}.tar.gz";
sha256 = "sha256-beP9k1msJjg9IQbU/CmzTodjMvUnWrLYcw0EleR1OJk=";
2021-03-18 11:33:40 +00:00
};
# Unpack the tarball into a subdir. All the contents are copied into `$out`.
# Unpacking into the parent directory would also copy `env-vars` into `$out`
# in the `installPhase` which ultimately means that the package retains
# references to build tools and the tarball.
preUnpack = ''
mkdir source
cd source
'';
sourceRoot = ".";
dontBuild = true;
installPhase = ''
runHook preInstall
2021-03-18 11:33:40 +00:00
mkdir $out
cp -r . $out
runHook postInstall
2021-03-18 11:33:40 +00:00
'';
2022-04-08 16:44:02 +00:00
passthru = {
tests = { inherit (nixosTests) wiki-js; };
updateScript = ./update.sh;
};
2021-03-18 11:33:40 +00:00
meta = with lib; {
homepage = "https://js.wiki/";
description = "Modern and powerful wiki app built on Node.js";
license = licenses.agpl3Only;
maintainers = with maintainers; [ ma27 ];
};
}