tricu/flake.nix
James Eversole ad1918aa6f
Some checks failed
Test, Build, and Release / test (push) Failing after 50s
Test, Build, and Release / build (push) Has been skipped
Statically link binaries
2025-02-07 18:32:09 -06:00

59 lines
1.5 KiB
Nix

{
description = "tricu";
inputs = {
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;
};
};
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 ./. {};
};
};
};
};
};
overlays = [overlay];
normalPkgs = import nixpkgs { inherit overlays system; };
survey = import "${static-haskell-nix}/survey" { inherit compiler normalPkgs; };
tricuStatic = survey.haskellPackages.${packageName};
in {
packages.${system}.default = tricuStatic;
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};
};
devShell = self.devShells.${system}.default;
};
}