def inputFunc(wildcards): return "test.txt" rule A: output: "{FILE}.{EXT}" input: lambda wildcards: inputFunc(wildcards)