git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #119081 from Stekke/infnoise
commitde959006f53d1715dbf4f94480c9076248db510f authorSandro <sandro.jaeckel@gmail.com> dateSat 24 Apr 2021, 07:42 (6 years ago) parent292b2d3dca0aec
4 files changed+61−2
maintainers/maintainer-list.nix+2−2 pkgs/misc/drivers/infnoise/default.nix+43 pkgs/misc/drivers/infnoise/makefile.patch+14 pkgs/top-level/all-packages.nix+2
maintainers/maintainer-list.nix+2−2
@@ -9432,8 +9432,8 @@
94329432 name = "Stian Lågstad";
94339433 };
94349434 StijnDW = {
9435− email = "stekke@airmail.cc";
9436− github = "StijnDW";
9435+ email = "nixdev@rinsa.eu";
9436+ github = "Stekke";
94379437 githubId = 1751956;
94389438 name = "Stijn DW";
94399439 };
pkgs/misc/drivers/infnoise/default.nixnew file+43
@@ -0,0 +1,43 @@
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+}
pkgs/misc/drivers/infnoise/makefile.patchnew file+14
@@ -0,0 +1,14 @@
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+
pkgs/top-level/all-packages.nix+2
@@ -29873,6 +29873,8 @@ in
2987329873
2987429874 image_optim = callPackage ../applications/graphics/image_optim { inherit (nodePackages) svgo; };
2987529875
29876+ infnoise = callPackage ../misc/drivers/infnoise { };
29877+
2987629878 # using the new configuration style proposal which is unstable
2987729879 jack1 = callPackage ../misc/jackaudio/jack1.nix { };
2987829880