mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 16:33:15 +00:00
acc: init at 1.60
This commit is contained in:
parent
089df4ec03
commit
1b38685b49
@ -38,6 +38,13 @@ in mkLicense lset) ({
|
||||
redistributable = false;
|
||||
};
|
||||
|
||||
activision = {
|
||||
# https://doomwiki.org/wiki/Raven_source_code_licensing
|
||||
fullName = "Activision EULA";
|
||||
url = "https://www.doomworld.com/eternity/activision_eula.txt";
|
||||
free = false;
|
||||
};
|
||||
|
||||
afl20 = {
|
||||
spdxId = "AFL-2.0";
|
||||
fullName = "Academic Free License v2.0";
|
||||
|
31
pkgs/by-name/ac/acc/disable-static.patch
Normal file
31
pkgs/by-name/ac/acc/disable-static.patch
Normal file
@ -0,0 +1,31 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 3d9ad07..2f3b4b5 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -2,26 +2,6 @@ cmake_minimum_required(VERSION 2.4)
|
||||
|
||||
project(acc)
|
||||
|
||||
-if(MSVC)
|
||||
- # Create list of _FLAGS variables
|
||||
- foreach(FLAGS_SUFFIX "" _DEBUG _RELEASE _MINSIZEREL _RELWITHDEBINFO)
|
||||
- set(FLAGS_VARIABLES ${FLAGS_VARIABLES} CMAKE_C_FLAGS${FLAGS_SUFFIX} CMAKE_CXX_FLAGS${FLAGS_SUFFIX})
|
||||
- endforeach()
|
||||
-
|
||||
- # Change compiler flags to use static runtime
|
||||
- foreach(FLAGS_VARIABLE ${FLAGS_VARIABLES})
|
||||
- if(${FLAGS_VARIABLE} MATCHES "/MD")
|
||||
- string(REGEX REPLACE "/MD" "/MT" ${FLAGS_VARIABLE} "${${FLAGS_VARIABLE}}")
|
||||
- endif()
|
||||
- endforeach()
|
||||
-endif()
|
||||
-
|
||||
-if (NOT APPLE AND NOT MSVC)
|
||||
- # use static runtimes on Linux and MinGW
|
||||
- set(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES} -static -static-libgcc -static-libstdc++")
|
||||
- set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} -static -static-libgcc -static-libstdc++")
|
||||
- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static -static-libgcc -static-libstdc++")
|
||||
-endif()
|
||||
|
||||
add_executable(acc
|
||||
acc.c
|
40
pkgs/by-name/ac/acc/package.nix
Normal file
40
pkgs/by-name/ac/acc/package.nix
Normal file
@ -0,0 +1,40 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "acc";
|
||||
version = "1.60";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "zdoom";
|
||||
repo = "acc";
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-HGF4O4LcMDY4f/ZuBbkvx5Wd86+8Ict624eKTJ88/rQ=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Don't force static builds
|
||||
./disable-static.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -D acc $out/bin/acc
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "ACS script compiler for use with ZDoom and Hexen";
|
||||
homepage = "https://zdoom.org/wiki/ACC";
|
||||
license = licenses.activision;
|
||||
maintainers = with maintainers; [ emilytrau ];
|
||||
platforms = platforms.all;
|
||||
mainProgram = "acc";
|
||||
};
|
||||
})
|
Loading…
Reference in New Issue
Block a user