Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 stdenv, 3 fetchFromGitHub, 4 lib, 5}: 6 7stdenv.mkDerivation rec { 8 pname = "tinyfetch"; 9 version = "0.2"; 10 11 src = fetchFromGitHub { 12 owner = "abrik1"; 13 repo = "tinyfetch"; 14 tag = version; 15 hash = "sha256-I0OurcPKKZntZn7Bk9AnWdpSrU9olGp7kghdOajPDeQ="; 16 }; 17 18 sourceRoot = "${src.name}/src"; 19 20 buildPhase = '' 21 runHook preBuild 22 $CC tinyfetch.c -o tinyfetch 23 runHook postBuild 24 ''; 25 26 installPhase = '' 27 runHook preInstall 28 install -Dm755 tinyfetch -t $out/bin 29 runHook postInstall 30 ''; 31 32 meta = { 33 description = "Simple fetch in C which is tiny and fast"; 34 homepage = "https://github.com/abrik1/tinyfetch"; 35 license = lib.licenses.mit; 36 mainProgram = "tinyfetch"; 37 maintainers = with lib.maintainers; [ pagedMov ]; 38 platforms = lib.platforms.unix; 39 }; 40}