From 5c9079a41059e077f2b71b68eb83ff9fcb2e38d1 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Wed, 29 Jan 2020 14:43:20 +0000 Subject: Splice ./universe directory into ./ Manually merging: - README.md: I added the description from universe/README.md into the heading of dotfiles/README.md. - .envrc: dotfiles/.envrc was a superset of universe/.envrc - .gitignore: Adding some of the ignored patterns from universe/.gitignore to dotfiles/.gitignore Everything else here should be a simple rename. --- advent-of-code/writePythonBin.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 advent-of-code/writePythonBin.nix (limited to 'advent-of-code/writePythonBin.nix') diff --git a/advent-of-code/writePythonBin.nix b/advent-of-code/writePythonBin.nix new file mode 100644 index 000000000000..1730edb2ebe4 --- /dev/null +++ b/advent-of-code/writePythonBin.nix @@ -0,0 +1,18 @@ +{ pkgs ? import {}, ... }: + +{ 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} + ''; +} -- cgit 1.4.1