2021-12-21 10:59:40 +00:00
|
|
|
{ lib, stdenv, fetchurl, fftwSinglePrec, freetype, SDL, SDL_ttf }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "quantumminigolf";
|
|
|
|
version = "1.1.1";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/project/quantumminigolf/quantumminigolf/${version}/quantumminigolf-${version}.src.tar.gz";
|
|
|
|
sha256 = "sha256-Y3LUGk6pAuNGVOYkc0WYDbgJFtwJJn+aLRHmCKY7W5k=";
|
2013-10-27 20:09:46 +00:00
|
|
|
};
|
2021-12-21 10:59:40 +00:00
|
|
|
|
2013-10-27 20:09:46 +00:00
|
|
|
buildInputs = [
|
2021-12-21 10:59:40 +00:00
|
|
|
fftwSinglePrec
|
|
|
|
freetype
|
|
|
|
SDL
|
|
|
|
SDL_ttf
|
2013-10-27 20:09:46 +00:00
|
|
|
];
|
2021-12-21 10:59:40 +00:00
|
|
|
|
2013-10-27 20:09:46 +00:00
|
|
|
preBuild = ''
|
2022-05-10 05:09:27 +00:00
|
|
|
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${lib.getDev SDL}/include/SDL -I${SDL_ttf}/include/SDL"
|
2013-10-27 20:09:46 +00:00
|
|
|
|
|
|
|
sed -re 's@"(gfx|fonts|tracks)/@"'"$out"'/share/quantumminigolf/\1/@g' -i *.cpp
|
|
|
|
'';
|
2021-12-21 10:59:40 +00:00
|
|
|
|
2013-10-27 20:09:46 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p "$out"/{share/doc,share/quantumminigolf,bin}
|
|
|
|
cp README THANKS LICENSE "$out/share/doc"
|
|
|
|
cp -r fonts gfx tracks "$out/share/quantumminigolf"
|
|
|
|
cp quantumminigolf "$out/bin"
|
|
|
|
'';
|
2021-12-21 10:59:40 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2021-01-24 09:19:10 +00:00
|
|
|
description = "Quantum mechanics-based minigolf-like game";
|
2021-12-21 10:59:40 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ raskin ];
|
|
|
|
platforms = platforms.linux;
|
2022-12-06 20:47:40 +00:00
|
|
|
# never built on aarch64-linux since first introduction in nixpkgs
|
|
|
|
broken = stdenv.isLinux && stdenv.isAarch64;
|
2013-10-27 20:09:46 +00:00
|
|
|
};
|
|
|
|
}
|