mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-02 11:53:27 +00:00
571c71e6f7
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.
45 lines
1.1 KiB
Nix
45 lines
1.1 KiB
Nix
{ stdenv
|
|
, lib
|
|
, fetchurl
|
|
, cmake
|
|
}:
|
|
|
|
let
|
|
isCross = !stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
|
isStatic = stdenv.hostPlatform.isStatic;
|
|
isMusl = stdenv.hostPlatform.isMusl;
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "libptytty";
|
|
version = "2.0";
|
|
|
|
src = fetchurl {
|
|
url = "http://dist.schmorp.de/libptytty/${pname}-${version}.tar.gz";
|
|
sha256 = "1xrikmrsdkxhdy9ggc0ci6kg5b1hn3bz44ag1mk5k1zjmlxfscw0";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
cmakeFlags = lib.optional isStatic "-DBUILD_SHARED_LIBS=OFF"
|
|
++ lib.optional (isCross || isStatic) "-DTTY_GID_SUPPORT=OFF"
|
|
# Musl lacks UTMP/WTMP built-in support
|
|
++ lib.optionals isMusl [
|
|
"-DUTMP_SUPPORT=OFF"
|
|
"-DWTMP_SUPPORT=OFF"
|
|
"-DLASTLOG_SUPPORT=OFF"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "OS independent and secure pty/tty and utmp/wtmp/lastlog";
|
|
homepage = "http://dist.schmorp.de/libptytty";
|
|
maintainers = with maintainers; [ rnhmjoj ];
|
|
platforms = platforms.unix;
|
|
license = licenses.gpl2;
|
|
# pkgsMusl.pkgsStatic errors as:
|
|
# ln: failed to create symbolic link './include': File exists
|
|
broken = isStatic && isMusl;
|
|
};
|
|
|
|
}
|