couchdb-dump: init at 0-unstable-2021-07-24 (#409520)
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
--- a/couchdb-dump.sh 1970-01-01 01:00:01.000000000 +0100
|
||||
+++ b/couchdb-dump.sh 2025-05-21 10:08:22.092922719 +0200
|
||||
@@ -182,15 +182,8 @@
|
||||
fi
|
||||
file_name_orig=$file_name
|
||||
|
||||
-# Get OS TYPE (Linux for Linux, Darwin for MacOSX)
|
||||
-os_type=`uname -s`
|
||||
+sed_cmd="@sed_cmd@";
|
||||
|
||||
-# Pick sed or gsed
|
||||
-if [ "$os_type" = "FreeBSD" ]||[ "$os_type" = "Darwin" ]; then
|
||||
- sed_cmd="gsed";
|
||||
-else
|
||||
- sed_cmd="sed";
|
||||
-fi
|
||||
## Make sure it's installed
|
||||
echo | $sed_cmd 's/a//' >/dev/null 2>&1
|
||||
if [ ! $? = 0 ]; then
|
||||
@@ -0,0 +1,64 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
makeWrapper,
|
||||
coreutils,
|
||||
curl,
|
||||
gawk,
|
||||
gnugrep,
|
||||
gnused,
|
||||
gzip,
|
||||
sysctl,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "couchdb-dump";
|
||||
version = "0-unstable-2021-07-24";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "danielebailo";
|
||||
repo = "couchdb-dump";
|
||||
rev = "f59fa242d34e505cb22ecb2ad1ffba0f6402978c";
|
||||
hash = "sha256-fBvbt/1ukpvcu8Aa/uAmVzw0ms8Sp35WLJPvHs9E9Bc=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
patches = [ ./gsed.patch ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -D couchdb-dump.sh $out/bin/couchdb-dump
|
||||
|
||||
substituteInPlace $out/bin/couchdb-dump \
|
||||
--subst-var-by sed_cmd ${lib.getExe gnused}
|
||||
|
||||
wrapProgram $out/bin/couchdb-dump --prefix PATH : ${
|
||||
lib.makeBinPath (
|
||||
[
|
||||
coreutils
|
||||
curl
|
||||
gawk
|
||||
gnugrep
|
||||
gnused
|
||||
gzip
|
||||
]
|
||||
++ lib.optionals (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isFreeBSD) [
|
||||
sysctl
|
||||
]
|
||||
)
|
||||
}
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
inherit (finalAttrs.src.meta) homepage;
|
||||
|
||||
description = "Bash command line scripts to dump & restore a couchdb database";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ DamienCassou ];
|
||||
mainProgram = "couchdb-dump";
|
||||
};
|
||||
})
|
||||
Reference in New Issue
Block a user