{ # Update inputs with: # nix flake update --recreate-lock-file inputs.nixpkgs.url = "flake:nixpkgs"; #inputs.nixpkgs.url = "github:NixOS/nixpkgs/31a4e2e28bf29fc5ab1f70d28b5dbc2205a638a0"; inputs.flake-utils.url = "github:numtide/flake-utils"; #inputs.haskell-nix.url = "github:input-output-hk/haskell.nix"; outputs = inputs: let in inputs.flake-utils.lib.eachDefaultSystem (system: let pkgs = inputs.nixpkgs.legacyPackages.${system}; /* projectName = "symantic-parser"; pkgs = import inputs.haskell-nix.sources.nixpkgs (inputs.haskell-nix.nixpkgsArgs // { localSystem = { inherit system; }; overlays = inputs.haskell-nix.nixpkgsArgs.overlays ++ [ (import inputs.all-hies {}).overlay ]; }); compiler-nix-name = "ghc865"; project = pkgs.haskell-nix.cabalProject { src = pkgs.haskell-nix.haskellLib.cleanGit { name = projectName; src = ./.; }; inherit compiler-nix-name; #index-state = "2020-08-31T00:00:00Z"; # To be kept up to date with source-repository-package entries in cabal.project sha256map = { }; # Update by commenting materialized and running: # nix run .#materialize #materialized = ./plan-nix; }; */ in { # nix -L build defaultPackage = import ./default.nix { inherit pkgs; }; # nix develop --command "$EDITOR src/**/*.hs" # nix develop --command "cabal repl" devShell = (import ./default.nix { inherit pkgs; }).shell; /* # Build with: nix build defaultPackage = project.${projectName}.components.exes."playground"; #packages.${projectName} = project; # Run with: nix run .#benchmarks apps."benchmarks" = { type = "app"; program = "${project.${projectName}.components.exes."benchmarks"}/bin/benchmarks"; }; # Run with: nix run .#playground apps."playground" = { type = "app"; program = "${inputs.self.defaultPackage.${system}}/bin/playground"; }; # Run with: nix run .#materialize apps.materialize = { type = "app"; program = (pkgs.writeShellScript "materialize" '' ${pkgs.rsync}/bin/rsync --delete -ai ${project.plan-nix}/ plan-nix/ '').outPath; }; # Run with: nix run .#register apps.register = { type = "app"; program = (pkgs.writeShellScript "register" '' set -x nix-store --add-root nix.root --indirect --realise ${project.roots} '').outPath; }; # Get a development environment with: nix shell devShell = project.shellFor { packages = hpkgs: [ hpkgs."${projectName}" ]; #components = hpkgs: []; #additional = hpkgs: []; withHoogle = false; tools = { cabal = "3.2.0.0"; #hie = "unstable"; #hlint = "2.2.11"; }; builtInputs = with project.haskellPackages; [ ]; exactDeps = true; shellHook = '' nix-store --add-root nix.root --indirect --realise ${project.roots} ''; }; */ } ); }