Skip to content

Instantly share code, notes, and snippets.

@thefloweringash
Created December 15, 2019 10:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thefloweringash/8f4c5ef2825e4779f03dda67f693c1c5 to your computer and use it in GitHub Desktop.
Save thefloweringash/8f4c5ef2825e4779f03dda67f693c1c5 to your computer and use it in GitHub Desktop.
GtkRadiant package for Nix
{ nixpkgs ? import <nixpkgs> {} }:
let drv =
{ stdenv, lib, fetchFromGitHub, fetchpatch
, scons, pkgconfig
, glib, gtk2-x11, libxml2, libGLU, gtkglext
, libXmu }:
stdenv.mkDerivation {
pname = "GtkRadiant";
version = "20191103";
src = fetchFromGitHub {
owner = "TTimo";
repo = "GtkRadiant";
rev = "1f6d29eac8b5b9e8986f1674b5c9ec4e9b9a1843";
sha256 = "1mb019y5cdsy5qa6ivx31jr1924hw0xbzbad1ic8qayrf51zgbip";
};
patches = [
# Build fails due to undefined uintptr_t. Reported upstream as
# part of flatpak efforts in 2018 at
# https://github.com/TTimo/GtkRadiant/issues/574#issuecomment-383378571
(fetchpatch {
url = "https://github.com/TTimo/GtkRadiant/commit/ba64802bb67a6096fa3aa7a5057e6ad2de0fb76c.diff";
revert = true;
sha256 = "1pp47b710j1lwfd0waapnqp50q6j72ivj9a6mx3sj6nvglcakf62";
})
];
nativeBuildInputs = [ scons pkgconfig ];
buildInputs = [
glib gtk2-x11 libxml2 libGLU gtkglext
libXmu
];
# By default, build script will attempt to clone from svn at build
# time. We require the user bring the appropriate packs.
sconsFlags = [ "--no-packs" ];
enableParallelBuilding = true;
postInstall = ''
rmdir $out
mv -v install $out
'';
};
in nixpkgs.callPackage drv {
inherit (nixpkgs.gnome2) gtkglext;
}
@thefloweringash
Copy link
Author

Only runs as far as "No games setup, aborting".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment