Skip to content

Commit

Permalink
fix flake.nix to work on all platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
a10y committed May 1, 2024
1 parent 1d8d008 commit d4441ea
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 21 deletions.
36 changes: 35 additions & 1 deletion flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 22 additions & 20 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,34 +1,36 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
rust-overlay.url = "github:oxalica/rust-overlay";
};

outputs = {
self,
nixpkgs,
flake-utils,
rust-overlay,
}: let
# TODO what's the correct incantation here?
system = "x86_64-linux";
}:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [rust-overlay.overlays.default];
};

pkgs = import nixpkgs {
inherit system;
overlays = [rust-overlay.overlays.default];
};
toolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;

toolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;

in {
devShells.${system}.default = pkgs.mkShell {
packages = [
toolchain
pkgs.go_1_19
pkgs.just
pkgs.deno
pkgs.gofumpt
];
};
};
in {
devShells.default = pkgs.mkShell {
packages = [
toolchain
pkgs.go_1_19
pkgs.just
pkgs.deno
pkgs.gofumpt
];
};
}
);
}

0 comments on commit d4441ea

Please sign in to comment.