diff options
Diffstat (limited to 'nixpkgs/pkgs/desktops/arcan/arcan/default.nix')
-rw-r--r-- | nixpkgs/pkgs/desktops/arcan/arcan/default.nix | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/nixpkgs/pkgs/desktops/arcan/arcan/default.nix b/nixpkgs/pkgs/desktops/arcan/arcan/default.nix index 0cd7e4e0db64..22c214728f2b 100644 --- a/nixpkgs/pkgs/desktops/arcan/arcan/default.nix +++ b/nixpkgs/pkgs/desktops/arcan/arcan/default.nix @@ -52,15 +52,19 @@ , useStaticSqlite ? false }: +let + cmakeFeatureFlag = feature: flag: + "-D${feature}=${if flag then "on" else "off"}"; +in stdenv.mkDerivation (finalAttrs: { pname = "arcan" + lib.optionalString useStaticOpenAL "-static-openal"; - version = "0.6.2"; + version = "0.6.2.1"; src = fetchFromGitHub { owner = "letoram"; repo = "arcan"; rev = finalAttrs.version; - hash = "sha256-Qwyt927eLqaCqJ4Lo4J1lQX2A24ke+AH52rmSCTnpO0="; + hash = "sha256-7H3fVSsW5VANLqwhykY+Q53fPjz65utaGksh/OpZnJM="; }; nativeBuildInputs = [ @@ -156,8 +160,8 @@ stdenv.mkDerivation (finalAttrs: { substituteInPlace ./src/CMakeLists.txt --replace "SETUID" "# SETUID" ''; - # INFO: Arcan build scripts require the manpages to be generated - # before the configure phase + # INFO: Arcan build scripts require the manpages to be generated before the + # `configure` phase preConfigure = lib.optionalString buildManPages '' pushd doc ruby docgen.rb mangen @@ -169,13 +173,13 @@ stdenv.mkDerivation (finalAttrs: { # The upstream project recommends tagging the distribution "-DDISTR_TAG=Nixpkgs" "-DENGINE_BUILDTAG=${finalAttrs.version}" - "-DHYBRID_SDL=on" - "-DBUILTIN_LUA=${if useBuiltinLua then "on" else "off"}" - "-DDISABLE_JIT=${if useBuiltinLua then "on" else "off"}" - "-DSTATIC_FREETYPE=${if useStaticFreetype then "on" else "off"}" - "-DSTATIC_LIBUVC=${if useStaticLibuvc then "on" else "off"}" - "-DSTATIC_OPENAL=${if useStaticOpenAL then "on" else "off"}" - "-DSTATIC_SQLite3=${if useStaticSqlite then "on" else "off"}" + (cmakeFeatureFlag "HYBRID_SDL" true) + (cmakeFeatureFlag "BUILTIN_LUA" useBuiltinLua) + (cmakeFeatureFlag "DISABLE_JIT" useBuiltinLua) + (cmakeFeatureFlag "STATIC_FREETYPE" useStaticFreetype) + (cmakeFeatureFlag "STATIC_LIBUVC" useStaticLibuvc) + (cmakeFeatureFlag "STATIC_OPENAL" useStaticOpenAL) + (cmakeFeatureFlag "STATIC_SQLite3" useStaticSqlite) "../src" ]; |