Initial nix package build. Update composer

This commit is contained in:
Felix Albrigtsen 2023-10-01 03:33:56 +02:00
parent 0da5d44ea1
commit 7712419e9b
5 changed files with 1383 additions and 745 deletions

View File

@ -1,4 +1,6 @@
{
"name": "programvareverkstedet/nettsiden",
"description": "Programvareverkstedets public website",
"require": {
"simplesamlphp/simplesamlphp": "~1",
"erusev/parsedown": "^1.7"

2104
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -2,11 +2,11 @@
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1692463654,
"narHash": "sha256-F8hZmsQINI+S6UROM4jyxAMbQLtzE44pI8Nk6NtMdao=",
"lastModified": 1695978539,
"narHash": "sha256-lta5HToBZMWZ2hl5CautNSUgIZViR41QxN7JKbMAjgQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ca3c9ac9f4cdd4bea19f592b32bb59b74ab7d783",
"rev": "bd9b686c0168041aea600222be0805a0de6e6ab8",
"type": "github"
},
"original": {

View File

@ -14,6 +14,10 @@
];
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
in {
packages = forAllSystems (system: rec {
pkgs = import nixpkgs { inherit system; };
default = pkgs.callPackage ./package.nix { php = pkgs.php82; };
});
devShells = forAllSystems (system: rec {
pkgs = import nixpkgs { inherit system; };
default = pkgs.mkShellNoCC {

12
package.nix Normal file
View File

@ -0,0 +1,12 @@
{ lib, php }:
php.buildComposerProject (finalAttrs: {
pname = "pvv-nettsiden";
version = "1.0.0";
patchPhase = ''ls -la'';
src = ./.; # TODO: Use builtins.filterSource or similar to clean the source dir
vendorHash = "sha256-APKvVTr7AeCfA1WAzvh6Ex5l8f4Oy46eUoM80vCWMgk=";
})