nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at netboot-syslinux-multiplatform 42 lines 1.5 kB view raw
1{ lib, stdenv, fetchurl, fetchpatch, libX11, libXext, xorgproto, libICE, libSM, libpng12, zlib }: 2 3stdenv.mkDerivation rec { 4 pname = "lincity"; 5 version = "1.13.1"; 6 7 src = fetchurl { 8 url = "mirror://sourceforge/lincity/${pname}-${version}.tar.gz"; 9 sha256 = "0p81wl7labyfb6rgp0hi42l2akn3n7r2bnxal1wyvjylzw8vsk3v"; 10 }; 11 12 buildInputs = [ 13 libICE libpng12 libSM libX11 libXext 14 xorgproto zlib 15 ]; 16 17 patches = [ 18 (fetchpatch { 19 url = "https://sources.debian.net/data/main/l/lincity/1.13.1-13/debian/patches/extern-inline-functions-777982"; 20 sha256 = "06dp3zwk0z5wr5a3xaaj2my75vcjcy98vc22hsag7ggd9jwrkcp0"; 21 }) 22 (fetchpatch { 23 url = "https://sources.debian.net/data/main/l/lincity/1.13.1-13/debian/patches/clang-ftbfs-757859"; 24 sha256 = "098rnywcsyc0m11x4a5m3dza8i0jmfh6pacfgma1vvxpsfkb6ngp"; 25 }) 26 ]; 27 28 # Workaround build failure on -fno-common toolchains like upstream 29 # gcc-10. Otherwise build fails as: 30 # ld: modules/.libs/libmodules.a(rocket_pad.o):/build/lincity-1.13.1/modules/../screen.h:23: 31 # multiple definition of `monthgraph_style'; ldsvguts.o:/build/lincity-1.13.1/screen.h:23: first defined here 32 env.NIX_CFLAGS_COMPILE = "-fcommon"; 33 34 meta = with lib; { 35 description = "City simulation game"; 36 license = licenses.gpl2Plus; 37 homepage = "https://sourceforge.net/projects/lincity"; 38 maintainers = with maintainers; [ ]; 39 # ../lcintl.h:14:10: fatal error: 'libintl.h' file not found 40 broken = stdenv.isDarwin; 41 }; 42}