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

48 lines
1.1 KiB
Nix

{ lib, stdenv, fetchFromGitHub
, autoreconfHook, autoconf-archive
, installShellFiles, libiconv }:
stdenv.mkDerivation rec {
pname = "libdatrie";
version = "2019-12-20";
outputs = [ "bin" "out" "lib" "dev" ];
src = fetchFromGitHub {
owner = "tlwg";
repo = "libdatrie";
rev = "d1db08ac1c76f54ba23d63665437473788c999f3";
sha256 = "03dc363259iyiidrgadzc7i03mmfdj8h78j82vk6z53w6fxq5zxc";
};
nativeBuildInputs = [
autoreconfHook
autoconf-archive
installShellFiles
];
buildInputs = [ libiconv ];
preAutoreconf = let
reports = "https://github.com/tlwg/libdatrie/issues";
in
''
sed -i -e "/AC_INIT/,+3d" configure.ac
sed -i "5iAC_INIT(${pname},${version},[${reports}])" configure.ac
'';
postInstall = ''
installManPage man/trietool.1
'';
meta = with lib; {
homepage = "https://linux.thai.net/~thep/datrie/datrie.html";
description = "This is an implementation of double-array structure for representing trie";
license = licenses.lgpl21Plus;
platforms = platforms.unix;
maintainers = [ ];
pkgConfigModules = [ "datrie-0.2" ];
};
}