1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/by-name/po/popt/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

51 lines
1.5 KiB
Nix

{ lib
, stdenv
, fetchurl
, fetchpatch2
, updateAutotoolsGnuConfigScriptsHook
}:
stdenv.mkDerivation rec {
pname = "popt";
version = "1.19";
src = fetchurl {
url = "https://ftp.osuosl.org/pub/rpm/popt/releases/popt-1.x/popt-${version}.tar.gz";
sha256 = "sha256-wlpIOPyOTByKrLi9Yg7bMISj1jv4mH/a08onWMYyQPk=";
};
nativeBuildInputs = [ updateAutotoolsGnuConfigScriptsHook ];
patches = lib.optionals stdenv.hostPlatform.isCygwin [
./1.16-cygwin.patch
./1.16-vpath.patch
] ++ lib.optionals stdenv.hostPlatform.isMinGW [
# Do not require <sys/ioctl.h>
(fetchpatch2 {
url = "https://aur.archlinux.org/cgit/aur.git/plain/get-w32-console-maxcols.mingw32.patch?h=mingw-w64-popt&id=63f2cdb0de116362c49681cef20f7a8b4355e85a";
sha256 = "zv43l1RBqNzT/JG+jQaMVFaFv+ZYPuIiAtKUDzJJBbc=";
stripLen = 1;
extraPrefix = "src/";
})
# Do not try to detect setuid, it is not a thing.
(fetchpatch2 {
url = "https://github.com/rpm-software-management/popt/commit/905544c5d9767894edaf71a1e3ce5126944c5695.patch";
sha256 = "3PmcxeiEZ/Hof0zoVFSytEXvQ8gE8Sp5UdagExPVICU=";
stripLen = 1;
extraPrefix = "src/";
revert = true;
})
];
doCheck = false; # fails
meta = with lib; {
homepage = "https://github.com/rpm-software-management/popt";
description = "Command line option parsing library";
maintainers = with maintainers; [ qyliss ];
license = licenses.mit;
platforms = platforms.unix;
};
}