39 lines
858 B
Nix
39 lines
858 B
Nix
{ mozillaOverlay ? import <mozillaOverlay>,
|
|
rustManifest ? ./channel-rust-nightly.toml,
|
|
}:
|
|
|
|
let
|
|
pkgs = import <nixpkgs> { overlays = [ mozillaOverlay ]; };
|
|
in
|
|
|
|
with pkgs;
|
|
|
|
let
|
|
rustChannelOfTargets = _channel: _date:
|
|
(pkgs.lib.rustLib.fromManifestFile rustManifest {
|
|
inherit (pkgs) stdenv fetchurl patchelf;
|
|
}).rust;
|
|
rust =
|
|
rustChannelOfTargets "nightly" null;
|
|
rustPlatform = pkgs.recurseIntoAttrs (pkgs.makeRustPlatform {
|
|
rustc = rust;
|
|
cargo = rust;
|
|
});
|
|
|
|
ticker-update = rustPlatform.buildRustPackage {
|
|
name = "ticker-update";
|
|
src = ./.;
|
|
buildInputs = [
|
|
pkg-config openssl postgresql.lib
|
|
rust
|
|
];
|
|
preBuild = "pushd ticker-update";
|
|
postBuild = "popd";
|
|
cargoSha256 = "0igr8k46yl5a89zjymp6914faawcvqza08h6l9pcplpikhbvls42";
|
|
};
|
|
in {
|
|
inherit
|
|
rustPlatform
|
|
ticker-update;
|
|
}
|