Make default.nix work.

This commit is contained in:
Sarah 2021-10-17 12:14:55 +02:00
parent 1c7138e499
commit d7e5393ffe
No known key found for this signature in database
GPG key ID: 708F7ACE058F0186
3 changed files with 14 additions and 5 deletions

2
.gitignore vendored
View file

@ -144,4 +144,4 @@ cython_debug/
# End of https://www.toptal.com/developers/gitignore/api/python
result/
result

View file

@ -1,10 +1,19 @@
{ pkgs, lib, ... }:
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 {
inherit pkgs;
};
in
mach-nix.buildPythonApplication {
src = lib.cleanSource ./..;
name = "peerix";
python = "python39";
src = lib.cleanSource ./.;
version = builtins.readFile ./VERSION;
requirements = builtins.readFile ./requirements.txt;
}

View file

@ -5,7 +5,7 @@ from distutils.core import setup
DIR = os.path.dirname(__file__)
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:
version = f.read().strip()