From 10353970bb4bebb868d68904c816790a5ca2a950 Mon Sep 17 00:00:00 2001 From: Stijn DW Date: Mon, 5 Apr 2021 17:46:06 +0200 Subject: [PATCH 1/2] maintainers: update github name, email --- maintainers/maintainer-list.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index e2bf9f5f49e..610e78b9184 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -9266,8 +9266,8 @@ name = "Stian Lågstad"; }; StijnDW = { - email = "stekke@airmail.cc"; - github = "StijnDW"; + email = "nixdev@rinsa.eu"; + github = "Stekke"; githubId = 1751956; name = "Stijn DW"; }; From dca0aec9b8204a596e4b0e46b533cab318d81150 Mon Sep 17 00:00:00 2001 From: Stijn DW Date: Sat, 10 Apr 2021 21:50:34 +0200 Subject: [PATCH 2/2] infnoise: init at master --- pkgs/misc/drivers/infnoise/default.nix | 43 +++++++++++++++++++++++ pkgs/misc/drivers/infnoise/makefile.patch | 14 ++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 59 insertions(+) create mode 100644 pkgs/misc/drivers/infnoise/default.nix create mode 100644 pkgs/misc/drivers/infnoise/makefile.patch diff --git a/pkgs/misc/drivers/infnoise/default.nix b/pkgs/misc/drivers/infnoise/default.nix new file mode 100644 index 00000000000..b64cb56c407 --- /dev/null +++ b/pkgs/misc/drivers/infnoise/default.nix @@ -0,0 +1,43 @@ +{ lib, stdenv, fetchFromGitHub, libftdi }: + +stdenv.mkDerivation rec { + pname = "infnoise"; + version = "unstable-2019-08-12"; + + src = fetchFromGitHub { + owner = "13-37-org"; + repo = "infnoise"; + rev = "132683d4b5ce0902468b666cba63baea36e97f0c"; + sha256 = "1dzfzinyvhyy9zj32kqkl19fyhih6sy8r5sa3qahbbr4c30k7flp"; + }; + + # Patch makefile so we can set defines from the command line instead of it depending on .git + patches = [ ./makefile.patch ]; + GIT_COMMIT = src.rev; + GIT_VERSION = version; + GIT_DATE = "2019-08-12"; + + buildInputs = [ libftdi ]; + + sourceRoot = "source/software"; + makefile = "Makefile.linux"; + makeFlags = [ "PREFIX=$(out)" ]; + postPatch = '' + substituteInPlace init_scripts/infnoise.service --replace "/usr/local" "$out" + ''; + + meta = with lib; { + homepage = "https://github.com/13-37-org/infnoise"; + description = "Driver for the Infinite Noise TRNG"; + longDescription = '' + The Infinite Noise TRNG is a USB key hardware true random number generator. + It can either provide rng for userland applications, or provide rng for the OS entropy. + Add the following to your system configuration for plug and play support, adding to the OS entropy: + systemd.packages = [ pkgs.infnoise ]; + services.udev.packages = [ pkgs.infnoise ]; + ''; + license = licenses.cc0; + maintainers = with maintainers; [ StijnDW ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/misc/drivers/infnoise/makefile.patch b/pkgs/misc/drivers/infnoise/makefile.patch new file mode 100644 index 00000000000..b38519036d2 --- /dev/null +++ b/pkgs/misc/drivers/infnoise/makefile.patch @@ -0,0 +1,14 @@ +diff --git a/software/Makefile.linux b/software/Makefile.linux +index db48aa5..df8b3d2 100644 +--- a/Makefile.linux ++++ b/Makefile.linux +@@ -1,6 +1,6 @@ +-GIT_VERSION := $(shell git --no-pager describe --tags --always) +-GIT_COMMIT := $(shell git rev-parse --verify HEAD) +-GIT_DATE := $(firstword $(shell git --no-pager show --date=iso-strict --format="%ad" --name-only)) ++GIT_VERSION ?= $(shell git --no-pager describe --tags --always) ++GIT_COMMIT ?= $(shell git rev-parse --verify HEAD) ++GIT_DATE ?= $(firstword $(shell git --no-pager show --date=iso-strict --format="%ad" --name-only)) + + PREFIX = $(DESTDIR)/usr/local + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 32c6eb4ee80..06c71f93017 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -29617,6 +29617,8 @@ in image_optim = callPackage ../applications/graphics/image_optim { inherit (nodePackages) svgo; }; + infnoise = callPackage ../misc/drivers/infnoise { }; + # using the new configuration style proposal which is unstable jack1 = callPackage ../misc/jackaudio/jack1.nix { };