nixpkgs-suyu/pkgs/applications/blockchains/alfis/default.nix

57 lines
1.3 KiB
Nix
Raw Normal View History

2021-11-13 13:59:21 +01:00
{ stdenv
, lib
, rustPlatform
, fetchFromGitHub
, pkg-config
, makeWrapper
, webkitgtk
, zenity
, Cocoa
, Security
, WebKit
, withGui ? true
}:
2021-07-07 19:35:01 +02:00
rustPlatform.buildRustPackage rec {
pname = "alfis";
2021-11-13 13:59:21 +01:00
version = "0.6.9";
2021-07-07 19:35:01 +02:00
src = fetchFromGitHub {
owner = "Revertron";
repo = "Alfis";
rev = "v${version}";
2021-11-13 13:59:21 +01:00
sha256 = "1nnzy46hp1q9kcxzjx24d60frjhn3x46nksbqvdfcfrfn5pqrabh";
2021-07-07 19:35:01 +02:00
};
2021-11-13 13:59:21 +01:00
cargoSha256 = "02liz8sqnqla77bqxfa8hj93qfj2x482q2bijz66rmazfig3b045";
2021-07-07 19:35:01 +02:00
checkFlags = [
# these want internet access, disable them
"--skip=dns::client::tests::test_tcp_client"
"--skip=dns::client::tests::test_udp_client"
];
2021-11-04 17:53:23 +01:00
nativeBuildInputs = [ pkg-config makeWrapper ];
2021-11-13 13:59:21 +01:00
buildInputs = lib.optional stdenv.isDarwin Security
++ lib.optional (withGui && stdenv.isLinux) webkitgtk
2021-07-07 19:35:01 +02:00
++ lib.optionals (withGui && stdenv.isDarwin) [ Cocoa WebKit ];
2021-11-16 01:10:25 +01:00
buildNoDefaultFeatures = true;
2021-11-13 13:59:21 +01:00
buildFeatures = [
"doh"
] ++ lib.optional withGui "webgui";
2021-11-16 01:10:25 +01:00
2021-11-04 17:53:23 +01:00
postInstall = lib.optionalString (withGui && stdenv.isLinux) ''
wrapProgram $out/bin/alfis \
--prefix PATH : ${lib.makeBinPath [ zenity ]}
2021-11-04 17:53:23 +01:00
'';
2021-07-07 19:35:01 +02:00
meta = with lib; {
description = "Alternative Free Identity System";
homepage = "https://alfis.name";
license = licenses.agpl3Only;
maintainers = with maintainers; [ misuzu ];
platforms = platforms.unix;
};
}