Files
2026-07-19 23:36:35 +00:00

50 lines
1.2 KiB
Nix

{
lib,
fetchFromGitLab,
php,
nixosTests,
writeScript,
}:
php.buildComposerProject2 (finalAttrs: {
pname = "drupal";
version = "11.4.4";
src = fetchFromGitLab {
domain = "git.drupalcode.org";
owner = "project";
repo = "drupal";
tag = finalAttrs.version;
hash = "sha256-lwD4k4orQQD9gl60/Er9s1JTClN2i7b7JxBFuz5h+4s=";
};
composerNoPlugins = false;
vendorHash = "sha256-mJwOXz+nn1N7kFKofkuqBcbXJGwJDcgRrhKAhhwydik=";
passthru = {
tests = {
inherit (nixosTests) drupal;
};
updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p nix-update xmlstarlet
set -eu -o pipefail
version=$(curl -k --silent --globoff "https://updates.drupal.org/release-history/drupal/current" | xmlstarlet sel -t -v "/project/releases/release/tag[not(contains(., 'alpha'))][not(contains(., 'beta'))][not(contains(., '-rc'))]" | grep -m 1 '.')
nix-update drupal --version $version
'';
};
meta = {
description = "Drupal CMS";
license = lib.licenses.mit;
homepage = "https://drupal.org/";
maintainers = with lib.maintainers; [
OulipianSummer
];
platforms = php.meta.platforms;
};
})