2021-11-28 14:24:52 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "bakelite";
|
2022-02-07 12:50:37 +00:00
|
|
|
version = "unstable-2022-02-12";
|
2021-11-28 14:24:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "richfelker";
|
|
|
|
repo = pname;
|
2022-02-07 12:50:37 +00:00
|
|
|
rev = "373901734d114e42aa385e6a7843745674e4ca08";
|
|
|
|
hash = "sha256-HBnYlUyTkvPTbdsZD02yCq5C7yXOHYK4l4mDRUkcN5I=";
|
2021-11-28 14:24:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
hardeningEnable = [ "pie" ];
|
2022-02-07 12:50:37 +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-11-28 14:24:52 +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-05-19 20:35:58 +01:00
|
|
|
# no support for Darwin (yet: https://github.com/richfelker/bakelite/pull/5)
|
|
|
|
platforms = platforms.linux;
|
2021-11-28 14:24:52 +00:00
|
|
|
};
|
|
|
|
}
|