cek-call-cc/flake.nix

52 lines
1.7 KiB
Nix

{
inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url =
"github:nixos/nixpkgs?rev=860b56be91fb874d48e23a950815969a7b832fbc";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
myPkgs = rec {
agda = pkgs.agda.withPackages (p: [ p.standard-library ]);
nvim-agda = import ./nix/nvim-agda { inherit nixpkgs system; };
neovim = pkgs.callPackage ./nix/neovim.nix { inherit nvim-agda; };
};
vscode-agda-mode = pkgs.vscode-utils.extensionFromVscodeMarketplace {
name = "agda-mode";
publisher = "banacorn";
version = "0.2.19";
sha256 = "2PFfFySOoxFEZdYb2BF6XQeYEygbTn/WJub/8IKfc1Y=";
};
combinedExtensionsDrv = pkgs.buildEnv {
name = "vscodium-extensions";
paths = [ vscode-agda-mode pkgs.vscode-extensions.vscodevim.vim ];
};
vscodium = pkgs.runCommand "vscodium-with-extensions" {
nativeBuildInputs = [ pkgs.makeWrapper ];
buildInputs = [ pkgs.vscodium ];
meta = pkgs.vscodium.meta;
} ''
mkdir -p $out/bin
makeWrapper "${pkgs.vscodium}/bin/codium" "$out/bin/codium" \
--add-flags "--extensions-dir ${combinedExtensionsDrv}/share/vscode/extensions"
'';
in {
packages = flake-utils.lib.flattenTree myPkgs;
devShell = pkgs.mkShell {
buildInputs = with pkgs;
with myPkgs; [
agda
vscodium
neovim
nvim-agda
lua51Packages.luautf8
];
};
});
}