Merge pull request #119081 from Stekke/infnoise

authored by Sandro and committed by GitHub de959006 292b2d38

+61 -2
+2 -2
maintainers/maintainer-list.nix
··· 9432 name = "Stian Lågstad"; 9433 }; 9434 StijnDW = { 9435 - email = "stekke@airmail.cc"; 9436 - github = "StijnDW"; 9437 githubId = 1751956; 9438 name = "Stijn DW"; 9439 };
··· 9432 name = "Stian Lågstad"; 9433 }; 9434 StijnDW = { 9435 + email = "nixdev@rinsa.eu"; 9436 + github = "Stekke"; 9437 githubId = 1751956; 9438 name = "Stijn DW"; 9439 };
+43
pkgs/misc/drivers/infnoise/default.nix
···
··· 1 + { lib, stdenv, fetchFromGitHub, libftdi }: 2 + 3 + stdenv.mkDerivation rec { 4 + pname = "infnoise"; 5 + version = "unstable-2019-08-12"; 6 + 7 + src = fetchFromGitHub { 8 + owner = "13-37-org"; 9 + repo = "infnoise"; 10 + rev = "132683d4b5ce0902468b666cba63baea36e97f0c"; 11 + sha256 = "1dzfzinyvhyy9zj32kqkl19fyhih6sy8r5sa3qahbbr4c30k7flp"; 12 + }; 13 + 14 + # Patch makefile so we can set defines from the command line instead of it depending on .git 15 + patches = [ ./makefile.patch ]; 16 + GIT_COMMIT = src.rev; 17 + GIT_VERSION = version; 18 + GIT_DATE = "2019-08-12"; 19 + 20 + buildInputs = [ libftdi ]; 21 + 22 + sourceRoot = "source/software"; 23 + makefile = "Makefile.linux"; 24 + makeFlags = [ "PREFIX=$(out)" ]; 25 + postPatch = '' 26 + substituteInPlace init_scripts/infnoise.service --replace "/usr/local" "$out" 27 + ''; 28 + 29 + meta = with lib; { 30 + homepage = "https://github.com/13-37-org/infnoise"; 31 + description = "Driver for the Infinite Noise TRNG"; 32 + longDescription = '' 33 + The Infinite Noise TRNG is a USB key hardware true random number generator. 34 + It can either provide rng for userland applications, or provide rng for the OS entropy. 35 + Add the following to your system configuration for plug and play support, adding to the OS entropy: 36 + systemd.packages = [ pkgs.infnoise ]; 37 + services.udev.packages = [ pkgs.infnoise ]; 38 + ''; 39 + license = licenses.cc0; 40 + maintainers = with maintainers; [ StijnDW ]; 41 + platforms = platforms.linux; 42 + }; 43 + }
+14
pkgs/misc/drivers/infnoise/makefile.patch
···
··· 1 + diff --git a/software/Makefile.linux b/software/Makefile.linux 2 + index db48aa5..df8b3d2 100644 3 + --- a/Makefile.linux 4 + +++ b/Makefile.linux 5 + @@ -1,6 +1,6 @@ 6 + -GIT_VERSION := $(shell git --no-pager describe --tags --always) 7 + -GIT_COMMIT := $(shell git rev-parse --verify HEAD) 8 + -GIT_DATE := $(firstword $(shell git --no-pager show --date=iso-strict --format="%ad" --name-only)) 9 + +GIT_VERSION ?= $(shell git --no-pager describe --tags --always) 10 + +GIT_COMMIT ?= $(shell git rev-parse --verify HEAD) 11 + +GIT_DATE ?= $(firstword $(shell git --no-pager show --date=iso-strict --format="%ad" --name-only)) 12 + 13 + PREFIX = $(DESTDIR)/usr/local 14 +
+2
pkgs/top-level/all-packages.nix
··· 29873 29874 image_optim = callPackage ../applications/graphics/image_optim { inherit (nodePackages) svgo; }; 29875 29876 # using the new configuration style proposal which is unstable 29877 jack1 = callPackage ../misc/jackaudio/jack1.nix { }; 29878
··· 29873 29874 image_optim = callPackage ../applications/graphics/image_optim { inherit (nodePackages) svgo; }; 29875 29876 + infnoise = callPackage ../misc/drivers/infnoise { }; 29877 + 29878 # using the new configuration style proposal which is unstable 29879 jack1 = callPackage ../misc/jackaudio/jack1.nix { }; 29880