Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nitrokey-app: 1.3.2 -> 1.4.2 #108319

Merged
merged 2 commits into from Jan 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 1 addition & 15 deletions nixos/modules/hardware/nitrokey.nix
Expand Up @@ -19,23 +19,9 @@ in
nitrokey-app package, depending on your device and needs.
'';
};

group = mkOption {
type = types.str;
default = "nitrokey";
example = "wheel";
description = ''
Grant access to Nitrokey devices to users in this group.
'';
};
};

config = mkIf cfg.enable {
services.udev.packages = [
(pkgs.nitrokey-udev-rules.override (attrs:
{ inherit (cfg) group; }
))
];
users.groups.${cfg.group} = {};
services.udev.packages = [ pkgs.nitrokey-udev-rules ];
};
}
9 changes: 2 additions & 7 deletions pkgs/tools/security/nitrokey-app/default.nix
Expand Up @@ -3,21 +3,16 @@

stdenv.mkDerivation rec {
pname = "nitrokey-app";
version = "1.3.2";
version = "1.4.2";

src = fetchFromGitHub {
owner = "Nitrokey";
repo = "nitrokey-app";
rev = "v${version}";
sha256 = "193kzlz3qn9il56h78faiqkgv749hdils1nn1iw6g3wphgx5fjs2";
sha256 = "1k0w921hfrya4q2r7bqn7kgmwvwb7c15k9ymlbnksmfc9yyjyfcv";
fetchSubmodules = true;
};

postPatch = ''
substituteInPlace libnitrokey/CMakeLists.txt \
--replace '/data/41-nitrokey.rules' '/libnitrokey/data/41-nitrokey.rules'
'';

buildInputs = [
bash-completion
hidapi
Expand Down
9 changes: 2 additions & 7 deletions pkgs/tools/security/nitrokey-app/udev-rules.nix
@@ -1,6 +1,5 @@
{ lib, stdenv, nitrokey-app
, group ? "nitrokey"
}:
{ lib, stdenv, nitrokey-app }:


stdenv.mkDerivation {
name = "nitrokey-udev-rules-${lib.getVersion nitrokey-app}";
Expand All @@ -9,10 +8,6 @@ stdenv.mkDerivation {

dontBuild = true;

patchPhase = ''
substituteInPlace libnitrokey/data/41-nitrokey.rules --replace plugdev "${group}"
'';

installPhase = ''
mkdir -p $out/etc/udev/rules.d
cp libnitrokey/data/41-nitrokey.rules $out/etc/udev/rules.d
Expand Down