lol
at 25.11-pre 61 lines 1.5 kB view raw
1{ 2 stdenv, 3 lib, 4 fetchurl, 5 kernel, 6 kernelModuleMakeFlags, 7 nixosTests, 8 flex, 9 coccinelle, 10 python3, 11}: 12 13stdenv.mkDerivation (finalAttrs: { 14 pname = "drbd"; 15 version = "9.2.12"; 16 17 src = fetchurl { 18 url = "https://pkg.linbit.com//downloads/drbd/9/drbd-${finalAttrs.version}.tar.gz"; 19 hash = "sha256-amdcyPTynGTaaZh558Q3KnGuGyyLJKnsY+NBCO26Jq0="; 20 }; 21 22 hardeningDisable = [ "pic" ]; 23 24 nativeBuildInputs = [ 25 kernel.moduleBuildDependencies 26 flex 27 coccinelle 28 python3 29 ]; 30 31 enableParallelBuilding = true; 32 33 makeFlags = kernelModuleMakeFlags ++ [ 34 "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" 35 "KVER=${kernel.version}" 36 "INSTALL_MOD_PATH=${placeholder "out"}" 37 "M=$(sourceRoot)" 38 "SPAAS=false" 39 ]; 40 41 installFlags = [ "INSTALL_MOD_PATH=${placeholder "out"}" ]; 42 43 postPatch = '' 44 patchShebangs . 45 substituteInPlace Makefile --replace 'SHELL=/bin/bash' 'SHELL=${builtins.getEnv "SHELL"}' 46 ''; 47 48 passthru.tests.drbd-driver = nixosTests.drbd-driver; 49 50 meta = with lib; { 51 homepage = "https://github.com/LINBIT/drbd"; 52 description = "LINBIT DRBD kernel module"; 53 license = licenses.gpl2Plus; 54 platforms = platforms.linux; 55 maintainers = with maintainers; [ birkb ]; 56 longDescription = '' 57 DRBD is a software-based, shared-nothing, replicated storage solution 58 mirroring the content of block devices (hard disks, partitions, logical volumes, and so on) between hosts. 59 ''; 60 }; 61})