Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchzip, 5 replaceVars, 6}: 7 8{ version, src, ... }: 9 10let 11 inherit (stdenv.hostPlatform) system; 12 selectSystem = 13 attrs: attrs.${system} or (throw "metadata_god: ${stdenv.hostPlatform.system} is not supported"); 14 suffix = selectSystem { 15 x86_64-linux = "linux-x64"; 16 aarch64-linux = "linux-arm64"; 17 }; 18 metadata_god = fetchzip { 19 url = "https://github.com/KRTirtho/frb_plugins/releases/download/metadata_god-v0.5.3/linux.tar.gz"; 20 hash = "sha256-ZR/q1dF8w4Yab6dRRiS5ZCChVnoecFUrtGiHXGlll9A="; 21 stripRoot = false; 22 }; 23in 24stdenv.mkDerivation { 25 pname = "metadata_god"; 26 inherit version src; 27 inherit (src) passthru; 28 29 patches = [ 30 (replaceVars ./metadata_god.patch { 31 output_lib = "${metadata_god}/${suffix}/libmetadata_god.so"; 32 }) 33 ]; 34 35 installPhase = '' 36 runHook preInstall 37 38 cp -r . $out 39 40 runHook postInstall 41 ''; 42 43 meta.sourceProvenance = with lib.sourceTypes; [ binaryBytecode ]; 44}