Update to pythonflake-mach-nix

This commit is contained in:
harris-chris 2022-07-03 14:32:43 +09:00
parent 35b90044df
commit 8eed91f4cd

View file

@ -19,8 +19,19 @@
requirements = ''
plumbum
dhall
'';
source_preferences = {
_default = "nixpkgs,wheel,sdist";
dhall = "wheel";
};
env = machNix.mkPython {
inherit requirements;
packagesExtra = [ pkgs.openssl ];
};
app = machNix.buildPythonApplication {
pname = packageName;
version = packageVersion;
@ -31,11 +42,14 @@
in {
packages.${packageName} = app;
devShell = pkgs.mkShell {
buildInputs = [ env ];
shellHook = ''
export LD_LIBRARY_PATH=${pkgs.openssl.out}/lib
'';
};
defaultPackage = self.packages.${system}.${packageName};
apps.${system}.default = app;
devShell = machNix.mkPythonShell {
inherit requirements;
};
});
}