High respected community,
I’m trying to get my python script into nixos and run it as systemd service. I’ve prepared a package for NixOS and a module for NixOS, but when I’m trying to enable this service, I bump into an error:
'selfprivacy-api' at /etc/nixos/api/api-package.nix:7:21 called without required argument 'flask_restful'
Here’s a contents of api-package.nix
{ nixpkgs ? import <nixpkgs> {}, pythonPkgs ? nixpkgs.pkgs.python37Packages }:
let
inherit (nixpkgs) pkgs;
inherit pythonPkgs;
selfprivacy-api = { buildPythonPackage, flask, flask_restful, pandas, ast, subprocess, os }:
buildPythonPackage rec {
pname = "selfprivacy-api";
version = "1.0";
src = builtins.fetchGit {
url = "git://git.selfprivacy.org/ilchub/selfprivacy-rest-api.git";
ref = "master";
};
propagatedBuildInputs = [ flask flask_restful pandas ast subprocess os ];
meta = {
description = ''
SelfPrivacy Server Management API
'';
};
};
drv = pythonPkgs.callPackage selfprivacy-api {};
in
if pkgs.lib.inNixShell then drv.env else drv
Could you please advice, why flask_restful
package is missing(that’s how I explain to myself ocurred error)?
This problem also appears with packages: ast
, subprocess
, os