Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchurl, makeWrapper, sbcl, sqlite, freetds, libzip, curl, git, cacert, openssl }: 2stdenv.mkDerivation rec { 3 pname = "pgloader"; 4 version = "3.6.9"; 5 6 src = fetchurl { 7 url = "https://github.com/dimitri/pgloader/releases/download/v3.6.9/pgloader-bundle-3.6.9.tgz"; 8 sha256 = "sha256-pdCcRmoJnrfVnkhbT0WqLrRbCtOEmRgGRsXK+3uByeA="; 9 }; 10 11 nativeBuildInputs = [ git makeWrapper ]; 12 buildInputs = [ sbcl cacert sqlite freetds libzip curl openssl ]; 13 14 LD_LIBRARY_PATH = lib.makeLibraryPath [ sqlite libzip curl git openssl freetds ]; 15 16 buildPhase = '' 17 export PATH=$PATH:$out/bin 18 export HOME=$TMPDIR 19 20 make pgloader 21 ''; 22 23 dontStrip = true; 24 enableParallelBuilding = false; 25 26 installPhase = '' 27 install -Dm755 bin/pgloader "$out/bin/pgloader" 28 wrapProgram $out/bin/pgloader --prefix LD_LIBRARY_PATH : "${LD_LIBRARY_PATH}" 29 ''; 30 31 meta = with lib; { 32 homepage = "https://pgloader.io/"; 33 description = "Loads data into PostgreSQL and allows you to implement Continuous Migration from your current database to PostgreSQL"; 34 maintainers = with maintainers; [ mguentner ]; 35 license = licenses.postgresql; 36 platforms = platforms.all; 37 }; 38}