2021-12-06 16:07:01 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "bakelite";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "unstable-2022-02-12";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "richfelker";
|
|
|
|
repo = pname;
|
2022-04-27 09:35:20 +00:00
|
|
|
rev = "373901734d114e42aa385e6a7843745674e4ca08";
|
|
|
|
hash = "sha256-HBnYlUyTkvPTbdsZD02yCq5C7yXOHYK4l4mDRUkcN5I=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
hardeningEnable = [ "pie" ];
|
2022-04-27 09:35:20 +00:00
|
|
|
preBuild = ''
|
|
|
|
# pipe2() is only exposed with _GNU_SOURCE
|
|
|
|
# Upstream makefile explicitly uses -O3 to improve SHA-3 performance
|
|
|
|
makeFlagsArray+=( CFLAGS="-D_GNU_SOURCE -g -O3" )
|
|
|
|
'';
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp bakelite $out/bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/richfelker/bakelite";
|
|
|
|
description = "Incremental backup with strong cryptographic confidentality";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ mvs ];
|
2022-06-16 17:23:12 +00:00
|
|
|
# no support for Darwin (yet: https://github.com/richfelker/bakelite/pull/5)
|
|
|
|
platforms = platforms.linux;
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
}
|