File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111 with import nixpkgs { inherit system ; } ;
1212 with pkgs ;
1313 let
14+ name = "wp2static" ;
15+ version = "7.4.0" ;
16+ composerDeps = php . buildComposerProject ( finalAttrs : {
17+ pname = "${ name } -composer-deps" ;
18+ version = version ;
19+ src = pkgs . lib . cleanSourceWith {
20+ src = self ;
21+ filter = path : type :
22+ let rel = baseNameOf path ;
23+ in rel == "composer.json" || rel == "composer.lock" ;
24+ } ;
25+ vendorHash = "sha256-lN/24P9LbuRuU/bc3DNPR0kZGtIhZfWcNqeL5puXj2w=" ;
26+ } ) ;
27+ wp2static = runCommand "wp2static" { } ''
28+ cp -r "${ composerDeps } /share/php/${ name } -composer-deps/vendor" $TMPDIR
29+ cp -r ${ self } /src ${ self } /views ${ self } /*.php $TMPDIR
30+ mkdir -p $out
31+ ${ zip } /bin/zip -r -9 $out/wp2static.zip $TMPDIR
32+ '' ;
1433 phpVersions = {
1534 php81 = php81 ;
1635 php82 = php82 ;
2140 pkgs . writeShellScriptBin name ''${ phpPkg } /bin/php "$@"'' ) phpVersions ;
2241 in {
2342 devShells . default = mkShell {
24- buildInputs = [ php phpPackages . composer shellcheck zip ] ++ phpBins ;
43+ buildInputs = [ php phpPackages . composer shellcheck ] ++ phpBins ;
2544 } ;
45+ packages = { inherit wp2static ; } ;
2646 } ) ;
2747}
You can’t perform that action at this time.
0 commit comments