nixos/fileSystems: link to mount(8) from fileSystems.*.options (#377170)
[NixPkgs.git] / pkgs / by-name / mo / modprobed-db / package.nix
blob12a799ff276be6714324ea962e157c83e6c6acd4
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   pkg-config,
6   libevdev,
7   kmod,
8   bash,
9   installShellFiles,
11 let
12   pname = "modprobed-db";
13   version = "2.48";
15 stdenv.mkDerivation {
16   inherit pname version;
18   src = fetchFromGitHub {
19     owner = "graysky2";
20     repo = "modprobed-db";
21     rev = "v${version}";
22     hash = "sha256-rMkPBRg0QluMmSCAWSvET7rS/A2aUL6H31KKoZ6NTEs=";
23   };
25   strictDeps = true;
26   nativeBuildInputs = [
27     pkg-config
28     installShellFiles
29   ];
30   buildInputs = [
31     kmod
32     libevdev
33     bash
34   ];
36   installFlags = [
37     "PREFIX=$(out)"
38     "INITDIR_SYSTEMD=$(out)/lib/systemd/user"
39   ];
41   postPatch = ''
42     substituteInPlace ./common/modprobed-db.in \
43       --replace "/usr/share" "$out/share"
44   '';
46   postInstall = ''
47     installShellCompletion --zsh common/zsh-completion
48   '';
50   meta = {
51     homepage = "https://github.com/graysky2/modprobed-db";
52     description = "Useful utility for users wishing to build a minimal kernel via a make localmodconfig";
53     license = lib.licenses.mit;
54     maintainers = with lib.maintainers; [ NotAShelf ];
55     mainProgram = "modprobed-db";
56     platforms = lib.platforms.linux;
57   };