nixpkgs/pkgs/by-name/li/libvterm/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

40 lines
976 B
Nix

{ lib, stdenv, fetchurl, pkg-config, glib, ncurses }:
stdenv.mkDerivation rec {
pname = "libvterm";
version = "0.99.7";
src = fetchurl {
url = "mirror://sourceforge/libvterm/${pname}-${version}.tar.gz";
sha256 = "10gaqygmmwp0cwk3j8qflri5caf8vl3f7pwfl2svw5whv8wkn0k2";
};
preInstall = ''
mkdir -p $out/include $out/lib
'';
postPatch = ''
substituteInPlace Makefile \
--replace "gcc" "${stdenv.cc.targetPrefix}cc" \
--replace "ldconfig" "" \
--replace "/usr" "$out"
makeFlagsArray+=("PKG_CFG=`${stdenv.cc.targetPrefix}pkg-config --cflags glib-2.0`")
'';
# For headers
propagatedBuildInputs = [ glib ];
strictDeps = true;
nativeBuildInputs = [ pkg-config ];
buildInputs = [ ncurses ];
meta = with lib; {
homepage = "http://libvterm.sourceforge.net/";
description = "Terminal emulator library to mimic both vt100 and rxvt";
license = licenses.gpl2Plus;
platforms = platforms.linux;
};
}