-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libpthread-stubs: refactored, moved to pkgs/by-name and renamed from …
…xorg.libpthreadstubs
- Loading branch information
1 parent
7fd7b5e
commit 02b6d0a
Showing
4 changed files
with
45 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
lib, | ||
stdenv, | ||
fetchurl, | ||
testers, | ||
writeScript, | ||
}: | ||
|
||
stdenv.mkDerivation (finalAttrs: { | ||
pname = "libpthread-stubs"; | ||
version = "0.5"; | ||
|
||
src = fetchurl { | ||
url = "mirror://xorg/individual/lib/libpthread-stubs-${finalAttrs.version}.tar.xz"; | ||
hash = "sha256-WdpWbezOunwqeXCkoDtI2ZBfEmL/lEEKZJIk4z0kQrw="; | ||
}; | ||
|
||
passthru = { | ||
updateScript = writeScript "update-${finalAttrs.pname}" '' | ||
#!/usr/bin/env nix-shell | ||
#!nix-shell -i bash -p common-updater-scripts | ||
version="$(list-directory-versions --pname ${finalAttrs.pname} \ | ||
--url https://xorg.freedesktop.org/releases/individual/lib/ \ | ||
| sort | tail -n1)" | ||
update-source-version ${finalAttrs.pname} "$version" | ||
''; | ||
tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; | ||
}; | ||
|
||
meta = { | ||
description = "Provides a pkg-config file `pthread-stubs.pc` containing the Cflags/Libs flags applicable to programs/libraries that use only lightweight pthread API"; | ||
homepage = "https://gitlab.freedesktop.org/xorg/lib/pthread-stubs"; | ||
# gitlab says x11-distribute-modifications but it's not | ||
# maybe due to https://github.com/spdx/spdx-online-tools/issues/540 | ||
license = lib.licenses.x11; | ||
maintainers = [ ]; | ||
pkgConfigModules = [ "pthread-stubs" ]; | ||
# on these platforms according to the readme | ||
platforms = with lib.platforms; linux ++ cygwin ++ darwin ++ [ "x86_64-solaris" ]; | ||
}; | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters