tricu/flake.nix

58 lines
1.6 KiB
Nix
Raw Normal View History

{
2024-12-29 08:29:25 -06:00
description = "tricu";
inputs = {
2025-02-07 19:22:31 -06:00
nh2pkgs = {
2025-02-07 18:32:09 -06:00
url = "https://github.com/nh2/nixpkgs/archive/ede5282c487a1fd2de64303ba59adad6726f1225.tar.gz";
type = "tarball";
flake = false;
};
static-haskell-nix = {
url = "github:nh2/static-haskell-nix";
flake = false;
};
2025-02-07 19:22:31 -06:00
flake-utils.url = "github:numtide/flake-utils";
};
2025-02-07 19:22:31 -06:00
outputs = { self, flake-utils, nh2pkgs, nixpkgs, static-haskell-nix }:
flake-utils.lib.eachDefaultSystem (system:
let
compiler = "ghc948";
packageName = "tricu";
overlay = self: super: {
haskell = super.haskell // {
packages = super.haskell.packages // {
${compiler} = super.haskell.packages.${compiler}.override {
overrides = final: prev: {
${packageName} = prev.callCabal2nix packageName ./. {};
};
2025-02-07 18:32:09 -06:00
};
};
};
};
2025-02-07 19:22:31 -06:00
overlays = [overlay];
2025-02-07 19:22:31 -06:00
pkgs = import nh2pkgs { inherit overlays system; };
2025-02-07 19:22:31 -06:00
survey = import "${static-haskell-nix}/survey" { inherit compiler pkgs; };
2025-02-07 19:22:31 -06:00
tricuStatic = survey.haskellPackages.${packageName};
2025-02-07 19:22:31 -06:00
in {
packages.default = tricuStatic;
2025-02-07 19:22:31 -06:00
devShells.default = pkgs.mkShell {
buildInputs = with survey; [
haskellPackages.cabal-install
haskellPackages.ghc-events
haskellPackages.ghcid
] ++ [pkgs.upx];
inputsFrom = builtins.attrValues self.packages.${system};
};
devShell = self.devShells.${system}.default;
});
}
2025-02-07 18:32:09 -06:00