blob: 7f0332334585b861bc6693d0565b77f732944b18 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
{ 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; })
|