mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-29 00:04:14 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
44 lines
1.2 KiB
Nix
44 lines
1.2 KiB
Nix
{ lib, stdenvNoCC, fetchurl, imagemagick, nixosTests }:
|
|
|
|
stdenvNoCC.mkDerivation rec {
|
|
pname = "mediawiki";
|
|
version = "1.42.3";
|
|
|
|
src = fetchurl {
|
|
url = "https://releases.wikimedia.org/mediawiki/${lib.versions.majorMinor version}/mediawiki-${version}.tar.gz";
|
|
hash = "sha256-4FVjA/HYRnnNk5sykMyrP4nLxp02B/8dRJymxZU7ILw=";
|
|
};
|
|
|
|
postPatch = ''
|
|
sed -i 's|$vars = Installer::getExistingLocalSettings();|$vars = null;|' includes/installer/CliInstaller.php
|
|
|
|
# fix generating previews for SVGs
|
|
substituteInPlace includes/config-schema.php \
|
|
--replace-fail "\$path/convert" "${imagemagick}/bin/convert"
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/share/mediawiki
|
|
cp -r * $out/share/mediawiki
|
|
echo "<?php
|
|
return require(getenv('MEDIAWIKI_CONFIG'));
|
|
?>" > $out/share/mediawiki/LocalSettings.php
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
passthru.tests = {
|
|
inherit (nixosTests.mediawiki) mysql postgresql;
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Collaborative editing software that runs Wikipedia";
|
|
license = licenses.gpl2Plus;
|
|
homepage = "https://www.mediawiki.org/";
|
|
platforms = platforms.all;
|
|
maintainers = with maintainers; [ ] ++ teams.c3d2.members;
|
|
};
|
|
}
|