47 lines
1.5 KiB
Nix
47 lines
1.5 KiB
Nix
{
|
|
description = "Dev Setup";
|
|
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
inputs.flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
outputs = {nixpkgs, flake-utils, ...}:
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = import nixpkgs { inherit system; };
|
|
ghcOverrides = hself: hsuper: rec {
|
|
berlin-scraper = hself.callPackage ./berlin-scraper {};
|
|
telegram-bot-api =
|
|
if system == "aarch64-linux"
|
|
then pkgs.haskell.lib.disableLibraryProfiling hsuper.telegram-bot-api
|
|
else hsuper.telegram-bot-api;
|
|
telegram-bot-simple =
|
|
if system == "aarch64-linux"
|
|
then pkgs.haskell.lib.disableLibraryProfiling hsuper.telegram-bot-simple
|
|
else hsuper.telegram-bot-simple;
|
|
};
|
|
haskellPackages = pkgs.haskellPackages.override {
|
|
overrides = ghcOverrides;
|
|
};
|
|
in rec {
|
|
packages = rec {
|
|
dev-env = haskellPackages.shellFor {
|
|
packages = p: [ p.berlin-scraper ];
|
|
buildInputs = [
|
|
pkgs.haskellPackages.cabal-install
|
|
pkgs.haskell-language-server
|
|
pkgs.cabal2nix
|
|
|
|
# For cabal
|
|
pkgs.pkg-config
|
|
pkgs.binutils
|
|
pkgs.xq
|
|
pkgs.htmlq
|
|
pkgs.dasel
|
|
];
|
|
};
|
|
berlin-scraper = pkgs.haskell.lib.justStaticExecutables haskellPackages.berlin-scraper;
|
|
};
|
|
defaultPackage = packages.dev-env;
|
|
});
|
|
}
|