-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
36 lines (34 loc) · 1.3 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
{
description = "SRA packages";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs, ... }: let
supportedSystems = [ "aarch64-linux" "x86_64-linux"
"aarch64-darwin" "x86_64-darwin" ];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
pkgs = forAllSystems (system: import nixpkgs {
inherit system; overlays = [ self.overlays.default ];
});
in {
packages = forAllSystems (system: {
inherit (pkgs.${system}) luadata versuchung sra-cli bib2json;
});
overlays.default = final: prev: rec {
luadata = final.python3Packages.callPackage ./pkgs/luadata.nix { };
versuchung = final.python3Packages.callPackage ./pkgs/versuchung.nix { inherit luadata; };
sra-cli = final.python3Packages.callPackage ./pkgs/sra-cli.nix { };
bib2json = final.python3Packages.callPackage ./pkgs/bib2json.nix { };
};
devShells = forAllSystems (system: {
linux = import ./shells/linux.nix { pkgs = pkgs.${system}; };
tex = import ./shells/tex.nix { pkgs = pkgs.${system}; };
});
templates = nixpkgs.lib.attrsets.genAttrs [
"linux" "latex" "typst"
] (name: {
path = ./templates/${name};
description = (import ./templates/${name}/flake.nix).description;
});
};
}