diff options
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..0bdf16f --- /dev/null +++ b/flake.nix @@ -0,0 +1,30 @@ +# SPDX-FileCopyrightText: 2021 Serokell <https://serokell.io/> +# +# SPDX-License-Identifier: CC0-1.0 + +{ + description = "A minimalist calculator for quick calculations"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + in { + packages.hsc = + pkgs.haskellPackages.callCabal2nix "hsc" self {}; + + packages.default = self.packages.${system}.hsc; + defaultPackage = self.packages.${system}.default; + + devShells.default = pkgs.mkShell { + buildInputs = with pkgs; [ cabal-install ]; + inputsFrom = map (__getAttr "env") (__attrValues self.packages.${system}); + }; + devShell = self.devShells.${system}.default; + }); +} |
