Skip to content

Instantly share code, notes, and snippets.

@greg-hellings
Created February 20, 2024 00:11
Show Gist options
  • Save greg-hellings/91ce5183afc282f20e80bd5f3547efd8 to your computer and use it in GitHub Desktop.
Save greg-hellings/91ce5183afc282f20e80bd5f3547efd8 to your computer and use it in GitHub Desktop.
{
buildPythonApplication,
writeScriptBin,
someDep,
python3,
...
}
buildPythonApplication {
name = "somescript";
version = "1.0.0";
propagatedBuildInputs = [
someDep
];
binScript = writeScriptBin "myscript" ''
#!${python3.interpreter}
<some content>
'';
installPhase = ''
mkdir -p $out/bin/
mv ${binScript} $out/bin/
'';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment