yammat/flake.nix

47 lines
1.3 KiB
Nix
Raw Normal View History

2021-03-10 00:29:14 +00:00
{
description = "Matemat";
2021-03-10 00:45:10 +00:00
outputs = { self, nixpkgs }:
let
systems = [ "x86_64-linux" "i686-linux" "aarch64-linux" ];
forSystems = nixpkgs.lib.genAttrs systems;
in rec {
2021-03-10 00:45:10 +00:00
packages = forSystems (system: {
yammat = nixpkgs.legacyPackages.${system}.haskellPackages.callPackage ./pkg.nix {};
});
2021-03-10 00:29:14 +00:00
2021-03-10 00:45:10 +00:00
defaultPackage = forSystems (system:
self.packages.${system}.yammat
);
2021-03-10 00:29:14 +00:00
checks = packages;
hydraJobs =
let
system = builtins.head systems;
pkgs = nixpkgs.legacyPackages.${system};
ghcVersions =
builtins.filter (p:
builtins.match "ghc.+" p != null
) (builtins.attrNames pkgs.haskell.packages);
in
builtins.foldl' (checks: ghcVersion:
let
haskellPackages = pkgs.haskell.packages.${ghcVersion};
2022-06-16 20:45:49 +00:00
inherit (pkgs.haskell.lib.compose) justStaticExecutables;
in
checks // {
2022-06-16 20:45:49 +00:00
"${ghcVersion}".yammat = justStaticExecutables(haskellPackages.callPackage ./pkg.nix {});
}
) {} ghcVersions;
2021-03-10 00:45:10 +00:00
devShell = forSystems (system:
import ./shell.nix {
nixpkgs = nixpkgs.legacyPackages.${system};
}
);
2021-03-10 00:29:14 +00:00
nixosModule = import ./nixos-module.nix;
2021-03-10 00:45:10 +00:00
};
2021-03-10 00:29:14 +00:00
}