nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, stdenv, fetchurl, makeWrapper, sbcl_2_0_8, sqlite, freetds, libzip, curl, git, cacert, openssl }:
2stdenv.mkDerivation rec {
3 pname = "pgloader";
4 version = "3.6.2";
5
6 src = fetchurl {
7 url = "https://github.com/dimitri/pgloader/releases/download/v3.6.2/pgloader-bundle-3.6.2.tgz";
8 sha256 = "1jqnw6pw11kwyy8zm2g7g85r8197fy0q4l70yybw9wr87wnqqnz3";
9 };
10
11 nativeBuildInputs = [ git makeWrapper ];
12 buildInputs = [ sbcl_2_0_8 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 broken = stdenv.isDarwin;
33 homepage = "https://pgloader.io/";
34 description = "Loads data into PostgreSQL and allows you to implement Continuous Migration from your current database to PostgreSQL";
35 maintainers = with maintainers; [ mguentner ];
36 license = licenses.postgresql;
37 platforms = platforms.all;
38 };
39}