Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchFromGitHub }: 2 3stdenv.mkDerivation (finalAttrs: { 4 pname = "libcs50"; 5 version = "11.0.3"; 6 7 src = fetchFromGitHub { 8 owner = "cs50"; 9 repo = "libcs50"; 10 rev = "v${finalAttrs.version}"; 11 hash = "sha256-G6QayPGR4lkeFuUYsFszekLAzzpA3hhIRmqt/OB0cdY="; 12 }; 13 14 installPhase = '' 15 runHook preInstall 16 mkdir $out 17 cp -R build/lib $out/lib 18 cp -R build/include $out/include 19 ln -sf $out/lib/libcs50.so.11.0.3 $out/lib/libcs50.so.11 20 runHook postInstall 21 ''; 22 23 meta = with lib; { 24 homepage = "https://github.com/cs50/libcs50"; 25 description = "CS50 Library for C"; 26 license = licenses.gpl3Only; 27 }; 28})