Make default.nix work.
This commit is contained in:
parent
1c7138e499
commit
d7e5393ffe
3 changed files with 14 additions and 5 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -144,4 +144,4 @@ cython_debug/
|
||||||
|
|
||||||
# End of https://www.toptal.com/developers/gitignore/api/python
|
# End of https://www.toptal.com/developers/gitignore/api/python
|
||||||
|
|
||||||
result/
|
result
|
||||||
|
|
15
default.nix
15
default.nix
|
@ -1,10 +1,19 @@
|
||||||
{ pkgs, lib, ... }:
|
|
||||||
let
|
let
|
||||||
sources = import ./sources.nix {};
|
sources = import ./nix/sources.nix {};
|
||||||
|
in
|
||||||
|
{ pkgs ? import sources.nixpkgs {},
|
||||||
|
lib ? pkgs.lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
mach-nix = import sources.mach-nix {
|
mach-nix = import sources.mach-nix {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
mach-nix.buildPythonApplication {
|
mach-nix.buildPythonApplication {
|
||||||
src = lib.cleanSource ./..;
|
name = "peerix";
|
||||||
|
python = "python39";
|
||||||
|
src = lib.cleanSource ./.;
|
||||||
|
version = builtins.readFile ./VERSION;
|
||||||
|
requirements = builtins.readFile ./requirements.txt;
|
||||||
}
|
}
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -5,7 +5,7 @@ from distutils.core import setup
|
||||||
DIR = os.path.dirname(__file__)
|
DIR = os.path.dirname(__file__)
|
||||||
|
|
||||||
with open(os.path.join(DIR, "requirements.txt")) as f:
|
with open(os.path.join(DIR, "requirements.txt")) as f:
|
||||||
requirements = f.readlines()
|
requirements = [l.strip() for l in f.readlines()]
|
||||||
|
|
||||||
with open(os.path.join(DIR, "VERSION")) as f:
|
with open(os.path.join(DIR, "VERSION")) as f:
|
||||||
version = f.read().strip()
|
version = f.read().strip()
|
||||||
|
|
Loading…
Reference in a new issue