From 54888eb8430557ef16a0488d13e3b1d0aaf5529d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Sat, 25 May 2019 14:12:07 +0200 Subject: Upgrade pgloader and remove noChroot need --- pkgs/default.nix | 2 +- pkgs/pgloader/default.nix | 39 ++++++++++++++++++++++++++++++--------- pkgs/pgloader/pgloader.json | 15 --------------- 3 files changed, 31 insertions(+), 25 deletions(-) delete mode 100644 pkgs/pgloader/pgloader.json (limited to 'pkgs') diff --git a/pkgs/default.nix b/pkgs/default.nix index 297f524d..c91f6726 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -19,7 +19,7 @@ rec { notmuch-python3 = callPackage ../pkgs/notmuch/notmuch-python { pythonPackages = python3Packages; }; notmuch-vim = callPackage ../pkgs/notmuch/notmuch-vim {}; pg_activity = callPackage ../pkgs/pg_activity { inherit mylibs; }; - pgloader = callPackage ../pkgs/pgloader { inherit mylibs; }; + pgloader = callPackage ../pkgs/pgloader {}; telegram-cli = callPackage ../pkgs/telegram-cli { inherit mylibs; }; telegram-history-dump = callPackage ../pkgs/telegram-history-dump { inherit mylibs; }; telegramircd = callPackage ../pkgs/telegramircd { inherit mylibs; telethon = callPackage ../pkgs/telethon_sync {}; }; 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 @@ -{ stdenv, mylibs, sbcl, cacert, sqlite, freetds, libzip, curl, git, openssl, makeWrapper }: -stdenv.mkDerivation (mylibs.fetchedGithub ./pgloader.json // { - # was removed from quicklisp packages cd7bfa6f48295f361c691a7520fb122938bd2a68, - # but needs curl to build everything otherwise - __noChroot = true; - buildInputs = [ sbcl cacert sqlite freetds libzip curl git openssl makeWrapper ]; +# https://github.com/NixOS/nixpkgs/pull/61702 +{ stdenv, fetchurl, makeWrapper, sbcl, sqlite, freetds, libzip, curl, git, cacert, openssl }: +stdenv.mkDerivation rec { + pname = "pgloader"; + version = "3.6.1"; + name = "${pname}-${version}"; + + src = fetchurl { + url = "https://github.com/dimitri/pgloader/releases/download/v3.6.1/pgloader-bundle-3.6.1.tgz"; + sha256 = "1sm8xmq30d1biin5br0y3vrv4fydbrzfqglz1hnvrkdyxrg7d6f9"; + }; + + nativeBuildInputs = [ git makeWrapper ]; + buildInputs = [ sbcl cacert sqlite freetds libzip curl openssl ]; + 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" + install -Dm755 bin/pgloader "$out/bin/pgloader" + wrapProgram $out/bin/pgloader --prefix LD_LIBRARY_PATH : "${LD_LIBRARY_PATH}" ''; -}) + + meta = with stdenv.lib; { + homepage = https://pgloader.io/; + description = "pgloader loads data into PostgreSQL and allows you to implement Continuous Migration from your current database to PostgreSQL"; + maintainers = with maintainers; [ mguentner ]; + license = licenses.postgresql; + platforms = platforms.all; + }; +} diff --git a/pkgs/pgloader/pgloader.json b/pkgs/pgloader/pgloader.json deleted file mode 100644 index dfe310b7..00000000 --- a/pkgs/pgloader/pgloader.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "tag": "v3.5.2", - "meta": { - "name": "pgloader", - "url": "https://github.com/dimitri/pgloader", - "branch": "refs/tags/v3.5.2" - }, - "github": { - "owner": "dimitri", - "repo": "pgloader", - "rev": "63af7e7373975391446dcae151f5c61564849025", - "sha256": "1rd0k1x7ml6b6x526brachm13v51vx5ikpg64c8k8j29cskq2vqa", - "fetchSubmodules": true - } -} -- cgit v1.2.3