Commit 4e050f56 authored by nikstur's avatar nikstur
Browse files

libkcapi: make bashless

parent 2aba62ee
Loading
Loading
Loading
Loading
+16 −3
Original line number Diff line number Diff line
@@ -13,17 +13,24 @@
  kcapi-dgstapp ? true,
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
  pname = "libkcapi";
  version = "1.5.0";

  src = fetchFromGitHub {
    owner = "smuellerDD";
    repo = "libkcapi";
    rev = "v${version}";
    rev = "v${finalAttrs.version}";
    hash = "sha256-xOI29cjhUGUeHLaYIrPA5ZwwCE9lBdZG6kaW0lo1uL8=";
  };

  outputs = [
    "out"
  ]
  ++ lib.optionals kcapi-test [
    "selftests"
  ];

  nativeBuildInputs = [ autoreconfHook ];

  # libkcapi looks also for a host c compiler when cross-compiling
@@ -33,6 +40,7 @@ stdenv.mkDerivation rec {
    buildPackages.stdenv.cc
  ];

  strictDeps = true;
  enableParallelBuilding = true;

  configureFlags =
@@ -43,6 +51,11 @@ stdenv.mkDerivation rec {
    ++ lib.optional kcapi-encapp "--enable-kcapi-encapp"
    ++ lib.optional kcapi-dgstapp "--enable-kcapi-dgstapp";

  postInstall = lib.optionalString kcapi-test ''
    mkdir -p $selftests/bin
    find $out -iname '*.sh' -exec mv {} $selftests/bin/ \;
  '';

  meta = {
    homepage = "http://www.chronox.de/libkcapi.html";
    description = "Linux Kernel Crypto API User Space Interface Library";
@@ -56,4 +69,4 @@ stdenv.mkDerivation rec {
      thillux
    ];
  };
}
})