Merge pull request #130386 from fabaff/bump-ssss

This commit is contained in:
Sandro 2021-07-22 15:39:05 +02:00 committed by GitHub
commit 3ef8465c6d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,28 +1,45 @@
{ lib, stdenv, fetchurl, gmp }:
{ lib
, stdenv
, fetchFromGitHub
, gmp
, installShellFiles
}:
stdenv.mkDerivation {
name = "ssss-0.5";
stdenv.mkDerivation rec {
pname = "ssss";
version = "0.5.7";
src = fetchurl {
url = "http://point-at-infinity.org/ssss/ssss-0.5.tar.gz";
sha256 = "15grn2fp1x8p92kxkwbmsx8rz16g93y9grl3hfqbh1jn21ama5jx";
src = fetchFromGitHub {
owner = "MrJoy";
repo = pname;
rev = "releases%2Fv${version}";
sha256 = "18r1hwch6nq6gjijavr4pvrxz2plrlrvdx8ssqhdj2vmqvlqwbvd";
};
buildInputs = [ gmp ];
nativeBuildInputs = [
installShellFiles
];
preBuild =
''
sed -e s@/usr/@$out/@g -i Makefile
cp ssss.manpage.xml ssss.1
cp ssss.manpage.xml ssss.1.html
mkdir -p $out/bin $out/share/man/man1
echo -e 'install:\n\tcp ssss-combine ssss-split '"$out"'/bin' >>Makefile
'';
buildInputs = [
gmp
];
meta = {
preBuild = ''
sed -e s@/usr/@$out/@g -i Makefile
cp ssss.manpage.xml ssss.1
mkdir -p $out/bin
echo -e 'install:\n\tcp ssss-combine ssss-split '"$out"'/bin' >>Makefile
'';
postInstall = ''
installManPage ssss.1
'';
meta = with lib; {
description = "Shamir Secret Sharing Scheme";
homepage = "http://point-at-infinity.org/ssss/";
platforms = lib.platforms.unix;
license = lib.licenses.gpl2;
license = licenses.gpl2Plus;
platforms = platforms.unix;
maintainers = with maintainers; [ ];
};
}