# SPDX-FileCopyrightText: 2023 Frank Doepper # # SPDX-License-Identifier: GPL-3.0-only # thank https://magnus.therning.org/2022-03-13-simple-nix-flake-for-haskell-development.html ! { inputs = { nixpkgs.url = "nixpkgs/nixos-unstable"; flake-utils.url = "flake-utils"; }; outputs = { self, nixpkgs, flake-utils }: flake-utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages.${system}; t = pkgs.lib.trivial; hl = pkgs.haskell.lib; hp = pkgs.haskell.packages.ghc96; project = { withEnv ? false }: hp.developPackage { root = ./.; name = "amqp-utils"; returnShellEnv = withEnv; withHoogle = false; overrides = self: super: rec { tls = super.tls_2_0_6; crypton-connection = super.crypton-connection.override { inherit tls; }; }; modifier = (t.flip t.pipe) [ hl.dontHaddock hl.enableStaticLibraries hl.justStaticExecutables hl.disableLibraryProfiling hl.disableExecutableProfiling ]; }; in { packages.default = project { }; devShells.default = project { withEnv = true; }; apps = builtins.listToAttrs (builtins.map (x: { name = x; value = { type = "app"; program = "${project { }}/bin/${x}"; }; }) [ "agitprop" "konsum" "plane" "arbeite" ]); }); }