diff options
author | Alex Auvolat <alex@adnab.me> | 2023-01-11 17:09:37 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2023-01-11 17:09:37 +0100 |
commit | dac254a6e7413498df0e3b626769c2d2be3a4cfb (patch) | |
tree | 3eca3ebc2d0c1f9c2c5029e3197bcc925eeafcfd /flake.nix | |
parent | 638c5a3ce006eba9d90a6358655ba2091423efd7 (diff) | |
parent | 94d723f27cea7aa58d11af3e18a165283b40f19a (diff) | |
download | garage-dac254a6e7413498df0e3b626769c2d2be3a4cfb.tar.gz garage-dac254a6e7413498df0e3b626769c2d2be3a4cfb.zip |
Merge branch 'main' into k2v-watch-range-2
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 42 |
1 files changed, 25 insertions, 17 deletions
@@ -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 ]; + }); + }); } |