2024-06-29 20:09:06 +00:00
|
|
|
{
|
|
|
|
stdenv,
|
|
|
|
lib,
|
|
|
|
rustPlatform,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pkg-config,
|
|
|
|
makeWrapper,
|
2024-10-05 01:00:54 +00:00
|
|
|
webkitgtk_4_0,
|
2024-06-29 20:09:06 +00:00
|
|
|
zenity,
|
|
|
|
Cocoa,
|
|
|
|
Security,
|
|
|
|
WebKit,
|
|
|
|
withGui ? true,
|
2021-11-13 12:59:21 +00:00
|
|
|
}:
|
2021-07-07 17:35:01 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "alfis";
|
2024-07-18 17:17:06 +00:00
|
|
|
version = "0.8.5";
|
2021-07-07 17:35:01 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Revertron";
|
|
|
|
repo = "Alfis";
|
2024-07-18 17:17:06 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-ettStNktSDZnYNN/IWqTB1Ou1g1QEGFabS4EatnDLaE=";
|
2021-07-07 17:35:01 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 07:11:27 +00:00
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
2024-07-18 17:17:06 +00:00
|
|
|
"ecies-ed25519-ng-0.5.3" = "sha256-sJZ5JCaGNa3DdAaHw7/2qeLYv+HDKEMcY4uHbzfzQBM=";
|
|
|
|
"ureq-2.10.0" = "sha256-XNjY8qTgt2OzlfKu7ECIfgRLkSlprvjpgITsNVMi1uc=";
|
2024-06-29 14:49:32 +00:00
|
|
|
"web-view-0.7.3" = "sha256-eVMcpMRZHwOdWhfV6Z1uGUNOmhB41YZPaiz1tRQvhrI=";
|
2023-07-15 07:11:27 +00:00
|
|
|
};
|
|
|
|
};
|
2021-07-07 17:35:01 +00:00
|
|
|
|
2024-06-29 20:09:06 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
makeWrapper
|
|
|
|
];
|
|
|
|
buildInputs =
|
|
|
|
lib.optional stdenv.hostPlatform.isDarwin Security
|
2024-10-05 01:00:54 +00:00
|
|
|
++ lib.optional (withGui && stdenv.hostPlatform.isLinux) webkitgtk_4_0
|
2024-06-29 20:09:06 +00:00
|
|
|
++ lib.optionals (withGui && stdenv.hostPlatform.isDarwin) [
|
|
|
|
Cocoa
|
|
|
|
WebKit
|
|
|
|
];
|
2021-07-07 17:35:01 +00:00
|
|
|
|
2021-11-16 00:10:25 +00:00
|
|
|
buildNoDefaultFeatures = true;
|
2024-06-29 20:09:06 +00:00
|
|
|
buildFeatures = [ "doh" ] ++ lib.optional withGui "webgui";
|
2021-11-16 00:10:25 +00:00
|
|
|
|
2024-06-29 14:49:32 +00: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 16:53:23 +00:00
|
|
|
postInstall = lib.optionalString (withGui && stdenv.hostPlatform.isLinux) ''
|
2021-11-08 14:25:59 +00:00
|
|
|
wrapProgram $out/bin/alfis \
|
|
|
|
--prefix PATH : ${lib.makeBinPath [ zenity ]}
|
2021-11-04 16:53:23 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-29 14:49:32 +00:00
|
|
|
meta = {
|
2021-07-07 17:35:01 +00:00
|
|
|
description = "Alternative Free Identity System";
|
|
|
|
homepage = "https://alfis.name";
|
2024-10-04 19:35:12 +00:00
|
|
|
changelog = "https://github.com/Revertron/Alfis/releases/tag/v${version}";
|
2024-06-29 14:49:32 +00:00
|
|
|
license = lib.licenses.agpl3Only;
|
|
|
|
maintainers = with lib.maintainers; [ misuzu ];
|
|
|
|
platforms = lib.platforms.unix;
|
2023-11-27 01:17:53 +00:00
|
|
|
mainProgram = "alfis";
|
2024-06-29 14:49:32 +00:00
|
|
|
broken = withGui && stdenv.hostPlatform.isDarwin;
|
2021-07-07 17:35:01 +00:00
|
|
|
};
|
|
|
|
}
|