My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/pkgs/build-support/setup-hooks/make-binary-wrapper/default.nix

20 lines
345 B

{ stdenv
, lib
, makeSetupHook
, dieHook
, tests
, cc ? stdenv.cc
, sanitizers ? []
}:
makeSetupHook {
deps = [ dieHook cc ];
substitutions = {
cc = let
san = lib.escapeShellArgs (map (s: "-fsanitize=${s}") sanitizers);
in "${cc}/bin/cc ${san}";
passthru.tests = tests.makeBinaryWrapper;
};
} ./make-binary-wrapper.sh