tvl-depot/universe/advent-of-code/writePythonBin.nix
William Carroll fb9380ba26 Add 'universe/' from commit '8ad51b24dd8719840aac47134835ea25cfe1b0b8'
git-subtree-dir: universe
git-subtree-mainline: 15110e6de9
git-subtree-split: 8ad51b24dd
2020-01-29 14:29:25 +00:00

18 lines
303 B
Nix

{ pkgs ? import <nixpkgs> {}, ... }:
{ name, deps, src }:
let
inherit (pkgs) pythonPackages writeTextFile;
inherit (builtins) toFile;
in writeTextFile {
inherit name;
executable = true;
destination = "/bin/${name}";
text = ''
#!/bin/sh
${pkgs.python3}/bin/python3 ${src}
'';
}