nixpkgs/pkgs/tools/security/clevis/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

76 lines
1.4 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, asciidoc
, coreutils
, cryptsetup
, curl
, fetchFromGitHub
, gnugrep
, gnused
, jansson
, jose
, libpwquality
, luksmeta
, makeWrapper
, meson
, ninja
, pkg-config
, tpm2-tools
2020-02-09 17:35:52 +00:00
}:
stdenv.mkDerivation rec {
pname = "clevis";
version = "19";
2020-02-09 17:35:52 +00:00
src = fetchFromGitHub {
owner = "latchset";
repo = pname;
2023-03-01 22:23:27 +00:00
rev = "refs/tags/v${version}";
hash = "sha256-3J3ti/jRiv+p3eVvJD7u0ko28rPd8Gte0mCJaVaqyOs=";
2020-02-09 17:35:52 +00:00
};
postPatch = ''
for f in $(find src/ -type f); do
grep -q "/bin/cat" "$f" && substituteInPlace "$f" \
--replace '/bin/cat' '${coreutils}/bin/cat' || true
done
'';
postInstall = ''
# We wrap the main clevis binary entrypoint but not the sub-binaries.
wrapProgram $out/bin/clevis \
--prefix PATH ':' "${lib.makeBinPath [tpm2-tools jose cryptsetup libpwquality luksmeta gnugrep gnused coreutils]}:${placeholder "out"}/bin"
'';
nativeBuildInputs = [
asciidoc
makeWrapper
meson
ninja
pkg-config
];
buildInputs = [
cryptsetup
curl
jansson
jose
libpwquality
luksmeta
tpm2-tools
];
2020-02-09 17:35:52 +00:00
outputs = [
"out"
"man"
];
2020-02-09 17:35:52 +00:00
2023-03-01 22:23:27 +00:00
meta = with lib; {
2020-02-09 17:35:52 +00:00
description = "Automated Encryption Framework";
homepage = "https://github.com/latchset/clevis";
2023-03-01 22:23:27 +00:00
changelog = "https://github.com/latchset/clevis/releases/tag/v${version}";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ ];
2020-02-09 17:35:52 +00:00
};
}