alfis: Add support for GUI dialogs

main
gardspirito 3 years ago
parent bc9b956714
commit ad2f75b559
No known key found for this signature in database
GPG Key ID: 5BC37C66336029C5
  1. 13
      pkgs/applications/blockchains/alfis/default.nix
  2. 1
      pkgs/top-level/all-packages.nix

@ -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…
Cancel
Save