about summary refs log tree commit diff
path: root/pkgs/development/libraries/chipmunk
diff options
context:
space:
mode:
authorJoachim Fasting <joachifm@fastmail.fm>2015-05-02 12:26:50 +0200
committerJoachim Fasting <joachifm@fastmail.fm>2015-05-02 13:34:22 +0200
commitd1df0cd87370ce9d96fcff5c1a86dbe1e1882227 (patch)
tree468786d61e74e59b08c34c0047d851f69c4d93c9 /pkgs/development/libraries/chipmunk
parent2d8cfe76a9e4f05e391d30f1654d45dee5993b8a (diff)
chipmunk: 6.1.5 -> 7.0.0
Diffstat (limited to 'pkgs/development/libraries/chipmunk')
-rw-r--r--pkgs/development/libraries/chipmunk/default.nix52
1 files changed, 21 insertions, 31 deletions
diff --git a/pkgs/development/libraries/chipmunk/default.nix b/pkgs/development/libraries/chipmunk/default.nix
index 63c5959960ac7..52990097a2305 100644
--- a/pkgs/development/libraries/chipmunk/default.nix
+++ b/pkgs/development/libraries/chipmunk/default.nix
@@ -1,39 +1,29 @@
-args :  
-let 
-  lib = args.lib;
-  fetchurl = args.fetchurl;
-  fullDepEntry = args.fullDepEntry;
+{ stdenv, fetchurl, cmake, freeglut, mesa, glfw2, glew, libX11, xproto
+, inputproto, libXi, libXmu
+}:
+
+stdenv.mkDerivation rec {
+  name = "chipmunk-${version}";
+  majorVersion = "7";
+  version = "${majorVersion}.0.0";
 
-  version = lib.attrByPath ["version"] "6.1.5" args;
-  majorVersion = lib.attrByPath ["majorVersion"] "6" args;
-  buildInputs = with args; [
-    cmake freeglut mesa
-    libX11 xproto inputproto libXi libXmu
-  ];
-in
-rec {
   src = fetchurl {
-    url = "http://files.slembcke.net/chipmunk/release/Chipmunk-${majorVersion}.x/Chipmunk-${version}.tgz";
-    sha256 = "0rhsgl32k6bja2ipzprf7iv3lscbl8h8s9il625rp966jvq6phy7";
+    url = "https://chipmunk-physics.net/release/Chipmunk-${majorVersion}.x/Chipmunk-${version}.tgz";
+    sha256 = "1kaii8wgvp0kgn2p22jm9smyqlws4p5dg8j23jaiasx9jq1kiaql";
   };
 
-  inherit buildInputs;
-  configureFlags = [];
-  
-  /* doConfigure should be specified separately */
-  phaseNames = ["genMakefile" "doMakeInstall" "demoInstall"];
-
-  genMakefile = fullDepEntry ''
-    cmake -D CMAKE_INSTALL_PREFIX=$out . 
-  '' ["minInit" "addInputs" "doUnpack"];
+  buildInputs =
+    [ cmake freeglut mesa glfw2 glew libX11 xproto inputproto libXi libXmu ];
 
-  demoInstall = fullDepEntry(''
+  postInstall = ''
     mkdir -p $out/bin
-    cp Demo/chipmunk_demos $out/bin
-  '') ["doMakeInstall" "defEnsureDir"];
-      
-  name = "chipmunk-" + version;
-  meta = {
-    description = "2D physics engine";
+    cp demo/chipmunk_demos $out/bin
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A fast and lightweight 2D game physics library";
+    homepage = http://chipmunk2d.net/;
+    license = licenses.mit;
+    platforms = platforms.unix; # supports Windows and MacOS as well, but those require more work
   };
 }