「🚧」 test: testing things, might broke.
This commit is contained in:
80
flake.nix
80
flake.nix
@ -1,33 +1,55 @@
|
||||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
pogit = {
|
||||
url = "github:y-syo/pogit";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
};
|
||||
|
||||
outputs = inputs@{ nixpkgs, ... }:
|
||||
let
|
||||
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
|
||||
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
});
|
||||
in {
|
||||
devShells = forEachSupportedSystem ({ pkgs }: {
|
||||
default = pkgs.mkShell.override
|
||||
{}
|
||||
{
|
||||
buildInputs = with pkgs;[
|
||||
outputs =
|
||||
inputs@{ nixpkgs, ... }:
|
||||
let
|
||||
supportedSystems = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
"x86_64-darwin"
|
||||
"aarch64-darwin"
|
||||
];
|
||||
forEachSupportedSystem =
|
||||
f:
|
||||
nixpkgs.lib.genAttrs supportedSystems (
|
||||
system:
|
||||
f {
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
devShells = forEachSupportedSystem (
|
||||
{ pkgs }:
|
||||
{
|
||||
default = pkgs.mkShell.override { } {
|
||||
hardeningDisable = [ "all" ];
|
||||
packages = with pkgs; [
|
||||
nixd
|
||||
nixfmt-rfc-style
|
||||
|
||||
];
|
||||
hardeningDisable = [ "all" ];
|
||||
packages = with pkgs; [
|
||||
solc
|
||||
];
|
||||
};
|
||||
});
|
||||
};
|
||||
pnpm
|
||||
vscode-solidity-server
|
||||
|
||||
solc
|
||||
foundry
|
||||
];
|
||||
shellHook = ''
|
||||
if [ ! -d node_modules/ ]; then
|
||||
echo Installing node env
|
||||
pnpm install
|
||||
fi
|
||||
if [ ! -d lib/ ]; then
|
||||
echo Installing forge env
|
||||
forge i
|
||||
fi
|
||||
export PATH+=:$PWD/node_modules/.bin
|
||||
'';
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user