Skip to content

Commit

Permalink
Update cross-windows to use nixpkgs-mozilla.
Browse files Browse the repository at this point in the history
  • Loading branch information
gcoakes committed Mar 25, 2021
1 parent 7747863 commit 3a16852
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 76 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
docparse/target
/flake.lock
result
80 changes: 19 additions & 61 deletions examples/cross-windows/flake.lock

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

35 changes: 20 additions & 15 deletions examples/cross-windows/flake.nix
Original file line number Diff line number Diff line change
@@ -1,28 +1,33 @@
{
inputs = {
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = github:NixOS/nixpkgs/nixpkgs-unstable;
naersk = {
url = "github:nmattia/naersk";
url = github:nmattia/naersk;
inputs.nixpkgs.follows = "nixpkgs";
};
nixpkgs.url = "nixpkgs/nixpkgs-unstable";
nixpkgs-mozilla = {
url = github:mozilla/nixpkgs-mozilla;
flake = false;
};
flake-utils.url = github:numtide/flake-utils;
};

outputs = { self, fenix, flake-utils, naersk, nixpkgs }:
outputs = { self, nixpkgs, naersk, nixpkgs-mozilla, flake-utils }:
flake-utils.lib.eachDefaultSystem (
system: {
defaultPackage = let
pkgs = nixpkgs.legacyPackages.${system};
toolchain = with fenix.packages.${system};
combine [
minimal.rustc
minimal.cargo
targets.x86_64-pc-windows-gnu.latest.rust-std
];
pkgs = import nixpkgs {
inherit system;
overlays = [ (import nixpkgs-mozilla) ];
};
rustChannel = pkgs.rustChannelOf {
channel = "nightly";
date = "2021-03-24";
sha256 = "0y7ijxqbjac9gn038lihlcq7ynsvgi3f8fzn06bhmqhvww5dbwzn";
};
toolchain = rustChannel.rust.override {
targets = [ "x86_64-pc-windows-gnu" "x86_64-unknown-linux-musl" ];
};
naersk-lib = naersk.lib.${system}.override {
cargo = toolchain;
rustc = toolchain;
Expand Down

0 comments on commit 3a16852

Please sign in to comment.