about summary refs log tree commit diff
path: root/packages/emacsql-sqlite.nix
blob: c9745fd0abe4b8c09f25d63bd393233158f48c9a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{
  fetchFromGitHub,
  lib,
  stdenv,
}:
stdenv.mkDerivation (finalAttrs: {
  pname = "emacsql-sqlite";
  version = "3.1.1";

  src = fetchFromGitHub {
    owner = "magit";
    repo = "emacsql";
    rev = finalAttrs.version;
    hash = "sha256-b/QEpWMTyVOdkOEhPNJ0x8ukUy9Gc9gYGjnlh0WU9fY=";
  };

  sourceRoot = "source/sqlite";

  installPhase = ''
    runHook preInstall

    install -Dm755 -t $out/bin ${finalAttrs.meta.mainProgram}

    runHook postInstall
  '';

  meta = with lib; {
    description = "SQLite interop binary for emacsql-sqlite";
    inherit (finalAttrs.src.meta) homepage;
    license = licenses.unlicense;
    platforms = platforms.unix;
    maintainers = with maintainers; [ azahi ];
    mainProgram = "emacsql-sqlite";
  };
})

Consider giving Nix/NixOS a try! <3