2022-06-16 17:23:12 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, SDL2
|
|
|
|
, SDL2_mixer
|
|
|
|
, cmake
|
|
|
|
, libpng
|
2024-06-20 14:57:18 +00:00
|
|
|
, darwin
|
|
|
|
, libicns
|
|
|
|
, imagemagick
|
2022-06-16 17:23:12 +00:00
|
|
|
}:
|
2020-06-18 07:06:33 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "julius";
|
2021-10-17 02:12:59 +00:00
|
|
|
version = "1.7.0";
|
2020-06-18 07:06:33 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bvschaik";
|
|
|
|
repo = "julius";
|
|
|
|
rev = "v${version}";
|
2022-06-16 17:23:12 +00:00
|
|
|
hash = "sha256-I5GTaVWzz0ryGLDSS3rzxp+XFVXZa9hZmgwon/6r83A=";
|
2020-06-18 07:06:33 +00:00
|
|
|
};
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
patches = [
|
|
|
|
# This fixes the darwin bundle generation, sets min. deployment version
|
|
|
|
# and patches SDL2_mixer include
|
|
|
|
./darwin-fixes.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
2024-09-26 11:04:55 +00:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
2024-06-20 14:57:18 +00:00
|
|
|
darwin.sigtool
|
|
|
|
libicns
|
|
|
|
imagemagick
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
SDL2
|
|
|
|
SDL2_mixer
|
|
|
|
libpng
|
2024-09-26 11:04:55 +00:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
2024-06-20 14:57:18 +00:00
|
|
|
darwin.apple_sdk.frameworks.Cocoa
|
|
|
|
];
|
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
installPhase = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
2024-06-20 14:57:18 +00:00
|
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/Applications
|
|
|
|
cp -r julius.app $out/Applications/
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
2020-06-18 07:06:33 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-06-18 07:06:33 +00:00
|
|
|
homepage = "https://github.com/bvschaik/julius";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Open source re-implementation of Caesar III";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "julius";
|
|
|
|
license = licenses.agpl3Only;
|
2024-06-20 14:57:18 +00:00
|
|
|
maintainers = with maintainers; [ Thra11 matteopacini ];
|
2020-06-18 07:06:33 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|