ticker/default.nix

54 lines
1.1 KiB
Nix
Raw Normal View History

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;
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;
});
cargoSha256 = "0jbpwr84ncfj5nigznr06fpwaj89n839534n81hqwacflh1z43ix";
2019-10-26 01:20:04 +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
];
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;
};
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
}