nixpkgs/pkgs/by-name/lb/lbdb/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

64 lines
1.6 KiB
Nix

{ lib
, stdenv
, fetchurl
, fetchpatch
, perl
, bsd-finger
, withAbook ? true, abook
, withGnupg ? true, gnupg
, withGoobook ? true, goobook
, withKhard ? true, khard
, withMu ? true, mu
}:
let
perl' = perl.withPackages (p: with p; [
AuthenSASL
ConvertASN1
IOSocketSSL
perlldap
]);
in
stdenv.mkDerivation rec {
pname = "lbdb";
version = "0.48.1";
src = fetchurl {
url = "https://www.spinnaker.de/lbdb/download/lbdb_${version}.tar.gz";
sha256 = "1gr5l2fr9qbdccga8bhsrpvz6jxigvfkdxrln9wyf2xpps5cdjxh";
};
buildInputs = [ perl' ]
++ lib.optional (!stdenv.hostPlatform.isDarwin) bsd-finger
++ lib.optional withAbook abook
++ lib.optional withGnupg gnupg
++ lib.optional withGoobook goobook
++ lib.optional withKhard khard
++ lib.optional withMu mu;
configureFlags = [ ]
++ lib.optional withAbook "--with-abook"
++ lib.optional withGnupg "--with-gpg"
++ lib.optional withGoobook "--with-goobook"
++ lib.optional withKhard "--with-khard"
++ lib.optional withMu "--with-mu";
patches = [
./add-methods-to-rc.patch
# fix undefined exec_prefix. Remove with the next release
(fetchpatch {
url = "https://github.com/RolandRosenfeld/lbdb/commit/60b7bae255011f59212d96adfbded459d6a27129.patch";
sha256 = "129zg086glmlalrg395jq8ljcp787dl3rxjf9v7apsd8mqfdkl2v";
excludes = [ "debian/changelog" ];
})
];
meta = with lib; {
homepage = "https://www.spinnaker.de/lbdb/";
description = "Little Brother's Database";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ kaiha bfortz ];
platforms = platforms.all;
};
}