aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
blob: 2222895d4594113daf7d88d1ee4187236b8baeb9 (plain) (blame)
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
{
  description = "Garage, an S3-compatible distributed object store for self-hosted deployments";

  inputs.nixpkgs.url = "github:NixOS/nixpkgs/baed728abe983508cabc99d05cccc164fe748744";
  inputs.cargo2nix = {
    # As of 2022-10-18: two small patches over unstable branch, one for clippy and one to fix feature detection
    url = "github:Alexis211/cargo2nix/505caa32110d42ee03bd68b47031142eff9c827b";
    inputs.nixpkgs.follows = "nixpkgs";
  };

  outputs = { self, nixpkgs, cargo2nix }: let
    git_version = self.lastModifiedDate;
    compile = import ./nix/compile.nix;
    forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed;
  in
  {
    packages = forAllSystems (system: {
      default = (compile {
        inherit system git_version;
        pkgsSrc = nixpkgs;
        cargo2nixOverlay = cargo2nix.overlays.default;
        release = true;
      }).workspace.garage {
        compileMode = "build";
      };
    });
  };
}