NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.27k stars 14.25k forks source link

Package request: fde-tools #355036

Open Sk7Str1p3 opened 1 week ago

Sk7Str1p3 commented 1 week ago

Project description powerful toolkit for FDE settings

Metadata


Add a :+1: reaction to issues you find important.

Sigmanificient commented 1 week ago

Here is a start that build, noit sure what to do with it tho

{
  stdenv,
  fetchFromGitHub,
  libfido2,
  json_c,
  cryptsetup,
  gitMinimal
}:

stdenv.mkDerivation (finalAttrs: {
  name = "fde-tools";
  version = "0.7.2";

  src = fetchFromGitHub {
    owner = "openSUSE";
    repo = "fde-tools";
    rev = "refs/tags/${finalAttrs.version}";
    hash = "sha256-WPstx6f9fzBJIBg8CIpP3zl9tzCJ564A82PsPlUtdv8=";
  };

  postPatch = ''
    # man page generator dont work at all 
    substituteInPlace Makefile \
      --replace-fail "SUBDIRS := man bash-completion" "SUBDIRS := bash-completion"
  '';

  makeFlags = [
    "DESTDIR=${placeholder "out"}"
  ];

  nativeBuildInputs = [
    libfido2
    json_c
    cryptsetup
    gitMinimal
  ];

  meta = {
    description = "Tools for controlling full disk encryption";
  };
})
Sk7Str1p3 commented 1 week ago

sorry but how should i build this? im newbie

Sigmanificient commented 1 week ago

once set in pkgs/by-name/fd/fde-toos/package.nix, it should build with nix-build -A fde-tools. However, this derivation is a very rough sketch, so dont expected much from it