alfis: Add support for GUI dialogs
This commit is contained in:
parent
bc9b956714
commit
ad2f75b559
@ -1,6 +1,5 @@
|
||||
{ stdenv, lib, fetchFromGitHub, rustPlatform, pkg-config
|
||||
, withGui ? true, webkitgtk, Cocoa, WebKit
|
||||
}:
|
||||
{ stdenv, lib, fetchFromGitHub, rustPlatform, pkg-config, withGui ? true
|
||||
, webkitgtk, Cocoa, WebKit, dialog, makeWrapper }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "alfis";
|
||||
@ -27,10 +26,16 @@ rustPlatform.buildRustPackage rec {
|
||||
"--skip=dns::client::tests::test_udp_client"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
nativeBuildInputs = [ pkg-config makeWrapper ];
|
||||
buildInputs = lib.optional (withGui && stdenv.isLinux) webkitgtk
|
||||
++ lib.optionals (withGui && stdenv.isDarwin) [ Cocoa WebKit ];
|
||||
|
||||
postInstall = lib.optionalString (withGui && stdenv.isLinux) ''
|
||||
cp $out/bin/alfis{,_unwrapped}
|
||||
makeWrapper $out/bin/alfis{_unwrapped,} \
|
||||
--prefix PATH : ${lib.makeBinPath [ dialog ]}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Alternative Free Identity System";
|
||||
homepage = "https://alfis.name";
|
||||
|
@ -28669,6 +28669,7 @@ with pkgs;
|
||||
|
||||
alfis = callPackage ../applications/blockchains/alfis {
|
||||
inherit (darwin.apple_sdk.frameworks) Cocoa WebKit;
|
||||
dialog = gnome.zenity;
|
||||
};
|
||||
alfis-nogui = alfis.override {
|
||||
withGui = false;
|
||||
|
Loading…
Reference in New Issue
Block a user