-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathflake.nix
More file actions
29 lines (28 loc) · 1.07 KB
/
flake.nix
File metadata and controls
29 lines (28 loc) · 1.07 KB
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
{
description = "Nix flake for running zotero2readwise script";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
inputs.poetry2nix.url = "github:nix-community/poetry2nix";
outputs = { self, nixpkgs, poetry2nix }:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
inherit (poetry2nix.lib.mkPoetry2Nix { inherit pkgs; }) mkPoetryApplication defaultPoetryOverrides;
zotero2readwise = mkPoetryApplication {
projectDir = ./.;
# Pyzotero requires setuptools.
# https://github.com/nix-community/poetry2nix/blob/master/docs/edgecases.md
overrides = defaultPoetryOverrides.extend (final: prev: {
pyzotero = prev.pyzotero.overridePythonAttrs ( old: {
buildInputs = (old.buildInputs or [ ]) ++ [ prev.setuptools ];
});
});
};
in
{
apps.${system}.default = {
type = "app";
# replace <script> with the name in the [tool.poetry.scripts] section of your pyproject.toml
program = "${zotero2readwise}/bin/run";
};
};
}