Skip to content

Instantly share code, notes, and snippets.

@dmjio

dmjio/app.nix Secret

Created Feb 8, 2020
Embed
What would you like to do?
{ tree, runCommand, python3, makeWrapper, fetchFromGitHub, maven, lib, openjdk, writeTextFile, ... }:
let
app-src =
builtins.fetchGit {
url = "ssh://git@github.com/some/pkg";
rev = "0afc587394dd055be8278a8224aa03be68577kf3";
};
in
self: super: rec
app = super.buildPythonPackage rec {
pname = "app";
version = "1.0";
doCheck = false;
src = app-src;
buildInputs = with super; [ ];
propagatedBuildInputs = with super; [ openjdk maven dill pandas ];
};
app-exec =
let
python = python3.withPackages (ps: with ps; [ app ]);
in runCommand "app-exec" {
buildInputs = [ makeWrapper ];
} ''
makeWrapper ${python}/bin/python $out --add-flags ${./../../path/to/app.py}
'';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.