mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 19:42:50 -06:00
Remove unused devenv stuff from flake
This felt like a bunch of bloat and it makes nix ask about if you want to trust cachix cache for devenv even when you don't use it
This commit is contained in:
68
flake.nix
68
flake.nix
@@ -2,16 +2,15 @@
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
|
||||
systems.url = "github:nix-systems/default";
|
||||
devenv.url = "github:cachix/devenv";
|
||||
};
|
||||
|
||||
nixConfig = {
|
||||
extra-trusted-public-keys =
|
||||
"devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=";
|
||||
extra-substituters = "https://devenv.cachix.org";
|
||||
# extra-trusted-public-keys =
|
||||
# "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=";
|
||||
# extra-substituters = "https://devenv.cachix.org";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, devenv, systems, ... }@inputs:
|
||||
outputs = { self, nixpkgs, systems, ... }@inputs:
|
||||
let forEachSystem = nixpkgs.lib.genAttrs (import systems);
|
||||
in {
|
||||
packages = forEachSystem (system:
|
||||
@@ -25,7 +24,6 @@
|
||||
};
|
||||
|
||||
in {
|
||||
devenv-up = self.devShells.${system}.default.config.procfileScript;
|
||||
gf = pkgs.haskell.lib.overrideCabal
|
||||
(haskellPackages.callCabal2nixWithOptions "gf" self "--flag=-server"
|
||||
{ }) (_old: {
|
||||
@@ -48,63 +46,5 @@
|
||||
# executableHaskellDepends = [ ];
|
||||
});
|
||||
});
|
||||
|
||||
devShells = forEachSystem (system:
|
||||
let pkgs = nixpkgs.legacyPackages.${system};
|
||||
|
||||
in with pkgs.darwin.apple_sdk.frameworks;
|
||||
let
|
||||
darwinPkgs =
|
||||
|
||||
if pkgs.stdenv.isDarwin then [ Cocoa pkgs.clang ] else [ ];
|
||||
in {
|
||||
|
||||
default = devenv.lib.mkShell {
|
||||
inherit inputs pkgs;
|
||||
modules = [{
|
||||
# https://devenv.sh/basics/
|
||||
env.GREET = "devenv";
|
||||
|
||||
# https://devenv.sh/packages/
|
||||
packages = [ pkgs.git pkgs.llvm ] ++ darwinPkgs;
|
||||
|
||||
# https://devenv.sh/scripts/
|
||||
scripts.hello.exec = "echo hello from $GREET";
|
||||
|
||||
enterShell = ''
|
||||
hello
|
||||
git --version
|
||||
'';
|
||||
|
||||
languages.haskell = {
|
||||
enable = true;
|
||||
# HLS fails to build on darwin and 9.2.5
|
||||
languageServer = null;
|
||||
package = pkgs.haskell.compiler.ghc925;
|
||||
};
|
||||
|
||||
# https://devenv.sh/pre-commit-hooks/
|
||||
pre-commit.hooks = {
|
||||
# lint shell scripts
|
||||
shellcheck.enable = true;
|
||||
markdownlint.enable = true;
|
||||
# lint nix
|
||||
nixfmt.enable = true;
|
||||
deadnix.enable = true;
|
||||
nil.enable = true;
|
||||
# statix.enable = true;
|
||||
# format haskell
|
||||
# ormolu.enable = true;
|
||||
# cabal-fmt.enable = true;
|
||||
# lint haskell
|
||||
# hlint.enable = true;
|
||||
};
|
||||
# https://devenv.sh/processes/
|
||||
# processes.ping.exec = "ping example.com";
|
||||
|
||||
# See full reference at https://devenv.sh/reference/options/
|
||||
}];
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user