aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/applications/version-management/sourcehut/default.nix
blob: f6de0036afe0056211a8910b4f1ee0d0f185aa9c (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
{ python37, openssl
, callPackage, recurseIntoAttrs }:

# To expose the *srht modules, they have to be a python module so we use `buildPythonModule`
# Then we expose them through all-packages.nix as an application through `toPythonApplication`
# https://github.com/NixOS/nixpkgs/pull/54425#discussion_r250688781

let
  fetchNodeModules = callPackage ./fetchNodeModules.nix { };

  python = python37.override {
    packageOverrides = self: super: {
      srht = self.callPackage ./core.nix { inherit fetchNodeModules; };

      buildsrht = self.callPackage ./builds.nix { };
      dispatchsrht = self.callPackage ./dispatch.nix { };
      gitsrht = self.callPackage ./git.nix { };
      hgsrht = self.callPackage ./hg.nix { };
      listssrht = self.callPackage ./lists.nix { };
      mansrht = self.callPackage ./man.nix { };
      metasrht = self.callPackage ./meta.nix { };
      pastesrht = self.callPackage ./paste.nix { };
      todosrht = self.callPackage ./todo.nix { };

      scmsrht = self.callPackage ./scm.nix { };
    };
  };
in with python.pkgs; recurseIntoAttrs {
  inherit python;
  buildsrht = toPythonApplication buildsrht;
  dispatchsrht = toPythonApplication dispatchsrht;
  gitsrht = toPythonApplication gitsrht;
  hgsrht = toPythonApplication hgsrht;
  listssrht = toPythonApplication listssrht;
  mansrht = toPythonApplication mansrht;
  metasrht = toPythonApplication metasrht;
  pastesrht = toPythonApplication pastesrht;
  todosrht = toPythonApplication todosrht;
}