This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

superconfig / lib / secureify.nix
775 B 30 lines
1{ lib }: 2/** 3 Strip a derivation's `meta.knownVulnerabilities`, so the nixpkgs 4 insecure-package check accepts it. 5 6 Useful when `nixpkgs.config.permittedInsecurePackages` is unsuitable — 7 notably across NixOS modules, since `nixpkgs.config` merges via 8 `recursiveUpdate` and list values get clobbered, not concatenated. 9 An overlay that secureifies the offending package (or its insecure 10 dependency) is a per-module fix that composes cleanly via 11 `nixpkgs.overlays`. 12 13 # Example 14 15 ```nix 16 # in a NixOS module: 17 nixpkgs.overlays = [ 18 (_final: prev: { olm = self.lib.secureify prev.olm; }) 19 ]; 20 ``` 21*/ 22drv: 23if !lib.isDerivation drv then 24 drv 25else 26 drv.overrideAttrs (old: { 27 meta = (old.meta or { }) // { 28 knownVulnerabilities = [ ]; 29 }; 30 })