summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Hoeg <peter@hoeg.com>2018-01-13 13:57:43 +0800
committerPeter Hoeg <peter@hoeg.com>2018-01-17 21:59:55 +0800
commit7177c9e336af715f08c0b1fa0571ba702120f4a1 (patch)
treeb509f7be13eb0b0cb446d40ff534be23b774ba8e
parentf607771d0f5e4fa905afff1c772febd9f3103e1a (diff)
downloadnixlib-7177c9e336af715f08c0b1fa0571ba702120f4a1.tar
nixlib-7177c9e336af715f08c0b1fa0571ba702120f4a1.tar.gz
nixlib-7177c9e336af715f08c0b1fa0571ba702120f4a1.tar.bz2
nixlib-7177c9e336af715f08c0b1fa0571ba702120f4a1.tar.lz
nixlib-7177c9e336af715f08c0b1fa0571ba702120f4a1.tar.xz
nixlib-7177c9e336af715f08c0b1fa0571ba702120f4a1.tar.zst
nixlib-7177c9e336af715f08c0b1fa0571ba702120f4a1.zip
physfs: 2.0.3 -> 3.0.1
-rw-r--r--pkgs/development/libraries/physfs/default.nix50
-rw-r--r--pkgs/top-level/all-packages.nix4
2 files changed, 37 insertions, 17 deletions
diff --git a/pkgs/development/libraries/physfs/default.nix b/pkgs/development/libraries/physfs/default.nix
index 43bcef0f2d3c..e29af17f35df 100644
--- a/pkgs/development/libraries/physfs/default.nix
+++ b/pkgs/development/libraries/physfs/default.nix
@@ -1,23 +1,41 @@
-{stdenv, fetchurl, cmake}:
+{ stdenv, fetchurl, cmake, doxygen
+, zlib }:
 
-stdenv.mkDerivation rec {
-  name = "physfs-2.0.3";
+let
+  generic = version: sha256:
+  stdenv.mkDerivation rec {
+    name = "physfs-${version}";
 
-  src = fetchurl {
-    url = "${meta.homepage}/downloads/${name}.tar.bz2";
-    sha256 = "0sbbyqzqhyf0g68fcvvv20n3928j0x6ik1njmhn1yigvq2bj11na";
-  };
+    src = fetchurl {
+      url = "${meta.homepage}/downloads/${name}.tar.bz2";
+      inherit sha256;
+    };
+
+    nativeBuildInputs = [ cmake doxygen ];
+
+    buildInputs = [ zlib ];
 
-  nativeBuildInputs = [ cmake ];
+    enableParallelBuilding = true;
 
-  patchPhase = ''
-    sed s,-Werror,, -i CMakeLists.txt
-  '';
+    patchPhase = ''
+      sed s,-Werror,, -i CMakeLists.txt
+    '';
 
-  meta = {
-    homepage = http://icculus.org/physfs/;
-    description = "Library to provide abstract access to various archives";
-    license = stdenv.lib.licenses.free;
-    platforms = stdenv.lib.platforms.linux;
+    doInstallCheck = true;
+
+    installCheckPhase = ''
+      ./test_physfs --version
+    '';
+
+    meta = with stdenv.lib; {
+      homepage = http://icculus.org/physfs/;
+      description = "Library to provide abstract access to various archives";
+      license = licenses.free;
+      platforms = platforms.linux;
+    };
   };
+
+in {
+  physfs_2 = generic "2.0.3" "0sbbyqzqhyf0g68fcvvv20n3928j0x6ik1njmhn1yigvq2bj11na";
+  physfs   = generic "3.0.1" "1wgj2zqpnfbnyyi1i7bq5pshcc9n5cvwlpzp8im67nb8662ryyxp";
 }
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index f0d310984ffe..62af469d59b4 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -10443,7 +10443,9 @@ with pkgs;
 
   phonon-backend-vlc = callPackage ../development/libraries/phonon/backends/vlc.nix {};
 
-  physfs = callPackage ../development/libraries/physfs { };
+  inherit (callPackage ../development/libraries/physfs { })
+    physfs_2
+    physfs;
 
   pipelight = callPackage ../tools/misc/pipelight {
     stdenv = stdenv_32bit;