diff options
author | Alyssa Ross <hi@alyssa.is> | 2024-01-20 12:31:50 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2024-01-20 12:32:25 +0100 |
commit | b7baf40e099b4215181fe7b0c63083b12ef2c7fb (patch) | |
tree | a6efabd31d05b6d0a36624729e80377bbbfb0149 /nixpkgs/pkgs/by-name/pg | |
parent | 710028664e26e85cb831a869b3da9f6993902255 (diff) | |
parent | 0799f514b1cd74878174939df79ac60ca5036673 (diff) | |
download | nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.gz nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.bz2 nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.lz nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.xz nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.zst nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.zip |
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Conflicts: nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix
Diffstat (limited to 'nixpkgs/pkgs/by-name/pg')
-rw-r--r-- | nixpkgs/pkgs/by-name/pg/pgcopydb/package.nix | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/by-name/pg/pgcopydb/package.nix b/nixpkgs/pkgs/by-name/pg/pgcopydb/package.nix new file mode 100644 index 000000000000..b65d5ca77b09 --- /dev/null +++ b/nixpkgs/pkgs/by-name/pg/pgcopydb/package.nix @@ -0,0 +1,66 @@ +{ lib +, stdenv +, fetchFromGitHub +, libkrb5 +, openssl +, pam +, pkg-config +, postgresql +, readline +, sqlite +, testers +, zlib +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "pgcopydb"; + version = "0.15"; + + src = fetchFromGitHub { + owner = "dimitri"; + repo = "pgcopydb"; + rev = "v${finalAttrs.version}"; + hash = "sha256-m9iIF8h6V3wWLUQuPntXtRAh16RrmR3uqZZIljGCY08="; + }; + + nativeBuildInputs = [ + pkg-config + ]; + + buildInputs = [ + libkrb5 + openssl + postgresql + readline + sqlite + zlib + ] ++ lib.optionals stdenv.isLinux [ + pam + ]; + + hardeningDisable = [ "format" ]; + + installPhase = '' + runHook preInstall + + install -D -t $out/bin/ src/bin/pgcopydb/pgcopydb + + runHook postInstall + ''; + + passthru.tests = { + version = testers.testVersion { + package = finalAttrs.finalPackage; + }; + }; + + meta = with lib; { + description = "Copy a Postgres database to a target Postgres server (pg_dump | pg_restore on steroids"; + homepage = "https://github.com/dimitri/pgcopydb"; + changelog = "https://github.com/dimitri/pgcopydb/blob/${finalAttrs.src.rev}/CHANGELOG.md"; + license = licenses.postgresql; + maintainers = with maintainers; [ marsam ]; + mainProgram = "pgcopydb"; + platforms = platforms.all; + }; +}) |