Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 stdenv, 3 lib, 4 fetchFromGitHub, 5}: 6 7stdenv.mkDerivation (finalAttrs: { 8 pname = "construct"; 9 version = "0.1.0"; 10 11 src = fetchFromGitHub { 12 owner = "Thomas-de-Bock"; 13 repo = "construct"; 14 rev = finalAttrs.version; 15 hash = "sha256-ENso0y7yEaXzGXzZOnlZ1L7+j/qayJL+f55/NYLz2ew="; 16 }; 17 18 postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' 19 substituteInPlace Makefile \ 20 --replace g++ c++ 21 ''; 22 23 makeTarget = "main"; 24 25 installPhase = '' 26 runHook preInstall 27 install -Dm755 bin/construct -t $out/bin 28 runHook postInstall 29 ''; 30 31 meta = with lib; { 32 description = "Construct is an abstraction over x86 NASM Assembly"; 33 longDescription = "Construct adds features such as while loops, if statements, scoped macros and function-call syntax to NASM Assembly."; 34 homepage = "https://github.com/Thomas-de-Bock/construct"; 35 maintainers = with maintainers; [ rucadi ]; 36 platforms = platforms.all; 37 license = licenses.mit; 38 mainProgram = "construct"; 39 }; 40})