Upfront, I partly talked non-sense before, so I might have transported a
wrong picture.

Vladimír Čunát <[email protected]> writes:
> On 06/22/2014 01:11 PM, Florian Friesdorf wrote:
>> It would be nice if there would be a way to interpolate variables in the
>> string read from ./script.pl, just like the content would be written
>> in-place.
>
> Usually one can use substituteAll; see qt4 for example.
>
> It uses a different syntax for what is replaced, but one typically does 
> need a different syntax if substituting in shell-like files.

This is working using "import" and some nix boilerplate in the perl
files.

https://github.com/chaoflow/nixpkgs/blob/7482884953fcd8d3f29d84b864c53c46728d6910/nixos/tests/python.nix#L23

Now, I'd like to get rid of that nix boilerplate. It feels that a
library function doing what substituteAll is doing would be great:

testScriptPreamble = interpolate attrset (readFile ./python/preamble.pl);

I'm happy to switch to whatever variable markup and also to write that
function. Just don't want to go a direction that makes no sense.

Any thoughts?

-- 
Florian Friesdorf <[email protected]>
  GPG FPR: 7A13 5EEE 1421 9FC2 108D  BAAF 38F8 99A3 0C45 F083
Jabber/XMPP: [email protected]
IRC: chaoflow on freenode,ircnet,blafasel,OFTC

Attachment: pgpkVbJRbawxT.pgp
Description: PGP signature

_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to