adminer: Clean up
- Drop unused arguments. - Do not use both php and phpPackages since those can have different PHP versions. - Do not use with statement just for a single composer package. - Add phase hooks so that one can easily customize the derivation. - Clarify license to gpl-2.0-only. - Add jtojnar to maintainers.
This commit is contained in:
parent
3325053530
commit
3af8f7c03c
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, libbsd, fetchurl, phpPackages, php }:
|
{ stdenv, fetchurl, php }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "4.7.8";
|
version = "4.7.8";
|
||||||
@ -10,22 +10,36 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "0k794agvd8pa3mwl0076i7753fzxd41lhr23aih4l2lbdgnzi68z";
|
sha256 = "0k794agvd8pa3mwl0076i7753fzxd41lhr23aih4l2lbdgnzi68z";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = with phpPackages; [ php composer ];
|
nativeBuildInputs = [
|
||||||
|
php
|
||||||
|
php.packages.composer
|
||||||
|
];
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
|
runHook preBuild
|
||||||
|
|
||||||
composer --no-cache run compile
|
composer --no-cache run compile
|
||||||
|
|
||||||
|
runHook postBuild
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
mkdir $out
|
mkdir $out
|
||||||
cp adminer-${version}.php $out/adminer.php
|
cp adminer-${version}.php $out/adminer.php
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Database management in a single PHP file";
|
description = "Database management in a single PHP file";
|
||||||
homepage = "https://www.adminer.org";
|
homepage = "https://www.adminer.org";
|
||||||
license = with licenses; [ asl20 gpl2 ];
|
license = with licenses; [ asl20 gpl2Only ];
|
||||||
maintainers = with maintainers; [ sstef ];
|
maintainers = with maintainers; [
|
||||||
|
jtojnar
|
||||||
|
sstef
|
||||||
|
];
|
||||||
platforms = platforms.all;
|
platforms = platforms.all;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user