diff options
Diffstat (limited to 'pkgs/pgloader/default.nix')
-rw-r--r-- | pkgs/pgloader/default.nix | 39 |
1 files changed, 30 insertions, 9 deletions
diff --git a/pkgs/pgloader/default.nix b/pkgs/pgloader/default.nix index 9f1be67d..6093ada8 100644 --- a/pkgs/pgloader/default.nix +++ b/pkgs/pgloader/default.nix | |||
@@ -1,19 +1,40 @@ | |||
1 | { stdenv, mylibs, sbcl, cacert, sqlite, freetds, libzip, curl, git, openssl, makeWrapper }: | 1 | # https://github.com/NixOS/nixpkgs/pull/61702 |
2 | stdenv.mkDerivation (mylibs.fetchedGithub ./pgloader.json // { | 2 | { stdenv, fetchurl, makeWrapper, sbcl, sqlite, freetds, libzip, curl, git, cacert, openssl }: |
3 | # was removed from quicklisp packages cd7bfa6f48295f361c691a7520fb122938bd2a68, | 3 | stdenv.mkDerivation rec { |
4 | # but needs curl to build everything otherwise | 4 | pname = "pgloader"; |
5 | __noChroot = true; | 5 | version = "3.6.1"; |
6 | buildInputs = [ sbcl cacert sqlite freetds libzip curl git openssl makeWrapper ]; | 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 | |||
7 | LD_LIBRARY_PATH = stdenv.lib.makeLibraryPath [ sqlite libzip curl git openssl freetds ]; | 16 | LD_LIBRARY_PATH = stdenv.lib.makeLibraryPath [ sqlite libzip curl git openssl freetds ]; |
17 | |||
8 | buildPhase = '' | 18 | buildPhase = '' |
9 | export PATH=$PATH:$out/bin | 19 | export PATH=$PATH:$out/bin |
10 | export HOME=$TMPDIR | 20 | export HOME=$TMPDIR |
21 | |||
11 | make pgloader | 22 | make pgloader |
12 | ''; | 23 | ''; |
24 | |||
13 | dontStrip = true; | 25 | dontStrip = true; |
14 | enableParallelBuilding = false; | 26 | enableParallelBuilding = false; |
27 | |||
15 | installPhase = '' | 28 | installPhase = '' |
16 | install -Dm755 build/bin/pgloader "$out/bin/pgloader" | 29 | install -Dm755 bin/pgloader "$out/bin/pgloader" |
17 | wrapProgram $out/bin/pgloader --prefix LD_LIBRARY_PATH : "$LD_LIBRARY_PATH" | 30 | wrapProgram $out/bin/pgloader --prefix LD_LIBRARY_PATH : "${LD_LIBRARY_PATH}" |
18 | ''; | 31 | ''; |
19 | }) | 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 | } | ||