Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at litex 49 lines 1.1 kB view raw
1{ lib, stdenv, fetchurl, php, nix-update-script }: 2 3stdenv.mkDerivation rec { 4 version = "4.8.1"; 5 pname = "adminer"; 6 7 # not using fetchFromGitHub as the git repo relies on submodules that are included in the tar file 8 src = fetchurl { 9 url = "https://github.com/vrana/adminer/releases/download/v${version}/adminer-${version}.tar.gz"; 10 sha256 = "sha256-2rkNq79sc5RBFxWuiaSlpWr0rwrnEFlnW1WcoxjoP2M="; 11 }; 12 13 nativeBuildInputs = [ 14 php 15 php.packages.composer 16 ]; 17 18 buildPhase = '' 19 runHook preBuild 20 21 composer --no-cache run compile 22 23 runHook postBuild 24 ''; 25 26 installPhase = '' 27 runHook preInstall 28 29 mkdir $out 30 cp adminer-${version}.php $out/adminer.php 31 32 runHook postInstall 33 ''; 34 35 passthru = { 36 updateScript = nix-update-script { }; 37 }; 38 39 meta = with lib; { 40 description = "Database management in a single PHP file"; 41 homepage = "https://www.adminer.org"; 42 license = with licenses; [ asl20 gpl2Only ]; 43 maintainers = with maintainers; [ 44 jtojnar 45 sstef 46 ]; 47 platforms = platforms.all; 48 }; 49}