Mega PR: Update deps, consolidate config, build with nix, gallery fixes, etc. #53

Merged
felixalb merged 12 commits from nixify-ng into master 2024-04-10 21:45:10 +02:00
4 changed files with 58 additions and 45 deletions
Showing only changes of commit 318e9cfe6b - Show all commits

View File

@ -1,16 +1,17 @@
{ {
"require": { "name": "programvareverkstedet/nettsiden",
"simplesamlphp/simplesamlphp": "1.19.8", "description": "Programvareverkstedets nettside",
"erusev/parsedown": "^1.7", "license": "proprietary",
"gettext/gettext": "4.8.7",
"simplesamlphp/saml2": "4.5"
},
"require-dev": {
"ext-pdo_sqlite": "*"
},
"config": { "config": {
"allow-plugins": { "allow-plugins": {
"simplesamlphp/composer-module-installer": true "simplesamlphp/composer-module-installer": true
} }
},
"require": {
"simplesamlphp/simplesamlphp": "~1.19.8",
"erusev/parsedown": "^1.7",
"simplesamlphp/saml2": "^4.6",
"gettext/gettext": "^4.8"
} }
} }

50
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "13225e0068a965f7b0b00b5f344af25a", "content-hash": "b7369600c4be8f1ec097c82c203ba17c",
"packages": [ "packages": [
{ {
"name": "erusev/parsedown", "name": "erusev/parsedown",
@ -58,16 +58,16 @@
}, },
{ {
"name": "gettext/gettext", "name": "gettext/gettext",
"version": "v4.8.7", "version": "v4.8.11",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/php-gettext/Gettext.git", "url": "https://github.com/php-gettext/Gettext.git",
"reference": "3f7bc5ef23302a9059e64934f3d59e454516bec0" "reference": "b632aaf5e4579d0b2ae8bc61785e238bff4c5156"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/php-gettext/Gettext/zipball/3f7bc5ef23302a9059e64934f3d59e454516bec0", "url": "https://api.github.com/repos/php-gettext/Gettext/zipball/b632aaf5e4579d0b2ae8bc61785e238bff4c5156",
"reference": "3f7bc5ef23302a9059e64934f3d59e454516bec0", "reference": "b632aaf5e4579d0b2ae8bc61785e238bff4c5156",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -119,7 +119,7 @@
"support": { "support": {
"email": "oom@oscarotero.com", "email": "oom@oscarotero.com",
"issues": "https://github.com/oscarotero/Gettext/issues", "issues": "https://github.com/oscarotero/Gettext/issues",
"source": "https://github.com/php-gettext/Gettext/tree/v4.8.7" "source": "https://github.com/php-gettext/Gettext/tree/v4.8.11"
}, },
"funding": [ "funding": [
{ {
@ -135,7 +135,7 @@
"type": "patreon" "type": "patreon"
} }
], ],
"time": "2022-08-02T09:42:10+00:00" "time": "2023-08-14T15:15:05+00:00"
}, },
{ {
"name": "gettext/languages", "name": "gettext/languages",
@ -517,30 +517,30 @@
}, },
{ {
"name": "psr/log", "name": "psr/log",
"version": "1.1.4", "version": "2.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/php-fig/log.git", "url": "https://github.com/php-fig/log.git",
"reference": "d49695b909c3b7628b6289db5479a1c204601f11" "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", "url": "https://api.github.com/repos/php-fig/log/zipball/ef29f6d262798707a9edd554e2b82517ef3a9376",
"reference": "d49695b909c3b7628b6289db5479a1c204601f11", "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.0" "php": ">=8.0.0"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.1.x-dev" "dev-master": "2.0.x-dev"
} }
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"Psr\\Log\\": "Psr/Log/" "Psr\\Log\\": "src"
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
@ -561,9 +561,9 @@
"psr-3" "psr-3"
], ],
"support": { "support": {
"source": "https://github.com/php-fig/log/tree/1.1.4" "source": "https://github.com/php-fig/log/tree/2.0.0"
}, },
"time": "2021-05-03T11:20:27+00:00" "time": "2021-07-14T16:41:46+00:00"
}, },
{ {
"name": "robrichards/xmlseclibs", "name": "robrichards/xmlseclibs",
@ -706,16 +706,16 @@
}, },
{ {
"name": "simplesamlphp/saml2", "name": "simplesamlphp/saml2",
"version": "v4.5.0", "version": "v4.6.11",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/simplesamlphp/saml2.git", "url": "https://github.com/simplesamlphp/saml2.git",
"reference": "d98020c3d7f7331409959eab286ca3a010e5a868" "reference": "1b5d48753c78d02e88667068e633531c233141fb"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/simplesamlphp/saml2/zipball/d98020c3d7f7331409959eab286ca3a010e5a868", "url": "https://api.github.com/repos/simplesamlphp/saml2/zipball/1b5d48753c78d02e88667068e633531c233141fb",
"reference": "d98020c3d7f7331409959eab286ca3a010e5a868", "reference": "1b5d48753c78d02e88667068e633531c233141fb",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -723,7 +723,7 @@
"ext-openssl": "*", "ext-openssl": "*",
"ext-zlib": "*", "ext-zlib": "*",
"php": ">=7.1 || ^8.0", "php": ">=7.1 || ^8.0",
"psr/log": "~1.1", "psr/log": "~1.1 || ^2.0 || ^3.0",
"robrichards/xmlseclibs": "^3.1.1", "robrichards/xmlseclibs": "^3.1.1",
"webmozart/assert": "^1.9" "webmozart/assert": "^1.9"
}, },
@ -758,9 +758,9 @@
"description": "SAML2 PHP library from SimpleSAMLphp", "description": "SAML2 PHP library from SimpleSAMLphp",
"support": { "support": {
"issues": "https://github.com/simplesamlphp/saml2/issues", "issues": "https://github.com/simplesamlphp/saml2/issues",
"source": "https://github.com/simplesamlphp/saml2/tree/v4.5.0" "source": "https://github.com/simplesamlphp/saml2/tree/v4.6.11"
}, },
"time": "2022-02-17T15:46:12+00:00" "time": "2024-01-25T19:39:46+00:00"
}, },
{ {
"name": "simplesamlphp/simplesamlphp", "name": "simplesamlphp/simplesamlphp",
@ -4976,8 +4976,6 @@
"prefer-stable": false, "prefer-stable": false,
"prefer-lowest": false, "prefer-lowest": false,
"platform": [], "platform": [],
"platform-dev": { "platform-dev": [],
"ext-pdo_sqlite": "*"
},
"plugin-api-version": "2.6.0" "plugin-api-version": "2.6.0"
} }

View File

@ -2,11 +2,11 @@
"nodes": { "nodes": {
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1692463654, "lastModified": 1707939175,
"narHash": "sha256-F8hZmsQINI+S6UROM4jyxAMbQLtzE44pI8Nk6NtMdao=", "narHash": "sha256-D1xan0lgxbmXDyzVqXTiSYHLmAMrMRdD+alKzEO/p3w=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "ca3c9ac9f4cdd4bea19f592b32bb59b74ab7d783", "rev": "f7e8132daca31b1e3859ac0fb49741754375ac3d",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -14,6 +14,18 @@
]; ];
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system); forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
in { in {
packages = forAllSystems (system: let
pkgs = nixpkgs.legacyPackages.${system};
php = pkgs.php83;
in {
default = self.packages.${system}.pvv-nettsiden;
pvv-nettsiden = php.buildComposerProject (finalAttrs: {
src = ./.;
pname = "pvv-nettsiden";
version = "0.0.1";
vendorHash = "sha256-DSn0ifj7Hjjia1SF/1wfziD/IdsiOES8XNDVz3F/cTI=";
});
});
devShells = forAllSystems (system: rec { devShells = forAllSystems (system: rec {
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };
default = pkgs.mkShellNoCC { default = pkgs.mkShellNoCC {
@ -50,9 +62,11 @@
''; '';
# TODO: # TODO:
# - Integrate with docker config
# - Make "trusted.url.domains" dynamic based on the current host:port # - Make "trusted.url.domains" dynamic based on the current host:port
# - Do not download composer.phar with curl # - Do not download composer.phar with curl(!)
# - Relicense the project to GPL or something
# - Move gallery/slideshow images to an external directory (configurable)
# - Write a module for the project
}; };
}); });