nixpkgs/pkgs/by-name/np/npth/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

45 lines
1.3 KiB
Nix

{ lib, stdenv, fetchurl, fetchpatch, autoreconfHook, pkgsCross }:
stdenv.mkDerivation rec {
pname = "npth";
version = "1.7";
src = fetchurl {
url = "mirror://gnupg/npth/npth-${version}.tar.bz2";
sha256 = "sha256-hYn1aTe3XOM7KNMS/MvzArO3HsPzlF/eaqp0AnkUrQU=";
};
patches = [
(fetchpatch {
name = "musl.patch";
url = "https://git.gnupg.org/cgi-bin/gitweb.cgi?p=npth.git;a=patch;h=417abd56fd7bf45cd4948414050615cb1ad59134";
hash = "sha256-0g2tLFjW1bybNi6oxlW7vPimsQLjmTih4JZSoATjESI=";
})
];
nativeBuildInputs = [ autoreconfHook ];
doCheck = true;
passthru.tests = {
musl = pkgsCross.musl64.npth;
};
meta = with lib; {
description = "New GNU Portable Threads Library";
mainProgram = "npth-config";
longDescription = ''
This is a library to provide the GNU Pth API and thus a non-preemptive
threads implementation.
In contrast to GNU Pth is is based on the system's standard threads
implementation. This allows the use of libraries which are not
compatible to GNU Pth. Experience with a Windows Pth emulation showed
that this is a solid way to provide a co-routine based framework.
'';
homepage = "http://www.gnupg.org";
license = licenses.lgpl3;
platforms = platforms.all;
};
}