Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / popt / default.nix
blobfdccb4d093367fa4a4c6ff9176b04905d2bf33df
1 { lib
2 , stdenv
3 , fetchurl
4 , fetchpatch2
5 }:
7 stdenv.mkDerivation rec {
8   pname = "popt";
9   version = "1.19";
11   src = fetchurl {
12     url = "https://ftp.osuosl.org/pub/rpm/popt/releases/popt-1.x/popt-${version}.tar.gz";
13     sha256 = "sha256-wlpIOPyOTByKrLi9Yg7bMISj1jv4mH/a08onWMYyQPk=";
14   };
16   patches = lib.optionals stdenv.isCygwin [
17     ./1.16-cygwin.patch
18     ./1.16-vpath.patch
19   ] ++ lib.optionals stdenv.hostPlatform.isMinGW [
20     # Do not require <sys/ioctl.h>
21     (fetchpatch2 {
22       url = "https://aur.archlinux.org/cgit/aur.git/plain/get-w32-console-maxcols.mingw32.patch?h=mingw-w64-popt&id=63f2cdb0de116362c49681cef20f7a8b4355e85a";
23       sha256 = "zv43l1RBqNzT/JG+jQaMVFaFv+ZYPuIiAtKUDzJJBbc=";
24       stripLen = 1;
25       extraPrefix = "src/";
26     })
28     # Do not try to detect setuid, it is not a thing.
29     (fetchpatch2 {
30       url = "https://github.com/rpm-software-management/popt/commit/905544c5d9767894edaf71a1e3ce5126944c5695.patch";
31       sha256 = "3PmcxeiEZ/Hof0zoVFSytEXvQ8gE8Sp5UdagExPVICU=";
32       stripLen = 1;
33       extraPrefix = "src/";
34       revert = true;
35     })
36   ];
38   doCheck = false; # fails
40   meta = with lib; {
41     homepage = "https://github.com/rpm-software-management/popt";
42     description = "Command line option parsing library";
43     maintainers = with maintainers; [ qyliss ];
44     license = licenses.mit;
45     platforms = platforms.unix;
46   };