diff options
-rw-r--r-- | default.nix | 19 | ||||
-rw-r--r-- | fetched/pgloader.json | 15 |
2 files changed, 33 insertions, 1 deletions
diff --git a/default.nix b/default.nix index 4c9a35d..ea71274 100644 --- a/default.nix +++ b/default.nix | |||
@@ -205,6 +205,23 @@ let | |||
205 | pg_activity = with python2Packages; buildPythonApplication (fetchedGithub ./fetched/pg_activity.json // rec { | 205 | pg_activity = with python2Packages; buildPythonApplication (fetchedGithub ./fetched/pg_activity.json // rec { |
206 | propagatedBuildInputs = [ psycopg2 psutil ]; | 206 | propagatedBuildInputs = [ psycopg2 psutil ]; |
207 | }); | 207 | }); |
208 | |||
209 | pgloader = stdenv.mkDerivation (fetchedGithub ./fetched/pgloader.json // rec { | ||
210 | buildInputs = [ sbcl cacert sqlite freetds libzip curl git openssl makeWrapper ]; | ||
211 | LD_LIBRARY_PATH = stdenv.lib.makeLibraryPath [ sqlite libzip curl git openssl freetds ]; | ||
212 | buildPhase = '' | ||
213 | export PATH=$PATH:$out/bin | ||
214 | export HOME=$TMPDIR | ||
215 | make pgloader | ||
216 | ''; | ||
217 | dontStrip = true; | ||
218 | enableParallelBuilding = false; | ||
219 | installPhase = '' | ||
220 | install -Dm755 build/bin/pgloader "$out/bin/pgloader" | ||
221 | wrapProgram $out/bin/pgloader --prefix LD_LIBRARY_PATH : "${LD_LIBRARY_PATH}" | ||
222 | ''; | ||
223 | }); | ||
224 | |||
208 | # https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh | 225 | # https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh |
209 | # https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks | 226 | # https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks |
210 | in | 227 | in |
@@ -238,6 +255,6 @@ in | |||
238 | inherit abook khard khal; | 255 | inherit abook khard khal; |
239 | inherit graphicsmagick; | 256 | inherit graphicsmagick; |
240 | inherit youtube-dl; | 257 | inherit youtube-dl; |
241 | inherit pg_activity; | 258 | inherit pg_activity pgloader; |
242 | #inherit nixos; | 259 | #inherit nixos; |
243 | } | 260 | } |
diff --git a/fetched/pgloader.json b/fetched/pgloader.json new file mode 100644 index 0000000..dfe310b --- /dev/null +++ b/fetched/pgloader.json | |||
@@ -0,0 +1,15 @@ | |||
1 | { | ||
2 | "tag": "v3.5.2", | ||
3 | "meta": { | ||
4 | "name": "pgloader", | ||
5 | "url": "https://github.com/dimitri/pgloader", | ||
6 | "branch": "refs/tags/v3.5.2" | ||
7 | }, | ||
8 | "github": { | ||
9 | "owner": "dimitri", | ||
10 | "repo": "pgloader", | ||
11 | "rev": "63af7e7373975391446dcae151f5c61564849025", | ||
12 | "sha256": "1rd0k1x7ml6b6x526brachm13v51vx5ikpg64c8k8j29cskq2vqa", | ||
13 | "fetchSubmodules": true | ||
14 | } | ||
15 | } | ||