Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at release-18.03 43 lines 1.3 kB view raw
1{ stdenv, fetchFromGitHub, fetchpatch, premake4 }: 2 3stdenv.mkDerivation rec { 4 name = "bootil-unstable-2015-12-17"; 5 6 meta = { 7 description = "Garry Newman's personal utility library"; 8 homepage = https://github.com/garrynewman/bootil; 9 # License unsure - see https://github.com/garrynewman/bootil/issues/21 10 license = stdenv.lib.licenses.free; 11 maintainers = [ stdenv.lib.maintainers.abigailbuccaneer ]; 12 platforms = stdenv.lib.platforms.all; 13 }; 14 15 src = fetchFromGitHub { 16 owner = "garrynewman"; 17 repo = "bootil"; 18 rev = "1d3e321fc2be359e2350205b8c7f1cad2164ee0b"; 19 sha256 = "03wq526r80l2px797hd0n5m224a6jibwipcbsvps6l9h740xabzg"; 20 }; 21 22 patches = [ (fetchpatch { 23 url = https://github.com/garrynewman/bootil/pull/22.patch; 24 name = "github-pull-request-22.patch"; 25 sha256 = "1qf8wkv00pb9w1aa0dl89c8gm4rmzkxfl7hidj4gz0wpy7a24qa2"; 26 })]; 27 28 platform = 29 if stdenv.isLinux then "linux" 30 else if stdenv.isDarwin then "macosx" 31 else throw "unrecognized system ${stdenv.system}"; 32 33 buildInputs = [ premake4 ]; 34 35 configurePhase = "premake4 --file=projects/premake4.lua gmake"; 36 makeFlags = "-C projects/${platform}/gmake"; 37 38 installPhase = '' 39 mkdir -p $out/lib 40 cp lib/${platform}/gmake/libbootil_static.a $out/lib/ 41 cp -r include $out/ 42 ''; 43}