0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-14 06:00:33 +03:00

nixos/dokuwiki: Simplify plugin fetching examples

Also replaced apache httpd referenced with ones to caddy
This commit is contained in:
Moritz 'e1mo' Fromm 2023-01-06 14:49:38 +01:00
parent da9185d964
commit 055100611d
No known key found for this signature in database
GPG key ID: 1D5D79A439E787F1
2 changed files with 31 additions and 42 deletions

View file

@ -173,18 +173,14 @@ let
''; '';
example = literalExpression '' example = literalExpression ''
let let
# Let's package the icalevents plugin plugin-icalevents = pkgs.stdenv.mkDerivation rec {
plugin-icalevents = pkgs.stdenv.mkDerivation {
name = "icalevents"; name = "icalevents";
# Download the plugin from the dokuwiki site version = "2017-06-16";
src = pkgs.fetchurl { src = pkgs.fetchzip {
url = "https://github.com/real-or-random/dokuwiki-plugin-icalevents/releases/download/2017-06-16/dokuwiki-plugin-icalevents-2017-06-16.zip"; stripRoot = false;
sha256 = "e40ed7dd6bbe7fe3363bbbecb4de481d5e42385b5a0f62f6a6ce6bf3a1f9dfa8"; url = "https://github.com/real-or-random/dokuwiki-plugin-icalevents/releases/download/''${version}/dokuwiki-plugin-icalevents-''${version}.zip";
hash = "sha256-IPs4+qgEfe8AAWevbcCM9PnyI0uoyamtWeg4rEb+9Wc=";
}; };
sourceRoot = ".";
# We need unzip to build this package
buildInputs = [ pkgs.unzip ];
# Installing simply means copying all files to the output directory
installPhase = "mkdir -p $out; cp -R * $out/"; installPhase = "mkdir -p $out; cp -R * $out/";
}; };
# And then pass this theme to the plugin list like this: # And then pass this theme to the plugin list like this:
@ -204,19 +200,17 @@ let
''; '';
example = literalExpression '' example = literalExpression ''
let let
# Let's package the bootstrap3 theme template-bootstrap3 = pkgs.stdenv.mkDerivation rec {
template-bootstrap3 = pkgs.stdenv.mkDerivation { name = "bootstrap3";
name = "bootstrap3"; version = "2022-07-27";
# Download the theme from the dokuwiki site src = pkgs.fetchFromGitHub {
src = pkgs.fetchurl { owner = "giterlizzi";
url = "https://github.com/giterlizzi/dokuwiki-template-bootstrap3/archive/v2019-05-22.zip"; repo = "dokuwiki-template-bootstrap3";
sha256 = "4de5ff31d54dd61bbccaf092c9e74c1af3a4c53e07aa59f60457a8f00cfb23a6"; rev = "v''${version}";
}; hash = "sha256-B3Yd4lxdwqfCnfmZdp+i/Mzwn/aEuZ0ovagDxuR6lxo=";
# We need unzip to build this package
buildInputs = [ pkgs.unzip ];
# Installing simply means copying all files to the output directory
installPhase = "mkdir -p $out; cp -R * $out/";
}; };
installPhase = "mkdir -p $out; cp -R * $out/";
};
# And then pass this theme to the template list like this: # And then pass this theme to the template list like this:
in [ template-bootstrap3 ] in [ template-bootstrap3 ]
''; '';
@ -276,8 +270,8 @@ in
Further nginx configuration can be done by adapting `services.nginx.virtualHosts.<name>`. Further nginx configuration can be done by adapting `services.nginx.virtualHosts.<name>`.
See [](#opt-services.nginx.virtualHosts) for further information. See [](#opt-services.nginx.virtualHosts) for further information.
Further apache2 configuration can be done by adapting `services.httpd.virtualHosts.<name>`. Further caddy configuration can be done by adapting `services.caddy.virtualHosts.<name>`.
See [](#opt-services.httpd.virtualHosts) for further information. See [](#opt-services.caddy.virtualHosts) for further information.
''; '';
}; };

View file

@ -1,32 +1,27 @@
import ./make-test-python.nix ({ pkgs, ... }: import ./make-test-python.nix ({ pkgs, ... }:
let let
template-bootstrap3 = pkgs.stdenv.mkDerivation { template-bootstrap3 = pkgs.stdenv.mkDerivation rec {
name = "bootstrap3"; name = "bootstrap3";
# Download the theme from the dokuwiki site version = "2022-07-27";
src = pkgs.fetchurl { src = pkgs.fetchFromGitHub {
url = "https://github.com/giterlizzi/dokuwiki-template-bootstrap3/archive/v2019-05-22.zip"; owner = "giterlizzi";
sha256 = "4de5ff31d54dd61bbccaf092c9e74c1af3a4c53e07aa59f60457a8f00cfb23a6"; repo = "dokuwiki-template-bootstrap3";
rev = "v${version}";
hash = "sha256-B3Yd4lxdwqfCnfmZdp+i/Mzwn/aEuZ0ovagDxuR6lxo=";
}; };
# We need unzip to build this package
nativeBuildInputs = [ pkgs.unzip ];
# Installing simply means copying all files to the output directory
installPhase = "mkdir -p $out; cp -R * $out/"; installPhase = "mkdir -p $out; cp -R * $out/";
}; };
# Let's package the icalevents plugin plugin-icalevents = pkgs.stdenv.mkDerivation rec {
plugin-icalevents = pkgs.stdenv.mkDerivation {
name = "icalevents"; name = "icalevents";
# Download the plugin from the dokuwiki site version = "2017-06-16";
src = pkgs.fetchurl { src = pkgs.fetchzip {
url = "https://github.com/real-or-random/dokuwiki-plugin-icalevents/releases/download/2017-06-16/dokuwiki-plugin-icalevents-2017-06-16.zip"; stripRoot = false;
sha256 = "e40ed7dd6bbe7fe3363bbbecb4de481d5e42385b5a0f62f6a6ce6bf3a1f9dfa8"; url = "https://github.com/real-or-random/dokuwiki-plugin-icalevents/releases/download/${version}/dokuwiki-plugin-icalevents-${version}.zip";
hash = "sha256-IPs4+qgEfe8AAWevbcCM9PnyI0uoyamtWeg4rEb+9Wc=";
}; };
# We need unzip to build this package
nativeBuildInputs = [ pkgs.unzip ];
sourceRoot = ".";
# Installing simply means copying all files to the output directory
installPhase = "mkdir -p $out; cp -R * $out/"; installPhase = "mkdir -p $out; cp -R * $out/";
}; };