Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at netboot-syslinux-multiplatform 50 lines 1.3 kB view raw
1{ lib 2, stdenv 3, fetchurl 4, perlPackages 5, makeWrapper 6}: 7 8stdenv.mkDerivation rec { 9 pname = "mylvmbackup"; 10 version = "0.16"; 11 12 src = fetchurl { 13 url = "https://www.lenzg.net/mylvmbackup/${pname}-${version}.tar.gz"; 14 sha256 = "sha256-vb7M3EPIrxIz6jUwm241fzaEz2czqdCObrFgSOSgJRU="; 15 }; 16 17 nativeBuildInputs = [ makeWrapper ]; 18 buildInputs = [ perlPackages.perl ]; 19 20 dontConfigure = true; 21 22 postPatch = '' 23 patchShebangs mylvmbackup 24 substituteInPlace Makefile \ 25 --replace "prefix = /usr/local" "prefix = ${builtins.placeholder "out"}" \ 26 --replace "sysconfdir = /etc" "sysconfdir = ${builtins.placeholder "out"}/etc" \ 27 --replace "/usr/bin/install" "install" 28 ''; 29 30 postInstall = '' 31 wrapProgram "$out/bin/mylvmbackup" \ 32 --prefix PERL5LIB : "${perlPackages.makePerlPath ( 33 with perlPackages; [ 34 ConfigIniFiles 35 DBDmysql 36 DBI 37 TimeDate 38 FileCopyRecursive 39 ] 40 )}" 41 ''; 42 43 meta = { 44 homepage = "https://www.lenzg.net/mylvmbackup/"; 45 description = "a tool for quickly creating full physical backups of a MySQL server's data files"; 46 license = lib.licenses.gpl2Only; 47 maintainers = with lib.maintainers; [ ryantm ]; 48 platforms = with lib.platforms; linux; 49 }; 50}