From 3a53aa01418376c823811e47caf62d1f42e03c74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ertugrul=20S=C3=B6ylemez?= Date: Sat, 3 Feb 2018 18:53:26 +0100 Subject: [PATCH 1/3] doom-bcc-git: init at 2018.01.04 --- pkgs/games/zdoom/bcc-git.nix | 30 ++++++++++++++++++++++++++ pkgs/games/zdoom/bcc-warning-fix.patch | 25 +++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 57 insertions(+) create mode 100644 pkgs/games/zdoom/bcc-git.nix create mode 100644 pkgs/games/zdoom/bcc-warning-fix.patch diff --git a/pkgs/games/zdoom/bcc-git.nix b/pkgs/games/zdoom/bcc-git.nix new file mode 100644 index 000000000000..ce531e854edf --- /dev/null +++ b/pkgs/games/zdoom/bcc-git.nix @@ -0,0 +1,30 @@ +{ stdenv, fetchFromGitHub }: + +stdenv.mkDerivation { + name = "doom-bcc-git-0.8.0.2018.01.04"; + + src = fetchFromGitHub { + owner = "wormt"; + repo = "bcc"; + rev = "d58b44d9f18b28fd732c27113e5607a454506d19"; + sha256 = "1m83ip40ln61qrvb1fbgaqbld2xip9n3k817lwkk1936pml9zcrq"; + }; + + enableParallelBuilding = true; + + patches = [ ./bcc-warning-fix.patch ]; + + installPhase = '' + mkdir -p $out/{bin,lib,share/doc} + install -m755 bcc $out/bin/bcc + cp -av doc $out/share/doc/bcc + cp -av lib $out/lib/bcc + ''; + + meta = with stdenv.lib; { + description = "Compiler for Doom/Hexen scripts (ACS, BCS)"; + homepage = https://github.com/wormt/bcc; + license = licenses.mit; + maintainers = with maintainers; [ertes]; + }; +} diff --git a/pkgs/games/zdoom/bcc-warning-fix.patch b/pkgs/games/zdoom/bcc-warning-fix.patch new file mode 100644 index 000000000000..4a352cb1e471 --- /dev/null +++ b/pkgs/games/zdoom/bcc-warning-fix.patch @@ -0,0 +1,25 @@ +From c6ac05c96b7908ccd35f3908fc0f13650b0583c0 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ertugrul=20S=C3=B6ylemez?= +Date: Sat, 3 Feb 2018 17:08:54 +0100 +Subject: [PATCH] Remove -Werror + +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index bbe2c75..3357d2d 100644 +--- a/Makefile ++++ b/Makefile +@@ -4,7 +4,7 @@ EXE=bcc + BUILD_DIR=build + CC=gcc + INCLUDE=-Isrc -I src/parse +-OPTIONS=-Wall -Werror -Wno-unused -std=c99 -pedantic -Wstrict-aliasing \ ++OPTIONS=-Wall -Wno-unused -std=c99 -pedantic -Wstrict-aliasing \ + -Wstrict-aliasing=2 -Wmissing-field-initializers -D_BSD_SOURCE \ + -D_DEFAULT_SOURCE $(INCLUDE) + VERSION_FILE=$(BUILD_DIR)/version.c +-- +2.15.1 + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3462be10bfec..09e4d0c85c9f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1893,6 +1893,8 @@ with pkgs; }; doomseeker = callPackage ../applications/misc/doomseeker { }; + doom-bcc-git = callPackage ../games/zdoom/bcc-git.nix { }; + slade = callPackage ../applications/misc/slade { wxGTK = wxGTK30; }; From 1394c852e253e81e9a1112fd8347508bbe8c2c79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ertugrul=20S=C3=B6ylemez?= Date: Sun, 4 Feb 2018 00:51:48 +0100 Subject: [PATCH 2/3] doom-bcc-git: Attribute naming convention --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 09e4d0c85c9f..73be98fbb41f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1893,7 +1893,7 @@ with pkgs; }; doomseeker = callPackage ../applications/misc/doomseeker { }; - doom-bcc-git = callPackage ../games/zdoom/bcc-git.nix { }; + doom-bcc = callPackage ../games/zdoom/bcc-git.nix { }; slade = callPackage ../applications/misc/slade { wxGTK = wxGTK30; From a5f91d1f15be06c066b04ec08fa1ab60ad44e9c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ertugrul=20S=C3=B6ylemez?= Date: Sun, 4 Feb 2018 01:00:58 +0100 Subject: [PATCH 3/3] doom-bcc-git: CC=cc (for Darwin) --- pkgs/games/zdoom/bcc-git.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/games/zdoom/bcc-git.nix b/pkgs/games/zdoom/bcc-git.nix index ce531e854edf..2a1219e66ea0 100644 --- a/pkgs/games/zdoom/bcc-git.nix +++ b/pkgs/games/zdoom/bcc-git.nix @@ -11,6 +11,7 @@ stdenv.mkDerivation { }; enableParallelBuilding = true; + makeFlags = ["CC=cc"]; patches = [ ./bcc-warning-fix.patch ];