couchdb-dump: init at 0-unstable-2021-07-24

+83
+19
pkgs/by-name/co/couchdb-dump/gsed.patch
··· 1 + --- a/couchdb-dump.sh 1970-01-01 01:00:01.000000000 +0100 2 + +++ b/couchdb-dump.sh 2025-05-21 10:08:22.092922719 +0200 3 + @@ -182,15 +182,8 @@ 4 + fi 5 + file_name_orig=$file_name 6 + 7 + -# Get OS TYPE (Linux for Linux, Darwin for MacOSX) 8 + -os_type=`uname -s` 9 + +sed_cmd="@sed_cmd@"; 10 + 11 + -# Pick sed or gsed 12 + -if [ "$os_type" = "FreeBSD" ]||[ "$os_type" = "Darwin" ]; then 13 + - sed_cmd="gsed"; 14 + -else 15 + - sed_cmd="sed"; 16 + -fi 17 + ## Make sure it's installed 18 + echo | $sed_cmd 's/a//' >/dev/null 2>&1 19 + if [ ! $? = 0 ]; then
+64
pkgs/by-name/co/couchdb-dump/package.nix
··· 1 + { 2 + stdenv, 3 + lib, 4 + fetchFromGitHub, 5 + makeWrapper, 6 + coreutils, 7 + curl, 8 + gawk, 9 + gnugrep, 10 + gnused, 11 + gzip, 12 + sysctl, 13 + }: 14 + stdenv.mkDerivation (finalAttrs: { 15 + pname = "couchdb-dump"; 16 + version = "0-unstable-2021-07-24"; 17 + 18 + src = fetchFromGitHub { 19 + owner = "danielebailo"; 20 + repo = "couchdb-dump"; 21 + rev = "f59fa242d34e505cb22ecb2ad1ffba0f6402978c"; 22 + hash = "sha256-fBvbt/1ukpvcu8Aa/uAmVzw0ms8Sp35WLJPvHs9E9Bc="; 23 + }; 24 + 25 + nativeBuildInputs = [ makeWrapper ]; 26 + 27 + patches = [ ./gsed.patch ]; 28 + 29 + installPhase = '' 30 + runHook preInstall 31 + 32 + install -D couchdb-dump.sh $out/bin/couchdb-dump 33 + 34 + substituteInPlace $out/bin/couchdb-dump \ 35 + --subst-var-by sed_cmd ${lib.getExe gnused} 36 + 37 + wrapProgram $out/bin/couchdb-dump --prefix PATH : ${ 38 + lib.makeBinPath ( 39 + [ 40 + coreutils 41 + curl 42 + gawk 43 + gnugrep 44 + gnused 45 + gzip 46 + ] 47 + ++ lib.optionals (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isFreeBSD) [ 48 + sysctl 49 + ] 50 + ) 51 + } 52 + 53 + runHook postInstall 54 + ''; 55 + 56 + meta = { 57 + inherit (finalAttrs.src.meta) homepage; 58 + 59 + description = "Bash command line scripts to dump & restore a couchdb database"; 60 + license = lib.licenses.mit; 61 + maintainers = with lib.maintainers; [ DamienCassou ]; 62 + mainProgram = "couchdb-dump"; 63 + }; 64 + })