Skip to content

Commit

Permalink
Merge pull request #391 from qowoz/insecure
Browse files Browse the repository at this point in the history
allow nixpkgs-review to build insecure packages
  • Loading branch information
zowoq authored Apr 28, 2024
2 parents fc6a441 + 6e45a09 commit df23e62
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 deletions.
17 changes: 17 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
inputs.treefmt-nix.url = "github:numtide/treefmt-nix";
inputs.treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";

inputs.runtimeDeps.url = "github:NixOS/nixpkgs/nixos-unstable-small";

nixConfig.extra-substituters = "https://nix-community.cachix.org";
nixConfig.extra-trusted-public-keys = "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=";

outputs = { self, nixpkgs, mmdoc, treefmt-nix } @ args:
outputs = { self, nixpkgs, mmdoc, treefmt-nix, runtimeDeps } @ args:
let
systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
eachSystem = f: nixpkgs.lib.genAttrs systems (system: f nixpkgs.legacyPackages.${system});
Expand Down
5 changes: 4 additions & 1 deletion pkgs/default.nix
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
{ nixpkgs
, mmdoc
, runtimeDeps
, system
, self
, ...
}:

let

runtimePkgs = import runtimeDeps { inherit system; };

pkgs = import nixpkgs { inherit system; config = { allowBroken = true; }; };

drvAttrs = attrs: with pkgs; {
drvAttrs = attrs: with runtimePkgs; {
NIX = nix;
GIT = git;
JQ = jq;
Expand Down
2 changes: 1 addition & 1 deletion src/NixpkgsReview.hs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ run cache commit =
proc "rm" ["-rf", revDir cache commit]
(exitCode, _nixpkgsReviewOutput) <-
ourReadProcessInterleavedSem $
proc "timeout" [T.unpack timeout, (binPath <> "/nixpkgs-review"), "rev", T.unpack commit, "--no-shell"]
proc "timeout" [T.unpack timeout, (binPath <> "/nixpkgs-review"), "rev", T.unpack commit, "--no-shell", "--extra-nixpkgs-config", "{ allowInsecurePredicate = x: true; }"]
case exitCode of
ExitFailure 124 -> do
output $ "[check][nixpkgs-review] took longer than " <> timeout <> " and timed out"
Expand Down

0 comments on commit df23e62

Please sign in to comment.