summary refs log tree commit diff
path: root/pkgs/development/libraries/libco-canonical/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/libco-canonical/default.nix')
-rw-r--r--pkgs/development/libraries/libco-canonical/default.nix15
1 files changed, 13 insertions, 2 deletions
diff --git a/pkgs/development/libraries/libco-canonical/default.nix b/pkgs/development/libraries/libco-canonical/default.nix
index 09c27ae7c9c..56974fcca7b 100644
--- a/pkgs/development/libraries/libco-canonical/default.nix
+++ b/pkgs/development/libraries/libco-canonical/default.nix
@@ -4,13 +4,13 @@ with stdenv.lib;
 
 stdenv.mkDerivation rec {
   pname = "libco-canonical";
-  version = "19.1";
+  version = "20";
 
   src = fetchFromGitHub {
     owner = "canonical";
     repo = "libco";
     rev = "v${version}";
-    sha256 = "03a0fq8f8gc4hjzcf0zsjib4mzag47rxrrg9b5r6bx53vj5rhj78";
+    sha256 = "0r5b1r0sxngx349s5a3zkkvfw5by9y492kr34b25gjspzvjchlxq";
   };
 
   nativeBuildInputs = [ pkgconfig ];
@@ -19,6 +19,17 @@ stdenv.mkDerivation rec {
 
   outputs = [ "dev" "out" ];
 
+  patchPhase = ''
+    # upstream project assumes all build products will go into single directory
+    # `$prefix` but we need `includedir` to point to "dev", not "out"
+    #
+    # pkgs/build-support/setup-hooks/multiple-outputs.sh would normally patch
+    # this automatically, but it fails here due to use of absolute paths
+
+    substituteInPlace Makefile \
+      --replace "@includedir@|\$(PREFIX)" "@includedir@|${placeholder "dev"}"
+  '';
+
   meta = {
     description = "A cooperative multithreading library written in C89";
     homepage = "https://github.com/canonical/libco";