summary refs log tree commit diff
path: root/pkgs/games/devilutionx/default.nix
diff options
context:
space:
mode:
authorKarol Chmist <karol@chmist.com>2019-07-19 21:50:45 +0200
committerKarol Chmist <karol@chmist.com>2019-08-06 14:40:41 +0200
commit983c30f5ab3f95792a24baff9adb61eb226eecf8 (patch)
tree7ce99e575fbd64b561cbd26fc70e5d232e01459a /pkgs/games/devilutionx/default.nix
parent19180dfd5b6fcd50d84922438c7bf646e0fcb4ac (diff)
downloadnixpkgs-983c30f5ab3f95792a24baff9adb61eb226eecf8.tar
nixpkgs-983c30f5ab3f95792a24baff9adb61eb226eecf8.tar.gz
nixpkgs-983c30f5ab3f95792a24baff9adb61eb226eecf8.tar.bz2
nixpkgs-983c30f5ab3f95792a24baff9adb61eb226eecf8.tar.lz
nixpkgs-983c30f5ab3f95792a24baff9adb61eb226eecf8.tar.xz
nixpkgs-983c30f5ab3f95792a24baff9adb61eb226eecf8.tar.zst
nixpkgs-983c30f5ab3f95792a24baff9adb61eb226eecf8.zip
devilutionx: init at unstable-2019-07-28
Diffstat (limited to 'pkgs/games/devilutionx/default.nix')
-rw-r--r--pkgs/games/devilutionx/default.nix37
1 files changed, 37 insertions, 0 deletions
diff --git a/pkgs/games/devilutionx/default.nix b/pkgs/games/devilutionx/default.nix
new file mode 100644
index 00000000000..52d3bdd5b79
--- /dev/null
+++ b/pkgs/games/devilutionx/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchFromGitHub, cmake, SDL2, SDL2_mixer, SDL2_ttf, libsodium, pkg-config }:
+stdenv.mkDerivation rec {
+  version = "unstable-2019-07-28";
+  pname = "devilutionx";
+
+  src = fetchFromGitHub {
+    owner = "diasurgical";
+    repo = "devilutionX";
+    rev = "b2f358874705598ec139f290b21e340c73d250f6";
+    sha256 = "0s812km118qq5pzlzvzfndvag0mp6yzvm69ykc97frdiq608zw4f";
+  };
+
+  NIX_CFLAGS_COMPILE = "-I${SDL2_ttf}/include/SDL2";
+
+  # compilation will fail due to -Werror=format-security
+  hardeningDisable = [ "format" ];
+
+  nativeBuildInputs = [ pkg-config cmake ];
+  buildInputs = [ libsodium SDL2 SDL2_mixer SDL2_ttf ];
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/bin
+    cp devilutionx $out/bin
+
+    runHook postInstall
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/diasurgical/devilutionX";
+    description = "Diablo build for modern operating systems";
+    license = licenses.unlicense;
+    maintainers = [ maintainers.karolchmist ];
+    platforms = platforms.linux ++ platforms.darwin ++ platforms.windows;
+  };
+}