about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorJoachim F <joachifm@users.noreply.github.com>2017-10-23 16:40:11 +0000
committerGitHub <noreply@github.com>2017-10-23 16:40:11 +0000
commit32866a3b0b0377a30ba29ff26bd630cf204fc664 (patch)
tree5fe5f8150adb6062944549ba5d65b64cd748c976 /pkgs
parentc522aaafde483a7c0127eab008b1274de8fd4fda (diff)
parenta94d014149173c1a2b1c005ed3e22bd86413d643 (diff)
downloadnixlib-32866a3b0b0377a30ba29ff26bd630cf204fc664.tar
nixlib-32866a3b0b0377a30ba29ff26bd630cf204fc664.tar.gz
nixlib-32866a3b0b0377a30ba29ff26bd630cf204fc664.tar.bz2
nixlib-32866a3b0b0377a30ba29ff26bd630cf204fc664.tar.lz
nixlib-32866a3b0b0377a30ba29ff26bd630cf204fc664.tar.xz
nixlib-32866a3b0b0377a30ba29ff26bd630cf204fc664.tar.zst
nixlib-32866a3b0b0377a30ba29ff26bd630cf204fc664.zip
Merge pull request #30696 from pbogdan/torcs-fix-build
torcs: fix build & cleanups
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/games/torcs/default.nix21
1 files changed, 17 insertions, 4 deletions
diff --git a/pkgs/games/torcs/default.nix b/pkgs/games/torcs/default.nix
index 1ea94a5d2ced..1b6ad5b34c32 100644
--- a/pkgs/games/torcs/default.nix
+++ b/pkgs/games/torcs/default.nix
@@ -1,4 +1,4 @@
-{ fetchurl, stdenv, mesa, freeglut, libX11, plib, openal, freealut, libXrandr, xproto,
+{ fetchpatch, fetchurl, stdenv, mesa, freeglut, libX11, plib, openal, freealut, libXrandr, xproto,
 libXext, libSM, libICE, libXi, libXt, libXrender, libXxf86vm, libvorbis,
 libpng, zlib, bash, makeWrapper }:
 
@@ -10,7 +10,22 @@ stdenv.mkDerivation rec {
     sha256 = "0kdq0sc7dsfzlr0ggbxggcbkivc6yp30nqwjwcaxg9295s3b06wa";
   };
 
-  patchPhase = ''
+  patches = [
+    (fetchpatch {
+      url = "https://anonscm.debian.org/git/pkg-games/torcs.git/plain/debian/patches/gcc6-isnan.patch";
+      sha256 = "16scmq30vwb8429ah9d4ws0v1w6ai59lvn7hcgnvfzyap42ry876";
+    })
+    (fetchpatch {
+      url = "https://anonscm.debian.org/git/pkg-games/torcs.git/plain/debian/patches/format-argument.patch";
+      sha256 = "04advcx88yh23ww767iysydzhp370x7cqp2wf9hk2y1qvw7mxsja";
+    })
+    (fetchpatch {
+      url = "https://anonscm.debian.org/git/pkg-games/torcs.git/plain/debian/patches/glibc-default-source.patch";
+      sha256 = "0k4hgpddnhv68mdc9ics7ah8q54j60g394d7zmcmzg6l3bjd9pyp";
+    })
+  ];
+
+  postPatch = ''
     sed -i -e s,/bin/bash,`type -P bash`, src/linux/torcs.in
   '';
 
@@ -21,8 +36,6 @@ stdenv.mkDerivation rec {
 
   installTargets = "install datainstall";
 
-  hardeningDisable = [ "format" ];
-
   postInstall = ''
     wrapProgram $out/bin/torcs \
       --prefix LD_LIBRARY_PATH : ${mesa}/lib