summary refs log tree commit diff
path: root/pkgs/servers/adminer
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2021-01-02 16:34:39 +0100
committerJan Tojnar <jtojnar@gmail.com>2021-01-02 16:35:02 +0100
commit3af8f7c03cf956dfdbfce41ff68ae8e51178ca8e (patch)
tree0f3d7f78103d93f29c6886909e393bc59f2654fd /pkgs/servers/adminer
parent3325053530195348faca2c218ee552dc1d41b4cd (diff)
downloadnixpkgs-3af8f7c03cf956dfdbfce41ff68ae8e51178ca8e.tar
nixpkgs-3af8f7c03cf956dfdbfce41ff68ae8e51178ca8e.tar.gz
nixpkgs-3af8f7c03cf956dfdbfce41ff68ae8e51178ca8e.tar.bz2
nixpkgs-3af8f7c03cf956dfdbfce41ff68ae8e51178ca8e.tar.lz
nixpkgs-3af8f7c03cf956dfdbfce41ff68ae8e51178ca8e.tar.xz
nixpkgs-3af8f7c03cf956dfdbfce41ff68ae8e51178ca8e.tar.zst
nixpkgs-3af8f7c03cf956dfdbfce41ff68ae8e51178ca8e.zip
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.
Diffstat (limited to 'pkgs/servers/adminer')
-rw-r--r--pkgs/servers/adminer/default.nix22
1 files changed, 18 insertions, 4 deletions
diff --git a/pkgs/servers/adminer/default.nix b/pkgs/servers/adminer/default.nix
index 65a4dc37ecc..0e6cd14eef4 100644
--- a/pkgs/servers/adminer/default.nix
+++ b/pkgs/servers/adminer/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, libbsd, fetchurl, phpPackages, php }:
+{ stdenv, fetchurl, php }:
 
 stdenv.mkDerivation rec {
   version = "4.7.8";
@@ -10,22 +10,36 @@ stdenv.mkDerivation rec {
     sha256 = "0k794agvd8pa3mwl0076i7753fzxd41lhr23aih4l2lbdgnzi68z";
   };
 
-  nativeBuildInputs = with phpPackages; [ php composer ];
+  nativeBuildInputs = [
+    php
+    php.packages.composer
+  ];
 
   buildPhase = ''
+    runHook preBuild
+
     composer --no-cache run compile
+
+    runHook postBuild
   '';
 
   installPhase = ''
+    runHook preInstall
+
     mkdir $out
     cp adminer-${version}.php $out/adminer.php
+
+    runHook postInstall
   '';
 
   meta = with stdenv.lib; {
     description = "Database management in a single PHP file";
     homepage = "https://www.adminer.org";
-    license = with licenses; [ asl20 gpl2 ];
-    maintainers = with maintainers; [ sstef ];
+    license = with licenses; [ asl20 gpl2Only ];
+    maintainers = with maintainers; [
+      jtojnar
+      sstef
+    ];
     platforms = platforms.all;
   };
 }