mirror of
https://github.com/ipetkov/crane.git
synced 2024-11-22 14:10:16 +03:00
examples: drop nixpkgs-for-wasm-bindgen
The examples were already hard coding a concrete version of wasm-bindgen-cli so having the extra input was both useless and confusing
This commit is contained in:
parent
9f515d0197
commit
30ad43e875
@ -4,10 +4,6 @@
|
|||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
|
|
||||||
# The version of wasm-bindgen-cli needs to match the version in Cargo.lock
|
|
||||||
# Update this to include the version you need
|
|
||||||
nixpkgs-for-wasm-bindgen.url = "github:NixOS/nixpkgs/4e6868b1aa3766ab1de169922bb3826143941973";
|
|
||||||
|
|
||||||
crane.url = "github:ipetkov/crane";
|
crane.url = "github:ipetkov/crane";
|
||||||
|
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
@ -18,7 +14,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, crane, flake-utils, rust-overlay, nixpkgs-for-wasm-bindgen, ... }:
|
outputs = { self, nixpkgs, crane, flake-utils, rust-overlay, ... }:
|
||||||
flake-utils.lib.eachDefaultSystem (system:
|
flake-utils.lib.eachDefaultSystem (system:
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
@ -33,11 +29,7 @@
|
|||||||
# wasm32-unknown-unknown is required for trunk.
|
# wasm32-unknown-unknown is required for trunk.
|
||||||
targets = [ "wasm32-unknown-unknown" ];
|
targets = [ "wasm32-unknown-unknown" ];
|
||||||
};
|
};
|
||||||
craneLib = ((crane.mkLib pkgs).overrideToolchain rustToolchainFor).overrideScope (_final: _prev: {
|
craneLib = (crane.mkLib pkgs).overrideToolchain rustToolchainFor;
|
||||||
# The version of wasm-bindgen-cli needs to match the version in Cargo.lock. You
|
|
||||||
# can unpin this if your nixpkgs commit contains the appropriate wasm-bindgen-cli version
|
|
||||||
inherit (import nixpkgs-for-wasm-bindgen { inherit system; }) wasm-bindgen-cli;
|
|
||||||
});
|
|
||||||
|
|
||||||
# When filtering sources, we want to allow assets other than .rs files
|
# When filtering sources, we want to allow assets other than .rs files
|
||||||
unfilteredRoot = ./.; # The original, unfiltered source
|
unfilteredRoot = ./.; # The original, unfiltered source
|
||||||
@ -113,6 +105,12 @@
|
|||||||
version = "0.2.93";
|
version = "0.2.93";
|
||||||
hash = "sha256-DDdu5mM3gneraM85pAepBXWn3TMofarVR4NbjMdz3r0=";
|
hash = "sha256-DDdu5mM3gneraM85pAepBXWn3TMofarVR4NbjMdz3r0=";
|
||||||
cargoHash = "sha256-birrg+XABBHHKJxfTKAMSlmTVYLmnmqMDfRnmG6g/YQ=";
|
cargoHash = "sha256-birrg+XABBHHKJxfTKAMSlmTVYLmnmqMDfRnmG6g/YQ=";
|
||||||
|
# When updating to a new version comment out the above two lines and
|
||||||
|
# uncomment the bottom two lines. Then try to do a build, which will fail
|
||||||
|
# but will print out the correct value for `hash`. Replace the value and then
|
||||||
|
# repeat the process but this time the printed value will be for `cargoHash`
|
||||||
|
# hash = lib.fakeHash;
|
||||||
|
# cargoHash = lib.fakeHash;
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
in
|
in
|
||||||
|
@ -4,10 +4,6 @@
|
|||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
|
|
||||||
# The version of wasm-bindgen-cli needs to match the version in Cargo.lock
|
|
||||||
# Update this to include the version you need
|
|
||||||
nixpkgs-for-wasm-bindgen.url = "github:NixOS/nixpkgs/4e6868b1aa3766ab1de169922bb3826143941973";
|
|
||||||
|
|
||||||
crane.url = "github:ipetkov/crane";
|
crane.url = "github:ipetkov/crane";
|
||||||
|
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
@ -18,7 +14,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, crane, flake-utils, rust-overlay, nixpkgs-for-wasm-bindgen, ... }:
|
outputs = { self, nixpkgs, crane, flake-utils, rust-overlay, ... }:
|
||||||
flake-utils.lib.eachDefaultSystem (system:
|
flake-utils.lib.eachDefaultSystem (system:
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
@ -33,11 +29,7 @@
|
|||||||
# wasm32-unknown-unknown is required for trunk
|
# wasm32-unknown-unknown is required for trunk
|
||||||
targets = [ "wasm32-unknown-unknown" ];
|
targets = [ "wasm32-unknown-unknown" ];
|
||||||
};
|
};
|
||||||
craneLib = ((crane.mkLib pkgs).overrideToolchain rustToolchainFor).overrideScope (_final: _prev: {
|
craneLib = (crane.mkLib pkgs).overrideToolchain rustToolchainFor;
|
||||||
# The version of wasm-bindgen-cli needs to match the version in Cargo.lock. You
|
|
||||||
# can unpin this if your nixpkgs commit contains the appropriate wasm-bindgen-cli version
|
|
||||||
inherit (import nixpkgs-for-wasm-bindgen { inherit system; }) wasm-bindgen-cli;
|
|
||||||
});
|
|
||||||
|
|
||||||
# When filtering sources, we want to allow assets other than .rs files
|
# When filtering sources, we want to allow assets other than .rs files
|
||||||
unfilteredRoot = ./.; # The original, unfiltered source
|
unfilteredRoot = ./.; # The original, unfiltered source
|
||||||
@ -87,6 +79,12 @@
|
|||||||
version = "0.2.93";
|
version = "0.2.93";
|
||||||
hash = "sha256-DDdu5mM3gneraM85pAepBXWn3TMofarVR4NbjMdz3r0=";
|
hash = "sha256-DDdu5mM3gneraM85pAepBXWn3TMofarVR4NbjMdz3r0=";
|
||||||
cargoHash = "sha256-birrg+XABBHHKJxfTKAMSlmTVYLmnmqMDfRnmG6g/YQ=";
|
cargoHash = "sha256-birrg+XABBHHKJxfTKAMSlmTVYLmnmqMDfRnmG6g/YQ=";
|
||||||
|
# When updating to a new version comment out the above two lines and
|
||||||
|
# uncomment the bottom two lines. Then try to do a build, which will fail
|
||||||
|
# but will print out the correct value for `hash`. Replace the value and then
|
||||||
|
# repeat the process but this time the printed value will be for `cargoHash`
|
||||||
|
# hash = lib.fakeHash;
|
||||||
|
# cargoHash = lib.fakeHash;
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -102,22 +102,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-for-wasm-bindgen": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1691495139,
|
|
||||||
"narHash": "sha256-+zZIRTtXlA8gN8HPzczphPnB9L+yYpidBmFxKqWQy+A=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "4e6868b1aa3766ab1de169922bb3826143941973",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "4e6868b1aa3766ab1de169922bb3826143941973",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-latest-release": {
|
"nixpkgs-latest-release": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1730651795,
|
"lastModified": 1730651795,
|
||||||
@ -142,7 +126,6 @@
|
|||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs-for-wasm-bindgen": "nixpkgs-for-wasm-bindgen",
|
|
||||||
"nixpkgs-latest-release": "nixpkgs-latest-release",
|
"nixpkgs-latest-release": "nixpkgs-latest-release",
|
||||||
"rust-overlay": "rust-overlay"
|
"rust-overlay": "rust-overlay"
|
||||||
}
|
}
|
||||||
|
@ -4,10 +4,6 @@
|
|||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
nixpkgs-latest-release.url = "github:NixOS/nixpkgs/release-24.05";
|
nixpkgs-latest-release.url = "github:NixOS/nixpkgs/release-24.05";
|
||||||
|
|
||||||
# The version of wasm-bindgen-cli needs to match the version in Cargo.lock
|
|
||||||
# Update this to include the version you need
|
|
||||||
nixpkgs-for-wasm-bindgen.url = "github:NixOS/nixpkgs/4e6868b1aa3766ab1de169922bb3826143941973";
|
|
||||||
|
|
||||||
advisory-db = {
|
advisory-db = {
|
||||||
url = "github:rustsec/advisory-db";
|
url = "github:rustsec/advisory-db";
|
||||||
flake = false;
|
flake = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user