-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshell.nix
61 lines (56 loc) · 1.55 KB
/
shell.nix
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
let
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-23.11";
pkgs = import nixpkgs { config = {}; overlays = []; };
frameworks = pkgs.darwin.apple_sdk.frameworks;
chipmunk = pkgs.stdenv.mkDerivation rec {
pname = "chipmunk";
majorVersion = "7";
version = "${majorVersion}.0.3";
src = pkgs.fetchurl {
url = "https://chipmunk-physics.net/release/Chipmunk-${majorVersion}.x/Chipmunk-${version}.tgz";
sha256 = "06j9cfxsyrrnyvl7hsf55ac5mgff939mmijliampphlizyg0r2q4";
};
patches = [
(pkgs.fetchpatch {
url = "https://github.com/slembcke/Chipmunk2D/commit/9a051e6fb970c7afe09ce2d564c163b81df050a8.patch";
sha256 = "0ps8bjba1k544vcdx5w0qk7gcjq94yfigxf67j50s63yf70k2n70";
})
];
nativeBuildInputs = [ pkgs.cmake ]
++ pkgs.lib.optionals pkgs.stdenv.isDarwin [
pkgs.darwin.apple_sdk.frameworks.Cocoa
];
cmakeFlags = [
"-DBUILD_DEMOS=OFF"
];
meta = with pkgs.lib; {
description = "A fast and lightweight 2D game physics library";
homepage = "http://chipmunk2d.net/";
license = licenses.mit;
platforms = platforms.all;
};
};
in
pkgs.mkShell {
packages = with pkgs; [
zig
chipmunk
SDL2
SDL2_ttf
SDL2_mixer
SDL2_image
iconv
]
++ pkgs.lib.optionals pkgs.stdenv.isDarwin (with pkgs.darwin.apple_sdk.frameworks; [
QuartzCore
CoreAudio
Metal
ForceFeedback
CoreHaptics
Carbon
GameController
Cocoa
IOKit
AudioToolbox
]);
}