nix (wip)

This commit is contained in:
Kiara Grouwstra 2022-10-25 21:13:39 +02:00
parent 36e498a530
commit 5987952e12
3 changed files with 139 additions and 0 deletions

93
flake.lock Normal file
View File

@ -0,0 +1,93 @@
{
"nodes": {
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1650374568,
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1666603677,
"narHash": "sha256-apAEIj+z1iwMaMJ4tB21r/VTetfGDLDzuhXRHJknIAU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "074da18a72269cc5a6cf444dce42daea5649b2fe",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1666424192,
"narHash": "sha256-rb/a7Kg9s31jqkvdOQHFrUc5ig5kB+O2ZKB8mjU2kW8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4f8287f3d597c73b0d706cfad028c2d51821f64d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"phps": {
"inputs": {
"flake-compat": "flake-compat",
"nixpkgs": "nixpkgs_2",
"utils": "utils"
},
"locked": {
"lastModified": 1666512631,
"narHash": "sha256-LslgMxoze367RLLfBzlx4T6fFFfiQW8Of3UIenfurSk=",
"owner": "fossar",
"repo": "nix-phps",
"rev": "0e230ec9bac6c7d2742285bb34fef1cdab5b9d57",
"type": "github"
},
"original": {
"owner": "fossar",
"repo": "nix-phps",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs",
"phps": "phps"
}
},
"utils": {
"locked": {
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

40
flake.nix Normal file
View File

@ -0,0 +1,40 @@
{
description = "CiviCRM environment for BIJ1";
inputs = {
phps.url = "github:fossar/nix-phps";
};
outputs = { self, nixpkgs, phps }@inputs:
let
system = "x86_64-linux";
myPhp = phps.packages.${system}.php74.buildEnv {
extensions = { enabled, all }: with all; enabled ++ [
intl
pdo
xdebug
];
# extraConfig = "memory_limit=256M";
};
in {
devShell.x86_64-linux = with nixpkgs.legacyPackages.${system}; mkShell {
buildInputs = [
mariadb
myPhp
wordpress
wp-cli
apacheHttpd
# cv
# phpunit
# wp plugin install --activate civicrm civicrm-admin-utilities wp-mail-smtp wpforms-lite
# civicrm
# civicrm-$version-l10n
# civi extensions
# our civi extensions
];
};
};
}

6
wp/bin/nix.sh Normal file
View File

@ -0,0 +1,6 @@
cd wordpress
wget -O cv https://download.civicrm.org/cv/cv.phar
wget -O phpunit https://phar.phpunit.de/phpunit-9.phar
chmod a+rx cv phpunit