Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

devilutionx: 0.5.0 -> 1.0.0, install font file #76770

Merged
merged 2 commits into from Jan 2, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 10 additions & 5 deletions pkgs/games/devilutionx/default.nix
@@ -1,16 +1,19 @@
{ stdenv, fetchFromGitHub, cmake, SDL2, SDL2_mixer, SDL2_ttf, libsodium, pkg-config }:
stdenv.mkDerivation rec {
version = "0.5.0";
version = "1.0.0";
pname = "devilutionx";

src = fetchFromGitHub {
owner = "diasurgical";
repo = "devilutionX";
rev = version;
sha256 = "010hxj129zmsynvizk89vm2y29dcxsfi585czh3f03wfr38rxa6b";
sha256 = "0lx903gchda4bgr71469yn63rx5ya6xv9j1azx18nrv3sskrphn4";
};

NIX_CFLAGS_COMPILE = "-I${SDL2_ttf}/include/SDL2";
NIX_CFLAGS_COMPILE = [
"-I${SDL2_ttf}/include/SDL2"
''-DTTF_FONT_PATH="${placeholder "out"}/share/fonts/truetype/CharisSILB.ttf"''
];

nativeBuildInputs = [ pkg-config cmake ];
buildInputs = [ libsodium SDL2 SDL2_mixer SDL2_ttf ];
Expand All @@ -22,8 +25,10 @@ stdenv.mkDerivation rec {
mkdir -p $out/Applications
mv devilutionx.app $out/Applications
'' else ''
mkdir -p $out/bin
cp devilutionx $out/bin
install -Dm755 -t $out/bin devilutionx
install -Dt $out/share/fonts/truetype ../Packaging/resources/CharisSILB.ttf

# TODO: icons and .desktop (see Packages/{debian,fedora}/*)
'') + ''

runHook postInstall
Expand Down