From d27be236f11c05da21322cb0d00a97f56c6be450 Mon Sep 17 00:00:00 2001 From: Kai Harries Date: Sun, 3 Jan 2021 13:03:19 +0100 Subject: [PATCH 1/2] nitrokey-app: 1.3.2 -> 1.4.2 The optional argument group was removed because it is no longer used in the udev-rules that come with the libnitrokey. --- pkgs/tools/security/nitrokey-app/default.nix | 9 ++------- pkgs/tools/security/nitrokey-app/udev-rules.nix | 9 ++------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/pkgs/tools/security/nitrokey-app/default.nix b/pkgs/tools/security/nitrokey-app/default.nix index c3aebc782d8a..bc7731a0a7aa 100644 --- a/pkgs/tools/security/nitrokey-app/default.nix +++ b/pkgs/tools/security/nitrokey-app/default.nix @@ -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 diff --git a/pkgs/tools/security/nitrokey-app/udev-rules.nix b/pkgs/tools/security/nitrokey-app/udev-rules.nix index a8143ae6925c..11dcd63d7761 100644 --- a/pkgs/tools/security/nitrokey-app/udev-rules.nix +++ b/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}"; @@ -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 From 991aba30f81235c0d8221c069a9ff20bdbf6c904 Mon Sep 17 00:00:00 2001 From: Kai Harries Date: Sun, 3 Jan 2021 15:16:26 +0100 Subject: [PATCH 2/2] module nitrokey: drop option group Since the update of the nitrokey-app to 1.4.2 the group option is no longer supported. --- nixos/modules/hardware/nitrokey.nix | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/nixos/modules/hardware/nitrokey.nix b/nixos/modules/hardware/nitrokey.nix index 02e4c3f46f8d..baa07203118c 100644 --- a/nixos/modules/hardware/nitrokey.nix +++ b/nixos/modules/hardware/nitrokey.nix @@ -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 ]; }; }