tricu/flake.nix

59 lines
1.5 KiB
Nix
Raw Permalink Normal View History

{
2024-12-29 08:29:25 -06:00
description = "tricu";
inputs = {
2025-02-07 18:32:09 -06:00
nixpkgs = {
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 18:32:09 -06:00
outputs = { self, nixpkgs, static-haskell-nix }:
let
system = "x86_64-linux";
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
overlays = [overlay];
2025-02-07 18:32:09 -06:00
normalPkgs = import nixpkgs { inherit overlays system; };
2025-02-07 18:32:09 -06:00
survey = import "${static-haskell-nix}/survey" { inherit compiler normalPkgs; };
2025-02-07 18:32:09 -06:00
tricuStatic = survey.haskellPackages.${packageName};
2025-02-07 18:32:09 -06:00
in {
packages.${system}.default = tricuStatic;
2025-02-07 18:32:09 -06:00
devShells.default = normalPkgs.mkShell {
buildInputs = with normalPkgs; [
normalPkgs.haskellPackages.cabal-install
normalPkgs.haskellPackages.ghc-events
normalPkgs.haskellPackages.ghcid
normalPkgs.upx
];
inputsFrom = builtins.attrValues self.packages.${system};
};
2025-02-07 18:32:09 -06:00
devShell = self.devShells.${system}.default;
};
}
2025-02-07 18:32:09 -06:00