Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at python-updates 45 lines 1.0 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 makeWrapper, 6 bash, 7 docker, 8}: 9 10stdenv.mkDerivation (finalAttrs: { 11 pname = "docker-vackup"; 12 version = "0-unstable-2024-11-01"; 13 14 src = fetchFromGitHub { 15 owner = "BretFisher"; 16 repo = "docker-vackup"; 17 rev = "2a8a73136302af0bebeb7f210fc14be868ab2958"; 18 hash = "sha256-/iMQNnkRNTMiw+E6Wv/WatRB0DnapOVWqqszluUFed4="; 19 }; 20 21 nativeBuildInputs = [ makeWrapper ]; 22 23 patchPhase = '' 24 substituteInPlace vackup --replace-fail "/bin/bash" "${lib.getExe bash}" 25 ''; 26 27 installPhase = '' 28 runHook preInstall 29 30 install -Dm755 vackup "$out/bin/vackup" 31 32 wrapProgram "$out/bin/vackup" \ 33 --suffix PATH : ${lib.makeBinPath [ docker ]} 34 35 runHook postInstall 36 ''; 37 38 meta = { 39 description = "Shell script to backup and restore Docker volumes"; 40 homepage = "https://github.com/BretFisher/docker-vackup"; 41 license = lib.licenses.unlicense; 42 maintainers = with lib.maintainers; [ liberodark ]; 43 mainProgram = "vackup"; 44 }; 45})