aboutsummaryrefslogtreecommitdiff
path: root/pkgs/pgloader/default.nix
blob: c2c03e7e228da581c64f4d971d5bb0d1c7986b30 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{ stdenv, mylibs, sbcl, cacert, sqlite, freetds, libzip, curl, git, openssl, makeWrapper }:
stdenv.mkDerivation (mylibs.fetchedGithub ./pgloader.json // {
  buildInputs = [ sbcl cacert sqlite freetds libzip curl git openssl makeWrapper ];
  LD_LIBRARY_PATH = stdenv.lib.makeLibraryPath [ sqlite libzip curl git openssl freetds ];
  buildPhase = ''
    export PATH=$PATH:$out/bin
    export HOME=$TMPDIR
    make pgloader
  '';
  dontStrip = true;
  enableParallelBuilding = false;
  installPhase = ''
    install -Dm755 build/bin/pgloader "$out/bin/pgloader"
    wrapProgram $out/bin/pgloader --prefix LD_LIBRARY_PATH : "$LD_LIBRARY_PATH"
  '';
})