about summary refs log tree commit diff
path: root/pkgs/by-name/gu/guile-chickadee/package.nix
blob: f4a454bf4e45f595f5ca1fe58e12c02524a7aa87 (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
{ lib
, stdenv
, fetchurl
, autoreconfHook
, makeWrapper
, testers
, guile
, pkg-config
, texinfo
, freetype
, libjpeg_turbo
, libpng
, libvorbis
, mpg123
, openal
, readline
, guile-opengl
, guile-sdl2
, guile-chickadee
}:
stdenv.mkDerivation (finalAttrs: {
  pname = "guile-chickadee";
  version = "0.10.0";

  src = fetchurl {
    url = "https://files.dthompson.us/chickadee/chickadee-${finalAttrs.version}.tar.gz";
    hash = "sha256-Ey9TtuWaGlHG2cYYwqJIt2RX7XNUW28OGl/kuPUCD3U=";
  };

  strictDeps = true;

  nativeBuildInputs = [
    makeWrapper
    autoreconfHook
    guile
    pkg-config
    texinfo
  ];

  buildInputs = [
    freetype
    guile
    libjpeg_turbo
    libpng
    libvorbis
    mpg123
    openal
    readline
  ];

  propagatedBuildInputs = [
    guile-opengl
    guile-sdl2
  ];

  makeFlags = [ "GUILE_AUTO_COMPILE=0" ];

  postInstall = ''
    wrapProgram $out/bin/chickadee \
      --prefix GUILE_LOAD_PATH : "$out/${guile.siteDir}:$GUILE_LOAD_PATH" \
      --prefix GUILE_LOAD_COMPILED_PATH : "$out/${guile.siteCcacheDir}:$GUILE_LOAD_COMPILED_PATH"
  '';

  passthru.tests.version = testers.testVersion {
    package = guile-chickadee;
    command = "chickadee -v";
  };

  doCheck = !stdenv.isDarwin;

  meta = with lib; {
    description = "Game development toolkit for Guile Scheme with SDL2 and OpenGL";
    homepage = "https://dthompson.us/projects/chickadee.html";
    license = licenses.asl20;
    maintainers = with maintainers; [ chito ];
    mainProgram = "chickadee";
    platforms = guile.meta.platforms;
    broken = stdenv.isDarwin;
  };
})