2019-10-26 01:14:49 +02:00
|
|
|
{ mozillaOverlay ? import <mozillaOverlay>,
|
|
|
|
rustManifest ? ./channel-rust-nightly.toml,
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
pkgs = import <nixpkgs> { overlays = [ mozillaOverlay ]; };
|
|
|
|
in
|
2019-10-07 00:33:44 +02:00
|
|
|
|
|
|
|
with pkgs;
|
|
|
|
|
2019-10-25 23:30:49 +02:00
|
|
|
let
|
2019-10-26 01:14:49 +02:00
|
|
|
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;
|
|
|
|
});
|
|
|
|
|
2020-01-05 02:04:03 +01:00
|
|
|
cargoSha256 = "0jbpwr84ncfj5nigznr06fpwaj89n839534n81hqwacflh1z43ix";
|
2019-10-26 01:20:04 +02:00
|
|
|
|
2019-10-25 23:30:49 +02:00
|
|
|
ticker-update = rustPlatform.buildRustPackage {
|
|
|
|
name = "ticker-update";
|
|
|
|
src = ./.;
|
|
|
|
buildInputs = [
|
|
|
|
pkg-config openssl postgresql.lib
|
2019-10-26 01:14:49 +02:00
|
|
|
rust
|
2019-10-25 23:30:49 +02:00
|
|
|
];
|
|
|
|
preBuild = "pushd ticker-update";
|
|
|
|
postBuild = "popd";
|
2019-10-26 01:20:04 +02:00
|
|
|
inherit cargoSha256;
|
|
|
|
};
|
|
|
|
|
|
|
|
ticker-serve = rustPlatform.buildRustPackage {
|
|
|
|
name = "ticker-serve";
|
|
|
|
src = ./.;
|
|
|
|
buildInputs = [
|
|
|
|
pkg-config openssl postgresql.lib
|
|
|
|
rust
|
|
|
|
];
|
|
|
|
preBuild = "pushd ticker-serve";
|
|
|
|
postBuild = "popd";
|
|
|
|
inherit cargoSha256;
|
2019-10-25 23:30:49 +02:00
|
|
|
};
|
|
|
|
in {
|
2019-10-26 01:14:49 +02:00
|
|
|
inherit
|
|
|
|
rustPlatform
|
2019-10-26 01:20:04 +02:00
|
|
|
ticker-update
|
|
|
|
ticker-serve;
|
2019-10-07 00:33:44 +02:00
|
|
|
}
|