-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
37 lines (35 loc) · 990 Bytes
/
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 = "Postgres backup/restore";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.05";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
src = {
url = "github:pgbackrest/pgbackrest/release/2.41";
flake = false;
};
};
outputs = { self, nixpkgs, flake-compat, src }:
let
sources = with builtins; (fromJSON (readFile ./flake.lock)).nodes;
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
pgbr = import ./build.nix {
inherit pkgs src;
};
derivation = { inherit pgbr; };
in
with pkgs; rec {
packages.${system} = derivation;
defaultPackage.${system} = pgbr;
legacyPackages.${system} = extend overlay;
devShell.${system} = pkgs.mkShell {
name = "pgbr-env";
buildInputs = [ pgbr ];
};
nixosModule.nixpkgs.overlays = [ overlay ];
overlay = final: prev: derivation;
};
}