-
Notifications
You must be signed in to change notification settings - Fork 2
/
flake.nix
37 lines (33 loc) · 1.09 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{
description = "PDF file cutter for slides where 2 pages are in one of the file";
inputs = {
pyproject-nix.url = "github:nix-community/pyproject.nix";
pyproject-nix.inputs.nixpkgs.follows = "nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, pyproject-nix, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
project = pyproject-nix.lib.project.loadPyproject {
projectRoot = self;
};
pkgs = nixpkgs.legacyPackages.${system};
python = pkgs.python3;
in
{
devShells.default =
let
arg = project.renderers.withPackages { inherit python; };
pythonEnv = python.withPackages arg;
in
pkgs.mkShell { packages = [ pythonEnv ]; };
packages.default =
let
attrs = project.renderers.buildPythonPackage { inherit python; };
in
python.pkgs.buildPythonPackage (attrs // {
version = "${builtins.toString self.lastModified}+flake";
});
}
);
}