]> git.immae.eu Git - perso/Immae/Config/Nix.git/blob - pkgs/pgloader/default.nix
Remove mariadb with pam overlay
[perso/Immae/Config/Nix.git] / pkgs / pgloader / default.nix
1 # https://github.com/NixOS/nixpkgs/pull/61702
2 { stdenv, fetchurl, makeWrapper, sbcl, sqlite, freetds, libzip, curl, git, cacert, openssl }:
3 stdenv.mkDerivation rec {
4 pname = "pgloader";
5 version = "3.6.1";
6 name = "${pname}-${version}";
7
8 src = fetchurl {
9 url = "https://github.com/dimitri/pgloader/releases/download/v3.6.1/pgloader-bundle-3.6.1.tgz";
10 sha256 = "1sm8xmq30d1biin5br0y3vrv4fydbrzfqglz1hnvrkdyxrg7d6f9";
11 };
12
13 nativeBuildInputs = [ git makeWrapper ];
14 buildInputs = [ sbcl cacert sqlite freetds libzip curl openssl ];
15
16 LD_LIBRARY_PATH = stdenv.lib.makeLibraryPath [ sqlite libzip curl git openssl freetds ];
17
18 buildPhase = ''
19 export PATH=$PATH:$out/bin
20 export HOME=$TMPDIR
21
22 make pgloader
23 '';
24
25 dontStrip = true;
26 enableParallelBuilding = false;
27
28 installPhase = ''
29 install -Dm755 bin/pgloader "$out/bin/pgloader"
30 wrapProgram $out/bin/pgloader --prefix LD_LIBRARY_PATH : "${LD_LIBRARY_PATH}"
31 '';
32
33 meta = with stdenv.lib; {
34 homepage = https://pgloader.io/;
35 description = "pgloader loads data into PostgreSQL and allows you to implement Continuous Migration from your current database to PostgreSQL";
36 maintainers = with maintainers; [ mguentner ];
37 license = licenses.postgresql;
38 platforms = platforms.all;
39 };
40 }