aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorFelix Scheinost <fesc@symentis.com>2023-01-04 18:28:56 +0100
committerFelix Scheinost <fesc@symentis.com>2023-01-04 18:35:10 +0100
commitf2106c27336d7d03671dbbbcd1401232c2beb61f (patch)
treee7847561add9e29dd002814085f1dd784684e2d3 /flake.nix
parent02e8eb167efa1f08d69fe7f8e6192cde726c45aa (diff)
downloadgarage-f2106c27336d7d03671dbbbcd1401232c2beb61f.tar.gz
garage-f2106c27336d7d03671dbbbcd1401232c2beb61f.zip
Implement `rpc_secret_file`
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix42
1 files changed, 25 insertions, 17 deletions
diff --git a/flake.nix b/flake.nix
index 7d152195..85a500ce 100644
--- a/flake.nix
+++ b/flake.nix
@@ -7,22 +7,30 @@
url = "github:Alexis211/cargo2nix/a7a61179b66054904ef6a195d8da736eaaa06c36";
inputs.nixpkgs.follows = "nixpkgs";
};
+ inputs.flake-utils.url = "github:numtide/flake-utils";
- 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";
- };
- });
- };
+ outputs = { self, nixpkgs, cargo2nix, flake-utils }:
+ let
+ git_version = self.lastModifiedDate;
+ compile = import ./nix/compile.nix;
+ in flake-utils.lib.eachDefaultSystem (system:
+ let pkgs = nixpkgs.legacyPackages.${system};
+ in {
+ packages = {
+ default = (compile {
+ inherit system git_version;
+ pkgsSrc = nixpkgs;
+ cargo2nixOverlay = cargo2nix.overlays.default;
+ release = true;
+ }).workspace.garage { compileMode = "build"; };
+ };
+ devShell = ((compile {
+ inherit system git_version;
+ pkgsSrc = nixpkgs;
+ cargo2nixOverlay = cargo2nix.overlays.default;
+ release = false;
+ }).workspaceShell {
+ packages = [ pkgs.rustfmt ];
+ });
+ });
}