1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 21:50:55 +00:00

Merge pull request #28660 from NeQuissimus/frandom_patch

frandom: Remove
This commit is contained in:
Franz Pletz 2017-08-30 02:04:56 +02:00 committed by GitHub
commit b91ed35325
4 changed files with 0 additions and 82 deletions

View file

@ -550,7 +550,6 @@
./services/security/fail2ban.nix
./services/security/fprintd.nix
./services/security/fprot.nix
./services/security/frandom.nix
./services/security/haka.nix
./services/security/haveged.nix
./services/security/hologram-server.nix

View file

@ -1,31 +0,0 @@
{lib, config, ...}:
let kernel = config.boot.kernelPackages;
in
{
###### interface
options = {
services.frandom.enable = lib.mkOption {
default = false;
type = lib.types.bool;
description = ''
enable the /dev/frandom device (a very fast random number generator)
'';
};
};
###### implementation
config = lib.mkIf config.services.frandom.enable {
boot.kernelModules = [ "frandom" ];
boot.extraModulePackages = [ kernel.frandom ];
services.udev.packages = [ kernel.frandom ];
};
}

View file

@ -1,48 +0,0 @@
{ stdenv, fetchurl, kernel }:
let baseName = "frandom-1.1";
in
stdenv.mkDerivation rec {
name = "${baseName}-${kernel.version}";
src = fetchurl {
url = "mirror://sourceforge/frandom/${baseName}.tar.gz";
sha256 = "15rgyk4hfawqg7z1spk2xlk1nn6rcdls8gdhc70f91shrc9pvlls";
};
hardeningDisable = [ "pic" ];
preBuild = ''
kernelVersion=${kernel.modDirVersion}
substituteInPlace Makefile \
--replace "\$(shell uname -r)" "$kernelVersion" \
--replace "/lib/modules" "${kernel.dev}/lib/modules"
'';
installPhase = ''
kernelVersion=${kernel.modDirVersion}
mkdir -p $out/lib/modules/$kernelVersion/misc
cp frandom.ko $out/lib/modules/$kernelVersion/misc
mkdir -p $out/lib/udev/rules.d
tee $out/lib/udev/rules.d/10-frandom.rules <<-EOF
#
# These are the rules for the frandom devices. In theory, we could let
# udev's catch-all rule create the /dev node based upon the kernel name,
# which gives correct result, except that the default MODE set in
# 50-udev.rules (0600) is too restrictive.
#
KERNEL=="[ef]random", MODE="444", OPTIONS="last_rule"
EOF
'';
buildInputs = [];
meta = {
description = "A very fast random number generator kernel module";
homepage = http://frandom.sourceforge.net/;
license = stdenv.lib.licenses.gpl2;
maintainers = [ stdenv.lib.maintainers.bluescreen303 ];
};
}

View file

@ -12248,8 +12248,6 @@ with pkgs;
v4l2loopback = callPackage ../os-specific/linux/v4l2loopback { };
frandom = callPackage ../os-specific/linux/frandom { };
fusionio-vsl = callPackage ../os-specific/linux/fusionio/vsl.nix { };
lttng-modules = callPackage ../os-specific/linux/lttng-modules { };