at 24.05-pre 45 lines 1.3 kB view raw
1{ lib 2, stdenv 3, fetchFromGitHub 4, premake4 5}: 6 7stdenv.mkDerivation { 8 pname = "bootil"; 9 version = "unstable-2019-11-18"; 10 11 src = fetchFromGitHub { 12 owner = "garrynewman"; 13 repo = "bootil"; 14 rev = "beb4cec8ad29533965491b767b177dc549e62d23"; 15 sha256 = "1njdj6nvmwf7j2fwqbyvd1cf5l52797vk2wnsliylqdzqcjmfpij"; 16 }; 17 18 # Avoid guessing where files end up. Just use current directory. 19 postPatch = '' 20 substituteInPlace projects/premake4.lua \ 21 --replace 'location ( os.get() .. "/" .. _ACTION )' 'location ( ".." )' 22 substituteInPlace projects/bootil.lua \ 23 --replace 'targetdir ( "../lib/" .. os.get() .. "/" .. _ACTION )' 'targetdir ( ".." )' 24 ''; 25 26 nativeBuildInputs = [ premake4 ]; 27 28 premakefile = "projects/premake4.lua"; 29 30 installPhase = '' 31 install -D libbootil_static.a $out/lib/libbootil_static.a 32 cp -r include $out 33 ''; 34 35 meta = with lib; { 36 description = "Garry Newman's personal utility library"; 37 homepage = "https://github.com/garrynewman/bootil"; 38 # License unsure - see https://github.com/garrynewman/bootil/issues/21 39 license = licenses.free; 40 maintainers = with maintainers; [ abigailbuccaneer ]; 41 # Build uses `-msse` and `-mfpmath=sse` 42 platforms = platforms.all; 43 badPlatforms = [ "aarch64-linux" ]; 44 }; 45}