From de4731faa6167fcf01584c715f4dfaf1bdeaece4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20Fred=C3=A9n?= Date: Tue, 4 Dec 2018 18:29:55 +0100 Subject: [PATCH] Add nix build file --- default.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 default.nix diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..173e2d4 --- /dev/null +++ b/default.nix @@ -0,0 +1,15 @@ +{ pkgs ? import {} }: with pkgs; let + python-with-packages = python3.withPackages (pypkgs: with pypkgs; [ + numpy + pygame + ]); +in runCommand "graph-tycoon" { + buildInputs = [ python-with-packages makeWrapper ]; +} '' + mkdir -p $out/bin $out/src + (cd ${./src} + find . -name '*.py' -exec cp --no-preserve=mode --parents -t $out/src {} \; + ) + makeWrapper ${python-with-packages}/bin/python $out/bin/graph-tycoon \ + --add-flags $out/src/main.py +''