Skip to content

Commit

Permalink
Merge pull request #335607 from jovandeginste/beidconnect
Browse files Browse the repository at this point in the history
beidconnect: init at 2.10
  • Loading branch information
emilazy authored Aug 19, 2024
2 parents 8d90f80 + 3b4f6ef commit 4a7326c
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 0 deletions.
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10103,6 +10103,12 @@
githubId = 15893072;
name = "Josh van Leeuwen";
};
jovandeginste = {
email = "[email protected]";
github = "jovandeginste";
githubId = 3170771;
name = "Jo Vandeginste";
};
jpagex = {
name = "Jérémy Pagé";
email = "[email protected]";
Expand Down
86 changes: 86 additions & 0 deletions pkgs/by-name/be/beidconnect/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
lib,
stdenv,
fetchFromGitHub,
pcsclite,
boost,
pkg-config,
testers,
beidconnect,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "beidconnect";
version = "2.10";

src = fetchFromGitHub {
owner = "Fedict";
repo = "fts-beidconnect";
rev = finalAttrs.version;
hash = "sha256-xkBldXOlgLMgrvzm7ajXzJ92mpXrxHD1RX4DeBxU3kk=";
};

nativeBuildInputs = [ pkg-config ];

buildInputs = [
pcsclite.dev
boost
];

strictDeps = true;

postPatch = ''
substituteInPlace Makefile \
--replace-fail '$(DESTDIR)/usr/bin' '$(DESTDIR)/bin'
'';

makeFlags = [ "DESTDIR=$(out)" ];
sourceRoot = "${finalAttrs.src.name}/linux";

postInstall = ''
install -d \
$out/etc/chromium/native-messaging-hosts \
$out/etc/opt/chrome/native-messaging-hosts/ \
$out/etc/opt/edge/native-messaging-hosts/ \
$out/etc/opt/vivaldi/native-messaging-hosts/ \
$out/etc/opt/brave/native-messaging-hosts/ \
$out/lib/mozilla/native-messaging-hosts \
$out/bin/beidconnect -setup $out/bin \
$out/etc/chromium/native-messaging-hosts \
$out/lib/mozilla/native-messaging-hosts
# Chrome
install $out/etc/chromium/native-messaging-hosts/be.bosa.beidconnect.json $out/etc/opt/chrome/native-messaging-hosts/
# Edge
install $out/etc/chromium/native-messaging-hosts/be.bosa.beidconnect.json $out/etc/opt/edge/native-messaging-hosts/
# Vivaldi
install $out/etc/chromium/native-messaging-hosts/be.bosa.beidconnect.json $out/etc/opt/vivaldi/native-messaging-hosts/
# Brave
install $out/etc/chromium/native-messaging-hosts/be.bosa.beidconnect.json $out/etc/opt/brave/native-messaging-hosts/
'';

passthru.tests.version = testers.testVersion {
package = beidconnect;
command = "${beidconnect}/bin/beidconnect -version";
};

meta = {
description = "BeIDConnect native messaging component";
longDescription = ''
The beidconnect is a program to help implementing digital signing services
and/or an identity service using the Belgian eID card. It provides
services to webbrowsers to read data from cards, and is intended to work
together with a WebExtension in the browser.
This package contains the native code. For the WebExtension, see your
webbrowser's extension store.
'';
homepage = "https://github.com/Fedict/fts-beidconnect/";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.jovandeginste ];
platforms = lib.platforms.linux;
};
})

0 comments on commit 4a7326c

Please sign in to comment.