Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5}: 6 7{ version, src, ... }: 8 9let 10 sentry-native = fetchFromGitHub { 11 owner = "getsentry"; 12 repo = "sentry-native"; 13 tag = "0.8.4"; 14 hash = "sha256-0NLxu+aelp36m3ocPhyYz3LDeq310fkyu8WSpZML3Pc="; 15 }; 16in 17stdenv.mkDerivation (finalAttrs: { 18 pname = "sentry_flutter"; 19 inherit version src; 20 inherit (src) passthru; 21 22 postPatch = lib.optionalString (lib.versionAtLeast version "8.10.0") '' 23 sed -i "s|GIT_REPOSITORY.*|SOURCE_DIR "${sentry-native}"|" sentry-native/sentry-native.cmake 24 sed -i '/GIT_TAG/d' sentry-native/sentry-native.cmake 25 ''; 26 27 installPhase = '' 28 runHook preInstall 29 30 cp -r . $out 31 32 runHook postInstall 33 ''; 34})