summaryrefslogtreecommitdiff
path: root/default.nix
blob: 897ac2e31111e66302b82096a5ff0dc90bb07414 (plain)
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
38
39
40
{ pkgs ? import <nixpkgs> {} }:
with pkgs.python310Packages;

let
  sources = import ./npins;
  pywikiapi = buildPythonPackage rec {
    pname = "pywikiapi";
    version = "pinned";
    src = sources.pywikiapi;

    dependencies = [
      requests
    ];
  };
in
buildPythonApplication rec {
  pname = "osm-proposals";
  version = "git";
  src = ./.;
  pyproject = true;

  build-system = [
    hatchling
  ];

  dependencies = [
    requests
    mwparserfromhell
    pywikiapi
  ];

  postInstall = ''
    mkdir -p $out/share/osm-proposals
    cp -r ${./static}/. $out/share/osm-proposals/
  '';

  nativeCheckInputs = [
    pytestCheckHook
  ];
}