Merge pull request #144635 from gardspirito/alfis-dialog

This commit is contained in:
Sandro 2021-11-13 13:27:02 +01:00 committed by GitHub
commit 6b46e6b0f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 4 deletions

View File

@ -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, zenity, makeWrapper }:
rustPlatform.buildRustPackage rec {
pname = "alfis";
@ -27,10 +26,15 @@ 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) ''
wrapProgram $out/bin/alfis \
--prefix PATH : ${lib.makeBinPath [ zenity ]}
'';
meta = with lib; {
description = "Alternative Free Identity System";
homepage = "https://alfis.name";

View File

@ -29499,6 +29499,7 @@ with pkgs;
alfis = callPackage ../applications/blockchains/alfis {
inherit (darwin.apple_sdk.frameworks) Cocoa WebKit;
inherit (gnome) zenity;
};
alfis-nogui = alfis.override {
withGui = false;