2021-01-19 07:50:56 +01:00
|
|
|
{ lib, stdenv, fetchurl, SDL, SDL_image, SDL_ttf, zlib, libpng, pkg-config, lua5 }:
|
2013-11-21 11:19:56 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
|
|
|
version = "2.4.2035";
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "grafx2";
|
2013-11-21 11:19:56 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 14:41:18 +02:00
|
|
|
url = "https://grafx2.googlecode.com/files/${pname}-${version}-src.tgz";
|
2013-11-21 11:19:56 +01:00
|
|
|
sha256 = "0svsy6rqmdj11b400c242i2ixihyz0hds0dgicqz6g6dcgmcl62q";
|
|
|
|
};
|
|
|
|
|
2021-01-19 07:50:56 +01:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2017-09-05 23:26:13 +02:00
|
|
|
buildInputs = [ SDL SDL_image SDL_ttf libpng zlib lua5 ];
|
2013-11-21 11:19:56 +01:00
|
|
|
|
2013-11-23 09:44:49 +01:00
|
|
|
preBuild = "cd src";
|
2013-11-21 11:19:56 +01:00
|
|
|
|
2022-05-14 18:55:30 +02:00
|
|
|
# Workaround build failure on -fno-common toolchains like upstream
|
|
|
|
# gcc-10. Otherwise build fails as:
|
|
|
|
# ld: ../obj/unix/tiles.o:/build/grafx2/src/global.h:306: multiple definition of
|
|
|
|
# `Main_selector'; ../obj/unix/main.o:/build/grafx2/src/global.h:306: first defined here
|
|
|
|
NIX_CFLAGS_COMPILE = "-fcommon";
|
|
|
|
|
2013-11-24 16:59:23 +01:00
|
|
|
preInstall = '' mkdir -p "$out" '';
|
2013-11-21 11:19:56 +01:00
|
|
|
|
2013-11-30 12:03:34 +01:00
|
|
|
installPhase = ''make install prefix="$out"'';
|
|
|
|
|
2013-11-21 11:19:56 +01:00
|
|
|
meta = {
|
2014-08-24 16:21:08 +02:00
|
|
|
description = "Bitmap paint program inspired by the Amiga programs Deluxe Paint and Brilliance";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://pulkomandy.tk/projects/GrafX2";
|
2021-01-15 14:21:58 +01:00
|
|
|
license = lib.licenses.gpl2;
|
2013-11-21 11:19:56 +01:00
|
|
|
platforms = [ "x86_64-linux" "i686-linux" ];
|
2021-12-02 22:37:56 +01:00
|
|
|
maintainers = [];
|
2013-11-21 11:19:56 +01:00
|
|
|
};
|
|
|
|
}
|