From fa86ef2526df4c660c61685393ce6c5644da114a Mon Sep 17 00:00:00 2001 From: Astro Date: Wed, 10 Mar 2021 01:45:10 +0100 Subject: [PATCH] flake.nix: remove flake-utils again --- flake.nix | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/flake.nix b/flake.nix index 124f4d2..fbf567e 100644 --- a/flake.nix +++ b/flake.nix @@ -1,17 +1,25 @@ { description = "Matemat"; - inputs.flake-utils.url = "github:numtide/flake-utils"; - outputs = { self, nixpkgs, flake-utils }: - flake-utils.lib.eachDefaultSystem (system: { - packages.yammat = nixpkgs.legacyPackages.${system}.haskellPackages.callPackage ./pkg.nix {}; + outputs = { self, nixpkgs }: + let + systems = [ "x86_64-linux" "i686-linux" "aarch64-linux" ]; + forSystems = nixpkgs.lib.genAttrs systems; + in { + packages = forSystems (system: { + yammat = nixpkgs.legacyPackages.${system}.haskellPackages.callPackage ./pkg.nix {}; + }); - defaultPackage = self.packages.${system}.yammat; + defaultPackage = forSystems (system: + self.packages.${system}.yammat + ); - devShell = import ./shell.nix { - nixpkgs = nixpkgs.legacyPackages.${system}; - }; + devShell = forSystems (system: + import ./shell.nix { + nixpkgs = nixpkgs.legacyPackages.${system}; + } + ); nixosModule = import ./nixos-module.nix; - }); + }; }