From e22a77217d08d6b83431a8ed230f6040881acc58 Mon Sep 17 00:00:00 2001 From: Piotr Bogdan Date: Sun, 3 Sep 2017 19:12:32 +0100 Subject: [PATCH] allegro: fix sandboxed build with nixUnstable In Nix 1.12 sandboxed builds are performed in /build/ directory which conflicts with the regex in docs/CMakeLists.txt, and generated documentation ends up in wrong directory -> https://hydra.nixos.org/build/53914969/nixlog/1 -> CTRL-F abi.txt --- pkgs/development/libraries/allegro/default.nix | 4 ++++ .../allegro/nix-unstable-sandbox-fix.patch | 13 +++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 pkgs/development/libraries/allegro/nix-unstable-sandbox-fix.patch diff --git a/pkgs/development/libraries/allegro/default.nix b/pkgs/development/libraries/allegro/default.nix index 997a8d223054..c0451486c144 100644 --- a/pkgs/development/libraries/allegro/default.nix +++ b/pkgs/development/libraries/allegro/default.nix @@ -12,6 +12,10 @@ stdenv.mkDerivation rec { sha256 = "1p0ghkmpc4kwij1z9rzxfv7adnpy4ayi0ifahlns1bdzgmbyf88v"; }; + patches = [ + ./nix-unstable-sandbox-fix.patch + ]; + buildInputs = [ texinfo libXext xextproto libX11 xproto libXpm libXt libXcursor alsaLib cmake zlib libpng libvorbis libXxf86dga libXxf86misc diff --git a/pkgs/development/libraries/allegro/nix-unstable-sandbox-fix.patch b/pkgs/development/libraries/allegro/nix-unstable-sandbox-fix.patch new file mode 100644 index 000000000000..a227cea1ce7b --- /dev/null +++ b/pkgs/development/libraries/allegro/nix-unstable-sandbox-fix.patch @@ -0,0 +1,13 @@ +diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt +index 32ed053..73ba87f 100644 +--- a/docs/CMakeLists.txt ++++ b/docs/CMakeLists.txt +@@ -72,7 +72,7 @@ foreach(page ${DOC_SRCS}) + string(REPLACE "._tx" "" basename ${basename}) + + set(page ${CMAKE_CURRENT_SOURCE_DIR}/${page}) +- if(${page} MATCHES "/build/") ++ if(${page} MATCHES ".+/build/") + set(txt_out ${CMAKE_CURRENT_BINARY_DIR}/build/${basename}.txt) + set(html_out ${CMAKE_CURRENT_BINARY_DIR}/build/${basename}.html) + else()