This commit is contained in:
2026-04-23 23:37:56 -06:00
parent f552132241
commit 540a5e03fe
5 changed files with 75 additions and 2 deletions

42
flake.nix Normal file
View File

@@ -0,0 +1,42 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};
outputs = { self, nixpkgs, ... }@inputs:
let
supportedSystems = [
"aarch64-darwin" "aarch64-linux"
"x86_64-darwin" "x86_64-linux"
];
each-system = f: nixpkgs.lib.genAttrs supportedSystems (system: f rec {
pkgs = import nixpkgs {
inherit system;
};
inherit (pkgs) lib;
inherit system;
});
in {
# Exposed as a REPL convenience.
_pkgs = each-system ({ pkgs, ... }: pkgs);
packages = each-system ({ pkgs, ... }: {
# default = pkgs.callPackage ./default.nix {};
});
devShells = each-system ({ pkgs, system, ... }: {
default = pkgs.haskellPackages.developPackage {
root = ./.;
modifier = drv:
pkgs.haskell.lib.addBuildTools
drv
(with pkgs; [
cabal-install
qbe
gcc
]);
};
});
};
}