mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-20 00:53:12 +03:00
57 lines
1.3 KiB
Nix
57 lines
1.3 KiB
Nix
{ stdenv
|
|
, lib
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, pkg-config
|
|
, makeWrapper
|
|
, webkitgtk
|
|
, zenity
|
|
, Cocoa
|
|
, Security
|
|
, WebKit
|
|
, withGui ? true
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "alfis";
|
|
version = "0.6.9";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Revertron";
|
|
repo = "Alfis";
|
|
rev = "v${version}";
|
|
sha256 = "1nnzy46hp1q9kcxzjx24d60frjhn3x46nksbqvdfcfrfn5pqrabh";
|
|
};
|
|
|
|
cargoSha256 = "02liz8sqnqla77bqxfa8hj93qfj2x482q2bijz66rmazfig3b045";
|
|
|
|
checkFlags = [
|
|
# these want internet access, disable them
|
|
"--skip=dns::client::tests::test_tcp_client"
|
|
"--skip=dns::client::tests::test_udp_client"
|
|
];
|
|
|
|
nativeBuildInputs = [ pkg-config makeWrapper ];
|
|
buildInputs = lib.optional stdenv.isDarwin Security
|
|
++ lib.optional (withGui && stdenv.isLinux) webkitgtk
|
|
++ lib.optionals (withGui && stdenv.isDarwin) [ Cocoa WebKit ];
|
|
|
|
buildNoDefaultFeatures = true;
|
|
buildFeatures = [
|
|
"doh"
|
|
] ++ lib.optional withGui "webgui";
|
|
|
|
postInstall = lib.optionalString (withGui && stdenv.isLinux) ''
|
|
wrapProgram $out/bin/alfis \
|
|
--prefix PATH : ${lib.makeBinPath [ zenity ]}
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Alternative Free Identity System";
|
|
homepage = "https://alfis.name";
|
|
license = licenses.agpl3Only;
|
|
maintainers = with maintainers; [ misuzu ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|