summary refs log tree commit diff
path: root/pkgs/development/libraries/volume-key/default.nix
blob: 567a5e3e251a9ff72a178d4e15aa78ad54b1b9c2 (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
36
37
38
39
40
41
42
43
44
45
46
47
48
{ lib, stdenv, fetchgit, autoreconfHook, pkg-config, gettext, python3
, ncurses, swig, glib, util-linux, cryptsetup, nss, gpgme
, autoconf, automake, libtool
, buildPackages
}:

let
  version = "0.3.11";
in stdenv.mkDerivation {
  pname = "volume_key";
  inherit version;

  src = fetchgit {
    url = "https://pagure.io/volume_key.git";
    rev = "volume_key-${version}";
    sha256 = "1sqdbcih1c39bjiv4mm1m7acc3lfh2i2hf2r9i7rk8adfzq8awma";
  };

  outputs = [ "out" "man" "dev" "py" ];

  nativeBuildInputs = [ autoconf automake libtool pkg-config gettext swig ];

  buildInputs = [ autoreconfHook glib cryptsetup nss util-linux gpgme ncurses ];

  configureFlags = [
    "--with-gpgme-prefix=${gpgme.dev}"
  ];

  preConfigure = ''
    export PYTHON="${buildPackages.python3}/bin/python"
    export PYTHON3_CONFIG="${python3}/bin/python3-config"
  '';

  makeFlags = [
    "pyexecdir=$(py)/${python3.sitePackages}"
    "pythondir=$(py)/${python3.sitePackages}"
  ];

  doCheck = false; # fails 1 out of 1 tests, needs `certutil`

  meta = with lib; {
    description = "A library for manipulating storage volume encryption keys and storing them separately from volumes to handle forgotten passphrases, and the associated command-line tool";
    homepage = "https://pagure.io/volume_key/";
    license = licenses.gpl2;
    maintainers = with maintainers; [];
    platforms = platforms.linux;
  };
}