diff --git a/default.nix b/default.nix index 00f919a..70d77d5 100644 --- a/default.nix +++ b/default.nix @@ -33,6 +33,8 @@ in oha = callPackage ./oha { }; + rlvm = callPackage ./rlvm { }; + snownews = callPackage ./snownews { }; textidote = callPackage ./textidote { }; diff --git a/flake.nix b/flake.nix index dde7bd4..cb7c490 100644 --- a/flake.nix +++ b/flake.nix @@ -41,6 +41,7 @@ face_morpher nsz oha + rlvm snownews textidote unxwb diff --git a/rlvm/0001-Include-OS-environment-in-SCons-environment.patch b/rlvm/0001-Include-OS-environment-in-SCons-environment.patch new file mode 100644 index 0000000..2188107 --- /dev/null +++ b/rlvm/0001-Include-OS-environment-in-SCons-environment.patch @@ -0,0 +1,25 @@ +From c7e20165399adaca1b8373ead456291eadf16229 Mon Sep 17 00:00:00 2001 +From: Simon Bruder +Date: Wed, 28 Jul 2021 18:35:19 +0200 +Subject: [PATCH] Include OS environment in SCons environment + +--- + SConstruct | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/SConstruct b/SConstruct +index f67673a3..f14cf1ad 100644 +--- a/SConstruct ++++ b/SConstruct +@@ -19,6 +19,8 @@ AddOption('--fullstatic', action='store_true', + + # Set libraries used by all configurations and all binaries in rlvm. + env = Environment( ++ ENV = os.environ, ++ + tools = ["default", "rlvm"], + + LIBS = ["z"], +-- +2.31.1 + diff --git a/rlvm/default.nix b/rlvm/default.nix new file mode 100644 index 0000000..7efe36b --- /dev/null +++ b/rlvm/default.nix @@ -0,0 +1,74 @@ +{ lib +, stdenv +, fetchFromGitHub +, scons +, pkg-config +, SDL +, SDL_image +, SDL_mixer +, SDL_ttf +, boost +, freetype +, glew +, gtk2 +, libogg +, libsndfile +, libvorbis +, zita-resampler +}: + +stdenv.mkDerivation rec { + pname = "rlvm"; + # there has been no release since 2014, but important updates (like python 3 + # support) have been made since then + version = "unstable-2021-05-27"; + + src = fetchFromGitHub { + owner = "eglaysher"; + repo = pname; + rev = "fabf134a8023e6bb20473882a123666060b6187c"; + sha256 = "1y1l1hwcab8ln3rz4qlz3kl85l4byf0w00ysblki7lfsqm79lq3h"; + }; + + patches = [ + ./0001-Include-OS-environment-in-SCons-environment.patch + ]; + + nativeBuildInputs = [ + scons + pkg-config + ]; + buildInputs = [ + SDL + # FIXME: They are not recognised by SCons + #SDL_image + #SDL_mixer + #SDL_ttf + boost + freetype + glew + gtk2 + libogg + libsndfile + libvorbis + zita-resampler + ]; + + sconsFlags = [ + "--release" + ]; + + installPhase = '' + runHook preInstall + install -D build/release/rlvm $out/bin/rlvm + runHook postInstall + ''; + + meta = with lib; { + description = "RealLive clone for Linux and OSX"; + homepage = "http://www.rlvm.net/"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ sbruder ]; + platforms = platforms.unix; + }; +}