git.iko.soy/typeable/nixpkgs
on master help sign in
infnoise: init at master
commitdca0aec9b8204a596e4b0e46b533cab318d81150 authorStijn DW <nixdev@rinsa.eu> dateSat 10 Apr 2021, 21:50 (6 years ago) parent1035397
3 files changed+59
pkgs/misc/drivers/infnoise/default.nix+43 pkgs/misc/drivers/infnoise/makefile.patch+14 pkgs/top-level/all-packages.nix+2
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
@@ -29617,6 +29617,8 @@ in
2961729617
2961829618 image_optim = callPackage ../applications/graphics/image_optim { inherit (nodePackages) svgo; };
2961929619
29620+ infnoise = callPackage ../misc/drivers/infnoise { };
29621+
2962029622 # using the new configuration style proposal which is unstable
2962129623 jack1 = callPackage ../misc/jackaudio/jack1.nix { };
2962229624