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