Skip to content

Instantly share code, notes, and snippets.

@nh2
Created May 7, 2017 18:00
Show Gist options
  • Save nh2/8f1656d53d2aceeddbf67904a051c5d1 to your computer and use it in GitHub Desktop.
Save nh2/8f1656d53d2aceeddbf67904a051c5d1 to your computer and use it in GitHub Desktop.
Trying to figure out how to get a single-file python script into NixOS
waitUntilConsulValue = pkgs.python36Packages.buildPythonApplication {
name = "waitUntilConsulValue";
phases = "installPhase";
installPhase = ''
mkdir -p $out/bin
echo cp ${./waitUntilConsulValue.py} $out/bin/waitUntilConsulValue.py
cp ${./waitUntilConsulValue.py} $out/bin/waitUntilConsulValue.py
wrapProgram $out/bin/waitUntilConsulValue.py --prefix PYTHONPATH : "$(toPythonPath ${pkgs.python36Packages.consul})"
'';
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment