aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorAlex <alex@adnab.me>2023-01-11 16:04:35 +0000
committerAlex <alex@adnab.me>2023-01-11 16:04:35 +0000
commit94d723f27cea7aa58d11af3e18a165283b40f19a (patch)
tree529fa2ca6424a83064551d2de0c8688955baa92d /flake.nix
parentbe6b8f419d71640e64bccfe195a573daeeab2263 (diff)
parentd6ea0cbefa6dcf89ea30e1cd2d36854d8160d6b1 (diff)
downloadgarage-94d723f27cea7aa58d11af3e18a165283b40f19a.tar.gz
garage-94d723f27cea7aa58d11af3e18a165283b40f19a.zip
Merge pull request 'Implement `rpc_secret_file`' (#466) from felix.scheinost/garage:feature/implement-rpc-secret-file into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/466
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..c1d772bb 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 cargo2nix.packages.${system}.default ];
+ });
+ });
}