nixpkgs/pkgs/development/libraries/libco-canonical/default.nix
Jonathan Ringer 9bb3fccb5b treewide: pkgs.pkgconfig -> pkgs.pkg-config, move pkgconfig to alias.nix
continuation of #109595

pkgconfig was aliased in 2018, however, it remained in
all-packages.nix due to its wide usage. This cleans
up the remaining references to pkgs.pkgsconfig and
moves the entry to aliases.nix.

python3Packages.pkgconfig remained unchanged because
it's the canonical name of the upstream package
on pypi.
2021-01-19 01:16:25 -08:00

40 lines
1.1 KiB
Nix

{ stdenv, fetchFromGitHub, pkg-config }:
with stdenv.lib;
stdenv.mkDerivation rec {
pname = "libco-canonical";
version = "20";
src = fetchFromGitHub {
owner = "canonical";
repo = "libco";
rev = "v${version}";
sha256 = "0r5b1r0sxngx349s5a3zkkvfw5by9y492kr34b25gjspzvjchlxq";
};
nativeBuildInputs = [ pkg-config ];
makeFlags = [ "PREFIX=${placeholder "out"}" ];
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";
license = licenses.isc;
maintainers = with maintainers; [ wucke13 ];
};
}