2023-10-23 10:36:50 +07:00
|
|
|
{ pkgs
|
|
|
|
, pkgs'
|
2023-10-26 22:22:39 +07:00
|
|
|
, isOverlay
|
|
|
|
, lib
|
2023-10-23 10:36:50 +07:00
|
|
|
, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
inherit (pkgs') callPackage;
|
|
|
|
|
|
|
|
extraPackages = {
|
|
|
|
tsja = callPackage ./tsja.nix { };
|
|
|
|
};
|
|
|
|
gen' = postgresql: builtins.mapAttrs (k: v: v.override { inherit postgresql; }) extraPackages;
|
2023-10-26 22:22:39 +07:00
|
|
|
gen = ver:
|
|
|
|
lib.optionalAttrs isOverlay pkgs."postgresql${toString ver}Packages"
|
|
|
|
// gen' pkgs."postgresql${if ver == "" then "" else "_" + toString ver}";
|
2023-10-26 06:49:55 +07:00
|
|
|
psql = ver: let
|
|
|
|
old = pkgs."postgresql${if ver == "" then "" else "_" + toString ver}";
|
|
|
|
in old // { pkgs = old.pkgs // gen' old; };
|
|
|
|
self = {
|
|
|
|
mecab = pkgs.mecab.overrideAttrs (old: {
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/lib/mecab/dic
|
|
|
|
ln -s ${callPackage /${pkgs.path}/pkgs/tools/text/mecab/ipadic.nix {
|
|
|
|
mecab-nodic = callPackage /${pkgs.path}/pkgs/tools/text/mecab/nodic.nix { };
|
|
|
|
}} $out/lib/mecab/dic/ipadic
|
|
|
|
'';
|
|
|
|
});
|
|
|
|
postgresqlPackages = gen "";
|
|
|
|
postgresql11Packages = gen 11;
|
|
|
|
postgresql12Packages = gen 12;
|
|
|
|
postgresql13Packages = gen 13;
|
|
|
|
postgresql14Packages = gen 14;
|
|
|
|
postgresql15Packages = gen 15;
|
|
|
|
postgresql16Packages = gen 16;
|
2023-10-26 22:22:39 +07:00
|
|
|
} // lib.optionalAttrs isOverlay {
|
|
|
|
postgresql = psql "";
|
|
|
|
postgresql_11 = psql 11;
|
|
|
|
postgresql_12 = psql 12;
|
|
|
|
postgresql_13 = psql 13;
|
|
|
|
postgresql_14 = psql 14;
|
|
|
|
postgresql_15 = psql 15;
|
2023-10-26 06:49:55 +07:00
|
|
|
postgresql_16 = psql 16;
|
|
|
|
};
|
|
|
|
in self
|