-
-
Save tilpner/0a781a87fcff1f83cf08ce91e38dade0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with import <nixpkgs> {}; | |
let | |
inherit (nur.repos.mozilla.rustChannels.nightly) rust; | |
buildRustCrateWithFlags = flags: args: (buildRustCrate.override { | |
rustc = rust; | |
}) (args // { | |
extraRustcOpts = (args.extraRustcOpts or []) ++ flags; | |
}); | |
callCarnix = p: flags: | |
let | |
callPackage = newScope { | |
buildRustCrate = buildRustCrateWithFlags flags; | |
}; | |
in | |
callPackage (p + "/Cargo.nix") { | |
cratesIO = callPackage (p + "/crates-io.nix") {}; | |
}; | |
in (callCarnix ./. [ "--edition 2018" ]).sd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment