88abffb7d2
GitOrigin-RevId: bc9b956714ed6eac5f8888322aac5bc41389defa
14 lines
485 B
Nix
14 lines
485 B
Nix
{ stdenvNoCC }:
|
|
|
|
args:
|
|
|
|
# This is a wrapper around `substitute` in the stdenv.
|
|
# The `replacements` attribute should be a list of list of arguments
|
|
# to `substitute`, such as `[ "--replace" "sourcetext" "replacementtext" ]`
|
|
stdenvNoCC.mkDerivation ({
|
|
name = if args ? name then args.name else baseNameOf (toString args.src);
|
|
builder = ./substitute.sh;
|
|
inherit (args) src;
|
|
preferLocalBuild = true;
|
|
allowSubstitutes = false;
|
|
} // args // { replacements = args.replacements; })
|