Skip to content
Snippets Groups Projects
Select Git revision
  • 3c712cf70d7b300b81a17c99a17dca6baee92ccf
  • main default
2 results

Exam6Toy2d.pkl

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    flake.nix 2.96 KiB
    {
      inputs = {
        nixpkgs.url = github:nixos/nixpkgs/nixpkgs-unstable;
        flake-utils.url = github:numtide/flake-utils;
        nix-filter.url = github:numtide/nix-filter;
        language-c = {
          url = github:kalhauge/language-c;
          flake = false;
        };
        hspec-glitter.url = github:kalhauge/hspec-glitter;
      };
      outputs = {
        self,
        nixpkgs,
        flake-utils,
        nix-filter,
        ...
      } @ inputs: let
        load = p: n:
          p.callCabal2nixWithOptions n (nix-filter.lib {root = "${self}/${n}";}) "" {};
    
        packages = lib: p: {
          "language-c" = lib.dontCheck (p.callCabal2nixWithOptions "language-c" inputs.language-c "" {});
          "hspec-glitter" = p.callCabal2nixWithOptions "hspec-glitter" inputs.hspec-glitter "" {};
          "rtree" = lib.dontCheck (load p "rtree");
          "rtree-c" = lib.dontCheck (load p "rtree-c");
        };
      in
        flake-utils.lib.eachDefaultSystem
        (system: let
          pkgs = import nixpkgs {
            inherit system;
            overlays = [];
          };
          lib = pkgs.haskell.lib;
          hpkgs = pkgs.haskellPackages.override (hpArgs: {
            overrides = pkgs.lib.composeExtensions (hpArgs.overrides or (_: _: {})) (
              _hfinal: hprev: packages lib hprev
            );
          });
        in {
          packages = {
            default = lib.justStaticExecutables (hpkgs.rtree-c);
            rtree = hpkgs.rtree;
            rtree-c = hpkgs.rtree-c;
          };
          devShells = let
            nativeBuildInputs = with hpkgs; [
              cabal-install
              ghcid
              haskell-language-server
              hpack
              fourmolu
            ];
            withHoogle = true;
            profiles = hpkgs.override (hpArgs: {
              overrides = pkgs.lib.composeExtensions (hpArgs.overrides or (_: _: {})) (
                _hfinal: hprev: {
                  mkDerivation = args:
                    hprev.mkDerivation ({
                        doCheck = false;
                        doBenchmark = false;
                        doHoogle = true;
                        doHaddock = true;
                        enableLibraryProfiling = true;
                        enableExecutableProfiling = true;
                      }
                      // args);
                  aeson = hprev.aeson.override {
                    mkDerivation = args: