Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 buildPackages, 6 unstableGitUpdater, 7}: 8 9stdenv.mkDerivation { 10 pname = "eigenmath"; 11 version = "340-unstable-2025-05-05"; 12 13 src = fetchFromGitHub { 14 owner = "georgeweigt"; 15 repo = "eigenmath"; 16 rev = "94fee6b02ebd4cd718dd9ea45583a6af2129dd28"; 17 hash = "sha256-2bdO0nRXhDZlEmGRfNf6g9zwc65Ih9Ymlo6PxlpAxes="; 18 }; 19 20 checkPhase = 21 let 22 emulator = stdenv.hostPlatform.emulator buildPackages; 23 in 24 '' 25 runHook preCheck 26 27 for testcase in selftest1 selftest2; do 28 ${emulator} ./eigenmath "test/$testcase" 29 done 30 31 runHook postCheck 32 ''; 33 34 installPhase = '' 35 runHook preInstall 36 install -Dm555 eigenmath "$out/bin/eigenmath" 37 runHook postInstall 38 ''; 39 40 doCheck = true; 41 42 passthru = { 43 updateScript = unstableGitUpdater { }; 44 }; 45 46 meta = with lib; { 47 description = "Computer algebra system written in C"; 48 mainProgram = "eigenmath"; 49 homepage = "https://georgeweigt.github.io"; 50 license = licenses.bsd2; 51 maintainers = with maintainers; [ nickcao ]; 52 platforms = platforms.unix; 53 }; 54}