about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/sokol/default.nix
blob: b84f42490e3386711fee45027a76377c25947e08 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{ lib, stdenv, fetchFromGitHub }:

stdenv.mkDerivation {
  pname = "sokol";
  version = "unstable-2023-08-04";

  src = fetchFromGitHub {
    owner = "floooh";
    repo = "sokol";
    rev = "47d92ff86298fc96b3b84d93d0ee8c8533d3a2d2";
    sha256 = "sha256-TsM5wK9a2ectrAY8VnrMPaxCNV3e1yW92SBBCHgs+0k=";
  };

  dontBuild = true;
  dontConfigure = true;

  installPhase = ''
    runHook preInstall

    mkdir -p $out/include/sokol
    cp *.h $out/include/sokol/
    cp -R util $out/include/sokol/util

    runHook postInstall
  '';

  meta = with lib; {
    description = "Minimal cross-platform standalone C headers";
    homepage = "https://github.com/floooh/sokol";
    license = licenses.zlib;
    platforms = platforms.all;
    maintainers = with maintainers; [ jonnybolton ];
  };
}