Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5}: 6 7stdenv.mkDerivation rec { 8 pname = "convbin"; 9 version = "5.1"; 10 11 src = fetchFromGitHub { 12 owner = "mateoconlechuga"; 13 repo = "convbin"; 14 tag = "v${version}"; 15 sha256 = "sha256-k0hwBdjOweFoAE6jzhlRFZsMOVDDpi4R4LHA7SwO3os="; 16 fetchSubmodules = true; 17 }; 18 19 postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' 20 substituteInPlace Makefile --replace "-flto" "" 21 ''; 22 23 makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ]; 24 25 checkPhase = '' 26 pushd test 27 patchShebangs test.sh 28 ./test.sh 29 popd 30 ''; 31 32 doCheck = true; 33 34 installPhase = '' 35 install -Dm755 bin/convbin $out/bin/convbin 36 ''; 37 38 meta = { 39 description = "Converts files to other formats"; 40 longDescription = '' 41 This program is used to convert files to other formats, 42 specifically for the TI84+CE and related calculators. 43 ''; 44 homepage = "https://github.com/mateoconlechuga/convbin"; 45 license = lib.licenses.bsd3; 46 maintainers = with lib.maintainers; [ ]; 47 platforms = lib.platforms.all; 48 mainProgram = "convbin"; 49 }; 50}