aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-11-16 22:21:24 +0100
committerAlex Auvolat <alex@adnab.me>2022-11-16 23:25:34 +0100
commite76dba9561128fb8eb26820214a3d103e7f5f9d1 (patch)
treeb596eb5228a26604c303cef07df6042a44dc7ae0 /flake.nix
parentbcc97724707aaa39fd64490cdd81aa5073285f33 (diff)
downloadgarage-e76dba9561128fb8eb26820214a3d103e7f5f9d1.tar.gz
garage-e76dba9561128fb8eb26820214a3d103e7f5f9d1.zip
Make repository into a Nix flake
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix28
1 files changed, 28 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 00000000..b862e8e6
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,28 @@
+{
+ description = "Garage, an S3-compatible distributed object store for self-hosted deployments";
+
+ inputs.nixpkgs.url = "github:NixOS/nixpkgs/a3073c49bc0163fea6a121c276f526837672b555";
+ 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/a7a61179b66054904ef6a195d8da736eaaa06c36";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
+
+ outputs = { self, nixpkgs, cargo2nix }: let
+ git_version = "v0.8.0-rc2";
+ 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";
+ };
+ });
+ };
+}